Using OpenGL With Visual C++
Using OpenGL With Visual C++
Yes, believe me, just three include files, not more than
that!!!
That’s it.
Features of OpenGL
Display Lists
To store a series of OpenGL Commands and execute at a later
time. It helps in building the animation, movies etc.
Color
Color and shading technique to describe the graphical
model.
Lighting
Light model for ambient light, specular light, diffuse
light supported by the library.
Texture mapping
Mapping technique to wrap 1D or 2D texture on the 3D
objects.
Saturn Software Mills
Visit for more technical article http://www.saturnsoftmills.com/FreeDownloads.htm
Framebuffer
Description and control of all the buffers. It helps in
generation of industry standard animations.
void CYourPrjView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
RECT rect;
cdc = (CDC*)GetDC();
PIXELFORMATDESCRIPTOR pfd = {
sizeof (PIXELFORMATDESCRIPTOR), // Size of this structure
1, // Version number
PFD_DRAW_TO_WINDOW | // Flags
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA, // RGBA pixel values
24, // 24-bit color
0, 0, 0, 0, 0, 0, // Don't care about these
0, 0, // No alpha buffer
0, 0, 0, 0, 0, // No accumulation buffer
32, // 32-bit depth buffer
0, // No stencil buffer
0, // No auxiliary buffers
PFD_MAIN_PLANE, // Layer type
0, // Reserved (must be 0)
0, 0, 0 // No layer masks
};
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0,1.0,1.0,2000.0);
glViewport(rect.left,rect.top,rect.right,rect.bottom);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClearColor(0.0,0.0,0.0,1.0);
}
Saturn Software Mills
Visit for more technical article http://www.saturnsoftmills.com/FreeDownloads.htm