Archived

This topic is now archived and is closed to further replies.

opengl_coder

check for number of texture units

Recommended Posts

Hello Guys! I use this call to check for number of texture units: int numTexUnits; glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numTexUnits); My problem is that I want do this before I create my main opengl window... If use this call before I initialize my window my program seem to crach??? Any ideas? Thank you! cheers opengl_coder

Share this post


Link to post
Share on other sites
no wonder it fails!

just imagine jou have more than one opengl capable card on your system.
how would opengl tell which one to query?
so you need a valid ogl rendering context for it so there is no way (i know) of telling the tmu''s before the window is up...

mfg Phreak
--
"Input... need input!" - Johnny Five, Short Circuit.

Share this post


Link to post
Share on other sites
I guess you want to do something like enumeration ...
so just create the opengl rendering context, get the information, destroy the rendering context

Share this post


Link to post
Share on other sites

Thank you guts I will do that.
I just want to check what kind of computer I''m
dealing with before I start my main opengl app.

Is there anything else I ought to check for?

Any ideas on how to check
- if the computer has got a stencil buffer ?
- what kind of GPU (GeForce or ATI) ?


Thank you for all your replies!

Share this post


Link to post
Share on other sites
To figure out the Stencil, jusst enumrate the pixelformats.

And ATI/NVidia shoulfnt matter if you check all extensions before you try them, but i bet you can make a good guess by the Vendorname (glgetstring(gl_VENDOR)), or make some dx enumration calls if your in windows

Share this post


Link to post
Share on other sites