Commit Graph

204 Commits

Author SHA1 Message Date
Joey de Vries
82b066067f Update Breakout source code to match updates Text Rendering chapter. 2020-04-28 14:46:15 +02:00
Felix Weilbach
c91f8d65a5 Zero out memory from color variable
According to [here](https://www.khronos.org/opengl/wiki/Type_Qualifier_(GLSL)#Fragment_shader_outputs) memory of a fragment shader variable is initialized with undefined values. Therefore it should be zeroed out.
2020-04-27 16:44:24 +02:00
Joey de Vries
be066bcb6e Add Breakout progress code for Audio chapter. 2020-04-27 15:00:23 +02:00
Joey de Vries
75c6d5fa97 Update Breakout progress code for PowerUps chapter. Also few missed items on prev. progress code. 2020-04-27 14:26:24 +02:00
Joey de Vries
596c654c2c Add progress code item for Breakout's PostProcessing chapter. 2020-04-26 12:58:03 +02:00
Joey de Vries
9a34b34b32 Fix include error on 6.game.cpp progress. 2020-04-25 16:58:38 +02:00
Joey de Vries
4b890eca6b Update Breakout code for revised Particles chapter. 2020-04-25 16:57:19 +02:00
Joey de Vries
abbcac5743 Add game progress code for Breakout collision chapters. Add forgotten destructor logic on previous progress files. 2020-04-24 15:51:32 +02:00
Joey de Vries
01def67b0d Add progress ball object code. 2020-04-23 12:30:50 +02:00
Joey de Vries
85af3b93fa Fix awesomeface alpha channel on texture. 2020-04-23 12:30:38 +02:00
Joey de Vries
90163ce702 Forgot to add relevant include. 2020-04-23 12:01:15 +02:00
Joey de Vries
351c968373 Update breakout code to match revised changes 'Levels' chapter. 2020-04-23 12:00:15 +02:00
Joey de Vries
37892e5370 Missed a few code files for removing the unnecesasry OS X compile comment. 2020-04-23 11:59:53 +02:00
Joey de Vries
1f05d38e1e Breakout changes for revision 'Rendering Sprites' 2020-04-22 19:02:20 +02:00
Joey de Vries
91f53af052 Remove unnecessary 'uncomment' statement from all code samples. 2020-04-22 16:37:07 +02:00
Joey de Vries
e046977ffb Update Breakout code for 'Setting up' chapter. 2020-04-22 16:35:13 +02:00
Joey de Vries
599355fba8 First chapter-specific progress breakout code; test to see if I can link these directly from article. 2020-04-22 16:05:11 +02:00
Joey de Vries
d756ed80fa Add full source code of the finished (and revised code) Breakout example. Not set up for cross-platform compilation as it has irrKlang and FreeType dependency, but at least source code is available online (and can be referenced from Breakout chapters). 2020-04-22 15:47:23 +02:00
Joey de Vries
a8499a2668 Fix infinite loop error w/ unsigned ints used on decrementing for counters. 2020-04-22 12:58:38 +02:00
Toni Uhlig
dcdf94fce7 fixed compiler warnings reported by gcc/clang
* changed some catch blocks to use exception references instead of value types
 * fixed missing use of SCR_WIDTH/SCR_HEIGHT for glfwCreateWindow
 * fixed implicit numeric type casts regarding signedness
 * removed unused variables

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-03-18 18:34:17 +01:00
Joey de Vries
2300a20eb0 For Bloom tutorial, make sure second MRT target's BrightColor is assigned a default value (appears to break on some drivers/cards). 2019-01-09 13:03:22 +01:00
Joey de Vries
d4af863bc3 Adjust light values to hit bloom threshold. 2019-01-08 20:56:26 +01:00
Joey de Vries
f4b6763356 Update GLM to latest version (0.9.9.3). This includes GLM's change of matrices no longer default initializing to the identity matrix. This commit thus also includes the update of all of LearnOpenGL's code to reflect this: all matrices are now constructor-initialized to the identity matrix where relevant. 2018-12-30 14:27:14 +01:00
houstond
d07b463cfc LN134: The second parameter internalFormat GL_RGB will not work on OpenGL es. GL_RGB should be GL_RGBA. 2018-11-24 12:03:07 +08:00
keith2018
1a70c3efad fix shader file names 2018-04-12 10:33:41 +08:00
Joey de Vries
d0fc384f29 Merge pull request #104 from d3BugErr/master
Another take on PBR tutorials missing rows and columns
2018-04-10 15:51:48 +02:00
Erik
686797546a Update lighting_textured.cpp
Real fix for missing rows and columns.
2018-04-10 16:47:52 +03:00
Erik
ac1784f29b Update lighting.cpp
Real fix for missing rows and columns.
2018-04-10 16:47:20 +03:00
Joey de Vries
75648e81f6 Merge pull request #103 from d3BugErr/master
Tutorial PBR 1.1 sphere grid construction fix
2018-04-10 12:56:43 +02:00
d3BugErr
3eaf086897 Spheres model matrix generation fix
Fix of integer division resulting in some spheres being rendered at same position.
Removed redundant float cast as all operands are being promoted to double anyways.
2018-04-10 13:07:43 +03:00
Erik
e511ca603d Revert "Spheres model matrix generation fix"
This reverts commit d702e0c6bf.
2018-04-10 12:39:42 +03:00
d3BugErr
d702e0c6bf Spheres model matrix generation fix
Fix of integer division resulting in some spheres being rendered at same position.
Removed redundant float cast as all operands are being promoted to double anyways.
2018-04-10 11:23:09 +03:00
Joey de Vries
3309ae604b Fix skybox order. 2018-01-22 19:11:11 +01:00
Joey de Vries
f9913d5aa8 Merge branch 'master' of https://github.com/JoeyDeVries/LearnOpenGL 2018-01-16 08:51:04 +01:00
Joey de Vries
3b605521fb Fix geometry shader normal homogenous coordinate, and use std::string instead of aString for model loading. 2018-01-16 08:50:57 +01:00
Joey de Vries
56dfb32615 Merge pull request #93 from stfx/patch-4
Fix another graphical error showing a black box
2017-11-26 22:35:32 +01:00
stfx
b4982b4611 Fix another graphical error showing a black box
Is needed in addition to #92 to fix all graphical errors. Happens due to divide by 0 when `roughness = 0.0` and `NdotH = 1.0`.

Also use max to clamp similar fix for specular calculation instead of addition to fix the formula in normal cases
2017-11-26 22:10:59 +01:00
stfx
c217609890 Fix rare graphical error showing a black box
This may happen at certain hard to replicate viewing angles.

Theoretically clamp 0,1 should also be faster since SAT (saturate) is a free operation on output however since saturate only exists on HLSL we are at the mercy of the GLSL compiler to replace clamp 0,1 with SAT. Source: http://www.humus.name/Articles/Persson_LowLevelThinking.pdf#page=22
2017-11-26 20:03:44 +01:00
Joey de Vries
ea32df7b91 Merge branch 'master' of https://github.com/JoeyDeVries/LearnOpenGL 2017-10-21 10:07:27 +02:00
Joey de Vries
d4b675bbcd Set max specular IBL reflection mip level to 4.0 to match the number of generated mips. 2017-10-21 10:07:19 +02:00
dotlive
8fef6cdd3e fix shader file’s variable name dismatched with source file’s. 2017-10-19 07:30:33 +08:00
Joey de Vries
3a04c6f9f4 Fix reflection mip level constant on PBR textured scene. 2017-09-26 19:11:01 +02:00
Joey de Vries
673fe1e89f Merge branch 'master' of https://github.com/JoeyDeVries/LearnOpenGL 2017-09-21 08:35:18 +02:00
Joey de Vries
2e0035a8d4 fix: use radians instead of degrees for camera zoom. 2017-09-21 08:35:13 +02:00
stfx
33ee64327f Fix typo 2017-08-19 16:59:35 +02:00
stfx
dc4dee3f82 Fix Bloom in rare cases
BloomColor was not initialized with a value and therefore could incorrectly bloom non-bright pixels.

Maybe... since the issue randomly started to happen on my system (i5-4570, GTX 760) without any hardware or software changes I know of. Even older versions of my program then suddenly had this problem and this was the only working fix which was mentioned in the comments section on the tutorial: https://learnopengl.com/#!Advanced-Lighting/Bloom#comment-2693931521)
2017-08-19 16:57:49 +02:00
Joey de Vries
c6b404915d Merge branch 'master' of https://github.com/JoeyDeVries/LearnOpenGL 2017-07-24 20:08:58 +02:00
Joey de Vries
b379c0fe74 Additional statements to clarify usage of FileSystem namespace in Textures tutorial. 2017-07-24 20:08:53 +02:00
Shivpratap Chauhan
b5848894eb Add glfw hint for GLFW_OPENGL_FORWARD_COMPAT for more samples to let it
work on osx
2017-07-12 21:33:07 +05:30
Shivpratap Chauhan
2d16ef0fe2 GLFW hint GLFW_OPENGL_FORWARD_COMPAT is must on osx to create glfw
window successfully
2017-07-12 17:06:00 +05:30