View Full Version : opengl window creation and use
Im fairly new to opengl, I am creating a program which is similar to a simple flight simulator. The only way I know how to create a window to display the vehicles on screen is by using GLUT. Using this i can easily display what is required however, this has a major limitation for my program, i need to have the window system to being essentially a slave to the main program which calculates movement etc. With glut i only seem to be able to have glut as the main program and run the calculations using glutIdleFunc() which is very wasteful and slow for the calculation problem. Can anyone help and suggest a solution or alternative to glut for this problem?
09-12-2002, 07:27 AM
why not try "native" opengl via win32
this throws glut away but is more windows involving
1. create a normal win32 app
fill WNDCLASS structure
register WNDCLASS structure -RegisterClass()
create Window - CreateWindow()
setup Main MessageLoop - PeekMessage()...
2. do the wgl stuff
fill PIXELFORMATDESCRIPTOR structure
find a pixelformat - ChoosePixelformat()
set this pixelformat - SetPixelFormat()..
create rendering context - wglCreateContext()
make it current - wglMakeCurrent()...
3. Do your stuff
for the pixelformat stuff look into your compilers help under PIXELFORMATDESCRIPTOR
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.