PDA

View Full Version : Video initialization



Lionmane
05-25-2005, 09:59 AM
Hi! I'm trying to detect the video card & monitor so that my program can adjust to the computer that's currently running it.

Is there any easy way to do this?

mw

powerpad
05-25-2005, 10:03 AM
depends on the platform ...

on win32 you will use
choosePixelFormat, DescribePixelFormat, GetPixelFormat, SetPixelFormat

to get the hardware capabilities like depth buffer bits, ...

afterwards you can use glGetString..
to obtain information about your gl subsystem

Ehsan Kamrani
05-25-2005, 12:01 PM
This question is like a question about the OpenML implementation.But in OpenGL, why do you want to detect the monitor or graphics card?You set the pixel format with some functions and they find the best pixel format for you and set it--You don't need to know that what they do. You set a resolution like 800*600 and All the graphics monitors can support it.But you can use from the error chceking in your program and ensure that all things are correct.
If you want to use from the extensions, you can query them.
glGet String can get the name of the extensions, vendor, renderer and also version number.
-Ehsan-

Lionmane
05-25-2005, 12:21 PM
What if I want high definition output for hardware that has it & non-high def for hardware without it?

mw

dorbie
05-25-2005, 12:27 PM
There are OS specific APIs to set the video mode, this is not strictly OpenGL but it is related, then when you have your resolution you can create a window and set the pixel format you need.