PDA

View Full Version : How do you use OpenGL within windows programming?



blood.angel
11-07-2001, 07:07 PM
Ive tried glut, but want to use windows via Visual C++.

Could anyone give me a link to any tuts on the subject?

krishna
11-07-2001, 08:09 PM
In MSDN library ( Microsoft
Help library), You can get the required help.

ppinter1
11-07-2001, 08:40 PM
Check out http://p-squared.com/Display3DS.zip for a bog standard and legible example of VC++, MFC and OpenGL.

Screaming Lunatic
11-07-2001, 08:43 PM
[prerecorded message on]
http://nehe.gamedev.net

[prerecorded message off]

SL http://www.opengl.org/discussion_boards/ubb/wink.gif

endo
11-10-2001, 05:58 AM
If you want to use the Windows API, Nehe's tutorials are superb. If you want to use MFC the only decent site I found was:
http://pws.prserv.net/mfcogl/

Its not very big but has all the necessary information clearly presented (very helpful for beginners)

dorbie
11-11-2001, 02:32 AM
You could try the OpenGL super bible.
http://www.amazon.com/exec/obidos/ASIN/1571691642/ref=pd_sr_ec_ir_aps/107-1836659-2654957

I personally like Ron Fosner's white book, it's really simple and explains OpenGL on Windows, it's light on the rest of OpenGL but it gives you the essentials of getting the window handle and getting a pixel format descriptor.
http://www.amazon.com/exec/obidos/ASIN/0...1836659-2654957 (http://www.amazon.com/exec/obidos/ASIN/0201407094/qid=1005478140/sr=8-1/ref=sr_8_3_1/107-1836659-2654957)

Others don't like this book because of it's brevity, it gave me what I needed without the fluff, but I already had too many OpenGL books.

There's a slew of stuff online too, look for PIXELFORMATDESCRIPTOR. This is the key WGL structure for creating your OpenGL context, so hits on this are what you are looking for, here are a few interesting pages:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglo_0e0o.asp
http://orion.lcg.ufrj.br/compgraf1/downloads/OpenGL_Programming_Guide/appendixc.html