Bare Minimum

can someone tell me the code just to display a window using opengl ?

Opengl does not actually have the functionality to create windows.
But there are two ways instead, either you use GLUT or MFC.

GLUT is designed for OpenGL and its the easiest of the two to use. You can find more about it by searching this site from the main page.

MFC (Microsoft Foundation Classes) is Windows own way of creating and managing windows.

If you perform a search on the word ‘Nehe’ you will find some excellent tutorials on how to code OpenGL starting from creating a basic window.

I hope this helps you.

MFC’s main use is certainly not the creation of windows in Windows. If that’s all you wanted to do, I’d stay away from MFC, and just use the Win32 API to do it. But I would second the notion to look at the NeHe tutorials.

I agree with DFrey, if you just wanna create a window, learn how to create one with the Win32 API rather than using MFC.

There are also other ways to create windows such as SDL, and if you’re using Linux, you can use Xlib. (I’ve just started to look at Xlib, but it appears to basically be the Linux equivalent to the Win32 API.)

Not to mention Borland’s set of classes if you use Borland. In short… there are far more than 2 ways to create a simple OpenGL window.

[This message has been edited by Deiussum (edited 05-09-2002).]

I apologize. I meant the win32 API.
Im a noobie too at this