This samples shows us how to put the mesh render data such as the vertex position, texture coordinates and even more vertex data upload into the video hardware. The samples what saw before that vertex data provided by the glVertex3f or glTexCoord2f
Some ideas about calculating tangent space for meshes are cleaned here. It is very easy to calculate the tangent basis vectors if the vertex normal and diffuse uv sets were provided for each triangles. Some problems may appear when several
This sample shows us how to switch on the MSAA (Multiple sampling Anti-Aliasing) on windows. I remember some material that I read before. The MSAA just sample several pixels instead of only one pixel at each position. Then an average pixel will be
NeHe Productions_ Prep_ The Graphics Pipeline This article gives us a brief idea on how does OpenGL make your triangles display on the screen. Well, it is simplified one, and some information missing here. Some important information like, early z
This samples us how to apply Cg vertex shader in OpenGL. Shader is a kind of short c-like code that could run on the GPU. One the one hand, we could get much flexibility while rendering our-own visual effect. This will keep us away from hard
This sample provides us an ArcBall module that we could use to rotate object along the screen with mouse. The underneath idea is mapping a 2d screen position into a 3d sphere coordinate. A rotation Quat could be calculated out by two sphere
This sample gives us some basics information about Physical Simulations. Some terminologies like Mass, Force, acceleration, velocity, time, position and the relationships among them are described here. For the simulation part, we need to use
In the last few years or months, I have made a lots of technology learning plans. Every time, I want to learn a new kind of technology, I always want to learn from the ZERO. That means I will copy or try to re-build the whole thing from the very
A good start to learn OpenGL Shading language. This simple program was built under Ubuntu OS. The process that OpenGL using shading language is the much similar as D3D. Some difference exists like, pixel shader or fragment shader, the vertex
This samples shows us how to create anti-aliased font. The WGL font bitmap saved with binaries image, that means only one bit per pixel. This will cause some aliased problem as you zoom in the font. The font edge become very obvious and sharper. To
Code::Block is a C/C++ IDE that could run on different OS, Windows, Linux and Mac OS. Comparing to the VS under the windows, it is less powerful. But it will help you a lots, and improve the your work efficient if you were not an Linux coding expert.
This samples shows us how to render a 3D lens flare with OpenGL. A lens flare effect go with a light source. Before divide into the render part, there are several things that need to be addressed first. 1) How to make sure whether a light source
In the last several weeks, I dedicated myself to one “EasyGame”series C++ coding during my spare time. The first version source origin from <<學OpenGL編3D遊戲>>. The source structure and coding style are really bad, but it full of passion
This program shows how to play video with OpenGL & OpenAL. The .avi file that could be supported should be an old AVI file format, that no video & audio data compress happened here. This kind of AVI file format is not popular on the current