See what's going on with flipcode!




 

OpenGL / Glut Questions
Question submitted by (04 November 1999)




Return to The Archives
 
  I have just started exploring OpenGL development and am using VC++ 6, I have two questions. The first: When I use glut to create my window it does so just fine, except that it opens a command window in the background that stays open even after I close my application window. How can I prevent this? (I am using win98). The second question is, when my application window is created, it is windowed. This hints to me that my voodoo2 card is not rendering the 3D scene, since every other application Ive ever run that utilized my 3D card has had to have been run in fullscreen mode. How do I check to see if my voodoo card is rendering the scene, and if its not how do I make it? (I guess that's three questions, sorry).  
 

 
  I don't have an answer handy for getting rid of the console window. I seem to recall that you need to create the project as a Win32 Application and then change some of the compile directives to call main() instead of WinMain() as being the "easy" way, but there is probably a #pragma that will do the same thing. If anyone else has an answer send it in and I'll make sure it gets posted here and added to the OpenGL Game Dev FAQ.

First of all, make sure you get the latest drivers for your Voodoo2. Unfortunately the Voodoo2 doesn't integrate cleanly into the windowing system since it is a 3D only card so it cannot be accessed through the standard ICD interface. The cleanest way to use this driver is to use the LoadLibrary() call with its specific driver (3dfxvgl.dll or something like that) instead of OpenGL32.dll. Basic info is here <http://members.home.com/borealis/opengl_usingq3.html> although I strongly disagree with his "wrapper" method for the function calls. You most definitely should use variables that are pointers to the functions instead of wrapper functions.

You can check what driver is performing the rendering by calling glGetString(GL_VENDOR). You can look at the PFD to check if you are getting hardware acceleration by using the following from the OpenGL Game Dev FAQ:


//----------------------------------------------------------------------
//Section 6. Hardware Acceleration
//----------------------------------------------------------------------
//Subject 6.01: How do I determine if I'm getting hardware acceleration under
//              Windows NT/95/98?

//     After you fill out the PIXELFORMATDESCRIPTOR, do the following:

     int pixelFormat = ChoosePixelFormat (hDC, &pfd);

PIXELFORMATDESCRIPTOR pfd_new; DescribePixelFormat (hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd_new);

int generic_format = pfd_new.dwFlags & PFD_GENERIC_FORMAT; int generic_accelerated = pfd_new.dwFlags & PFD_GENERIC_ACCELERATED;

if (generic_format && ! generic_accelerated) { // software } else if (generic_format && generic_accelerated) { // hardware - MCD } else if (! generic_format && ! generic_accelerated) { // hardware - ICD }




Response provided by Tom Hubina
 
 

This article was originally an entry in flipCode's Fountain of Knowledge, an open Question and Answer column that no longer exists.


 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.