Notes on programming with OpenGL |
My Related Pages | Copyright © 2008-2009 by Zack Smith. All rights reserved. Is OpenGL included with Windows?It is provided with Vista. It is a part of later versions Windows XP. Otherwise you must download DirectX and install that to get OpenGL support.What libraries are typically used with OpenGL?GLUT and GLU. I've used GLUI as well.Are there windowing-system based on OpenGL or similar?Yes. Vista's Aero and Apple's OS/X base their windowing systems on 3D graphics concepts. Under Linux, Xgl does this, and Compiz add 3D window management.Is there a widget set for use inside an OpenGL window?Yes. It is called GLUI and it is free. It is basic however and lacks some key features, like a dial widget, pulldown menus, text entry etc.What is the procedure for changing the color of an object?Let's say you are defining a polygon. You must define its color before you make the call toglBegin().
What is the procedure for finding the object that a user has clicked on?It's not straightforward. You must redraw the entire scene but in "select" mode. This will provide you with an array of objects that intersected a point on the display. You must then find the one that is closest to the viewer's eye.I drew a line but cannot see it. What to do?To make a visible, bright line, if that's what you want, turn off lighting. Like so:glDisable (GL_LIGHTING); glColor3f (red, green, blue); glBegin (GL_LINES); ... glEnd (); glEnable (GL_LIGHTING);You may also want to set the line width using glLineWidth.
I want to hide the OpenGL console window in Windows. How do I do that?At the top of yourmain() function, insert this:
HWND hWnd = GetConsoleWindow(); ShowWindow( hWnd, SW_HIDE ); How do I combine OpenGL graphics with standard Windows controls/widgets like pushbuttons?You cannot combine them in the same window but you can make the OpenGL window a child of the window that has the controls. Use WS_CHILD as the style in CreateWindowEx().What are the limitations of OpenGL under Windows?Here is a list.Are there OpenGL forums?Yes there are, and they are here: OpenGL official forums.Links
|
|