Tools of the Trade

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

Tools of the Trade. www.asyrani.com Revamped by Dr. Ulka Chandini Pendit.

Scene 2 (8s)

How to write your own game engine?. Which Language? C++ 2. What do you have to learn from C++? classes , methods, inheritance, polymorphism and encapsulation..

Scene 3 (20s)

How to write your own game engine?. Which API? BUT, if you are writing API code for the first time... WHY?.

Scene 4 (29s)

Games which are built or used OpenGL... 1. Baldur's Gate II: Shadows of Amn 2. Brink 3. City of Heroes 4. Call of Duty 6. Counter-Strike 7. Doom 3 8. Doom 3: Resurrection of Evil 9. Doom 10. Enemy Territory: Quake Wars.

Scene 5 (45s)

Games which are built or used OpenGL... 11. Far Cry 12. Half-Life 13. Hitman 14. Left 4 Dead 15. Neverwinter Nights 16. Portal 17. Penumbra 18. Star Wars: Knights of the Old Republic 19. Star Wars: Knights of the Old Republic II - The Sith Lords 20. Star Wars: Jedi Knight - Jedi Academy.

Scene 6 (1m 3s)

Games which are built or used OpenGL... 21. Star Wars: Jedi Knight II - Jedi Outcast 22. The Chronicles of Riddick: Escape from Butcher Bay 23. Unreal Tournament 24. Unreal Tournament 2004 25. World of Warcraft.

Scene 7 (1m 15s)

So.. yeahh .. OpenGL is legittt , guysss !!.

Scene 8 (1m 23s)

So, let’s start off with C++!!!.

Scene 9 (1m 29s)

If you are not fit in C++ .. Please go through C++ series by Cherno ...

Scene 10 (1m 42s)

Then, Next.. OpenGL... Lo:o. https://www.youtube.com/watch?v=W3gAzLwfIP0&list=PLlrATfBNZ98foTJPJ_Ev03o2oq3-GGOS2.

Scene 11 (1m 52s)

Learn how to render characters, how to rotate and translate characters, how texturing and lighting works...

Scene 12 (2m 1s)

Buttt … what is OpenGL, anywayy ??.

Scene 13 (2m 8s)

It’s an API for drawing graphics. The whole purpose of OpenGL is to transfer data from the CPU to the GPU ..

Scene 14 (2m 18s)

Once data is in the GPU, it is processed by the OpenGL Rendering Pipeline ..

Scene 15 (2m 27s)

The Rendering Pipeline process the data through several stages known as:.

Scene 16 (2m 38s)

Per-Vertex Operation. First stage vertices are processed by a shader , known as the Vertex Shader ..

Scene 17 (2m 47s)

Each vertex is multiplied with a transformation matrix, effectively changing its 3D coordinate system to a new coordinate system. Just like a photographic camera transforms a 3D scenery into a 2D photograph . The Vertex Shader changes the 3D coordinate system of a cube into a projective coordinate system..

Scene 18 (3m 3s)

Next.. goes to Primitive assembly. After three vertices have been processed by the vertex shader .. They go to primitive assembly stage where a primitive is constructed by connecting the vertices in a specified order..

Scene 19 (3m 17s)

Next.. Is.. Primitive Processing. Before the primitive is taken to the next stage, Clipping occurs. Any primitive that falls outside the View-Volume , i.e. outside the screen, is clipped and ignore in the next stage..

Scene 20 (3m 31s)

Next.. Rasterization. P ixels approximating the shape of a primitive . This approximation occurs in the Rasterization stage . pixels are tested to see if they are inside the primitive’s perimeter. If they are not , they are discarded . If they are within the primitive, they are taken to the next stage. The set of pixels that passed the test is called a Fragment ..

Scene 21 (3m 51s)

Fragment Processing. A Fragment is a set of pixels approximating the shape of a primitive. When a fragment leaves the rasterization stage, it is taken to the Per-Fragment stage, where it is received by a shader . This shader is called a Fragment Shader Apply color a texture to the pixels within the fragment..

Scene 22 (4m 7s)

Per-Fragment Operation. Finally, fragments are submitted to several tests like: Pixel Ownership test Scissor test Alpha test Stencil test Depth test.

Scene 23 (4m 18s)

At the end of the pipeline, the pixels are saved in a Framebuffer , more specifically the Default-Framebuffer . These are the pixels that you see in your screen..

Scene 24 (4m 29s)

The figure below shows how frame buffer works... OpenGL Data Object CPU Vertex Shader GPU Fragment Shader Frame copyright haroldserrano.com.

Scene 25 (4m 37s)

Next, I will explain some OpenGL codings in your Lab 1 Module to you...

Scene 26 (4m 46s)

Understanding OpenGL Objects. GLEnable : enable or disable server-side GL capabilities. GL_DEPTH_TEST : If enabled, do depth comparisons and update the depth buffer. GL_COLOR_MATERIAL : If enabled, have one or more material parameters track the current color. GL_LIGHTING : If enabled, use the current lighting parameters to compute the vertex color or index. If disabled, associate the current color or index with each vertex . GL_LIGHT : If enabled, include light in the evaluation of the lighting equation. GL_NORMALIZE : If enabled, normal vectors specified with glNormal are scaled to unit length after transformation..

Scene 27 (5m 13s)

1. glViewport function sets the viewport. The X, y, width and height. 2. glMatrixMode function specifies which matrix is the current matrix. 3. glLoadIdentity function replaces the current matrix with the identity matrix . 4 . gluPerspective function sets up a perspective projection matrix ..

Scene 28 (5m 29s)

glLoadIdentity function replaces the current matrix with the identity matrix. glNormal — set the current normal vector.

Scene 29 (6m 38s)

For more OpenGL coding, please refer to: https :// docs.microsoft.com/en-us/windows/win32/opengl/glalphafunc.

Scene 30 (6m 49s)

Next, beside OpenGL.. You will also use...

Scene 31 (6m 56s)

Visual Studio C++. Visual Studio | MSDN - Google Chrome.

Scene 32 (7m 3s)

Introduction. VS is an integrated development environment (IDE) Includes: Powerful Text Editor Source-level and machine-level debugger Many more.

Scene 33 (7m 13s)

Source Files, Headers, and Translation Units. A program written in C++ comprised of source files File extension = .c, .cc, .cxx, or . cpp Source files = translation units Special source file = header file Header files exists as distinct files from the point of view of the programmer.

Scene 34 (7m 30s)

Libraries, Executables , Dynamic Link Libraries. Object file (. obj ) Relocatable – memory addresses at which the code resides have not yet been determined Unlinked – any external resources references to functions and global data that are defined outside the translation unit have not yet been resolved Linker job’s To calculate the final relative addresses of all the machine code To ensure that all external references to functions and global data.