Jump to content
  • Advertisement
Sign in to follow this  
DrDerekDoctors

OpenGL Determining whether texture combiners available.

This topic is 4830 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there, I currently use this snippet of code: glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_PRIMARY_COLOR); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA, GL_PRIMARY_COLOR); In order to draw one texture while using the alpha channel from another one. However this is obviously something which only works in OpenGL 1.3 onwards and even then only on some cards. To find out whether the computer the code is running on can deal with this I figure I need to look through the output of glGetString(GL_EXTENSIONS) (I hope?!). So is it just the presence of "GL_ARB_texture_env_combine" and "GL_ARB_multitexture" that I have to check for or are there other extensions I need to check for? Or am I simply going about checking in a completely arse-about-face way? I expect this is probably something really simple and obvious, but as I just got into OpenGL fairly recently I'm not sure really how you go about checking for the availability of advanced extension and features. Thanks in advance,

Share this post


Link to post
Share on other sites
Advertisement
I would sggest using GLEE or similar library for doing this as it would ease the process for you up a lot. However if you want roll your own, best reference is the opengl extension registry.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!