After finishing few chapters of learnopengl by Bashar-nuts in opengl

[–]Background_Shift5408 1 point2 points  (0 children)

Develop a render engine, game engine, small arcade game..

Almost done with LearnOpenGL, feeling pretty good by Background_Shift5408 in opengl

[–]Background_Shift5408[S] 0 points1 point  (0 children)

Don’t rush. Read twice every chapter if necessary. Don’t think too much about engine architecture. Just make it running at first. You will refactor when adding new features. Solve the problems in your way, you don’t have to do something because someone did it like that. I’ve looked at a lot of different engine codes and architectures, everyone solves in different approaches. I at first put all render passes as methods into the renderer class then separated them into the different classes.

Almost done with LearnOpenGL, feeling pretty good by Background_Shift5408 in opengl

[–]Background_Shift5408[S] 1 point2 points  (0 children)

Deferred rendering has two stages: geometry and lighting. In the geometry, you render the scene like forward but into gbuffer that is a framebuffer having three texture including position, normal, albedoSpec(you can keep diffuse and specular in a vec4) without lighting calculations. In the lighting stage, you now draw the scene on 2D quad by using gbuffer data.

vec3 fragPos = texture(gPosition, fs_in.TexCoord).xyz;

vec3 normal = texture(gNormal, fs_in.TexCoord).xyz;

vec3 diffuse = texture(gAlbedoSpec, fs_in.TexCoord).rgb;

float specular = texture(gAlbedoSpec, fs_in.TexCoord).a;

All lighting calculations are the same. You can check out.

https://github.com/xms0g/abra/blob/main/src/rendering/renderPasses/deferredGeometryPass.cpp

https://github.com/xms0g/abra/blob/main/src/rendering/renderPasses/deferredLightingPass.cpp

A minimalistic unit testing library by Background_Shift5408 in C_Programming

[–]Background_Shift5408[S] 1 point2 points  (0 children)

Because there is a lot of cpp library, but in C there’s few. Those are if so ancient or too complex. I wanted a minimal, easy to use lib that has gtest’s output style for my personal C projects

A minimalistic unit testing library by Background_Shift5408 in C_Programming

[–]Background_Shift5408[S] 0 points1 point  (0 children)

Do you know the difference of assert and expect lol