PDA

View Full Version : How Can I Get to Know Wheather my app use HW accelerate or not?



Suvcon
01-13-2001, 01:45 PM
thank for your guide and sorry for my poor english. http://www.opengl.org/discussion_boards/ubb/wink.gif

I do not know if my app use hardware accelerating correctly,Is there any flag to detect? http://www.opengl.org/discussion_boards/ubb/rolleyes.gif

Elixer
01-13-2001, 02:20 PM
You can get the renderer name, if it is MS, then it is software mode...

some code:
hdc = wglGetCurrentDC();
hglrc = wglCreateContext (hdc); // create a rendering context
wglMakeCurrent (hdc, hglrc); // make it the calling thread's current rendering context
printf("Vendor=%s\n",glGetString(GL_VENDOR));
printf("Renderer=%s\n",glGetString(GL_RENDERER));
printf("Version=%s\n",glGetString(GL_VERSION));
printf("GL_extensions=%s\n",glGetString(GL_EXTENSIONS));
wglDeleteContext(hglrc);
Hope that helps a bit. http://www.opengl.org/discussion_boards/ubb/smile.gif

Suvcon
01-14-2001, 06:43 AM
thank you so much,why can't i find the way by self?this is a question. http://www.opengl.org/discussion_boards/ubb/wink.gif

thank your help again.

j
01-14-2001, 06:46 AM
In the flags section of the Pixel Format Descriptor given by windows, there are two flags that you can use to find out if it is accelerated. If neither of PFD_GENERIC_ACCELERATED or PFD_GENERIC_FORMAT is set, then it is fully accelerated (ICD). If only GPD_GENERIC_ACCELERATED is set, then it is partialy accelerated (MCD). Anything else, and it is software.

j