Items related to 3D Game-Engine Development with Modern OpenGL 4.6 in...

3D Game-Engine Development with Modern OpenGL 4.6 in C++ in 21 Days: A Hands-On Course in GLSL Shaders, Buffers, Framebuffers, Direct State Access, ... Rendering (Learn Programming in 21 Days) - Softcover

Book 36 of 36: Learn Programming in 21 Days

Saqib, Mohammad

 
9798175725248: 3D Game-Engine Development with Modern OpenGL 4.6 in C++ in 21 Days: A Hands-On Course in GLSL Shaders, Buffers, Framebuffers, Direct State Access, ... Rendering (Learn Programming in 21 Days)

Synopsis

Twenty-one days. One renderer. Every picture in the book drawn by the program you wrote.

Windows ships the OpenGL of 1992: opengl32.dll is version 1.1, everything since lives in your graphics driver. This book spends Day 2 on it and generates its loader from the Khronos registry, then uses Direct State Access on every line after -- never glBindBuffer and a global slot.

On Day 1 you have a context, a framebuffer and a picture in a PNG file -- with no window, because a window is three hundred lines of Win32 that teach no graphics. By Day 14 you are flying through a lamp-lit stone observatory with a real shadow on the floor. By Day 21 you have a 379-kilobyte program in a folder that runs on a machine with no compiler on it.

Everything in it was run. 408 figures across 21 chapters, of which 210 are frames Meridian rendered itself and wrote to disk. Not one screen grab, on any page. 154 listings, every one compiled. 83 output blocks, captured from a real run, never typed. 21 engine snapshots, one for each day, each building on its own.

YOUR 21-DAY PATH

Day 1 - A Context, and a Picture with No Window: twenty-seven entry points by hand, and a triangle in a PNG.
Day 2 - The Loader, and What "Modern OpenGL" Means: a loader generated from the Khronos registry.
Day 3 - A Window, and SwapBuffers: two framebuffers, one blit, and what aliasing is.
Day 4 - Buffers, Vertex Arrays, and the Triangle: Direct State Access, and stride against offset.
Day 5 - Shaders, and the Shading Language: GLSL compiled while the program runs, and its log.
Day 6 - Matrices, and the Cube That Turns: four spaces, and the only matrix that touches w.
Day 7 - Depth, the Frame Loop, and the First Measurement: reversed Z, and what takes early depth testing away.
Day 8 - Textures, Samplers, and Mip Maps: the pyramid underneath, and anisotropy.
Day 9 - Meshes, and Building the Meridian: one buffer pair, base_vertex, and six generators.
Day 10 - Normals, and the First Light: one dot product, and the colour space it happens in.
Day 11 - The Lamps, and How Light Falls Off: four answers to how far a lamp reaches.
Day 12 - Materials, and the Uniform Buffer: std140, and what a layout mismatch looks like.
Day 13 - The Camera We Drive: a position and two angles, and the one that breaks.
Day 14 - The Dome Casts a Shadow: acne, peter-panning, and what the second pass costs.
Day 15 - Brass, Glass, and a Physical Surface: three terms, and energy conserved by subtraction.
Day 16 - Framebuffers, and a Frame That Is a List: eight passes, one program, and a state cache.
Day 17 - The Lamp Gets Hot: a number bigger than one, and two tone maps.
Day 18 - Compute Shaders, and the Dust in the Beam: the barrier nobody warns you about.
Day 19 - Ten Thousand Stars in One Draw Call: a divisor, six planes, and a cull you can freeze.
Day 20 - The Meridian, in a File: names instead of indices, and nine digits.
Day 21 - A Folder Somebody Else Can Run: the check that saves a black window.

WHO IT IS FOR. A C++ programmer who has not written graphics before, or who learned OpenGL from a tutorial written in 2004 and wants to know why none of it looks like this. You need pointers, structs and a compiler; you do not need linear algebra, because Day 6 builds what the book uses. You need Windows and a driver offering OpenGL 4.6 and nothing else installed: no GLFW, no GLM, no GLAD, no image library and no assets, because every texture is a function and every mesh is a loop.

Download book source code from: {GitHub}/{mohammadnsaqib}

436 pages, in colour.

"synopsis" may belong to another edition of this title.