Jump to content
  • Advertisement
Sign in to follow this  
Puzzler183

OpenGL The color matrix

This topic is 5086 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

Does anyone have any code which succesfully uses the color matrix when linked with the OpenGL libraries included with MingW or will I have to completely dynamically link with OpenGL? (This one is the make or break for dynamically linking since it would require all of the matrix functions to be linked dynamically which I don't think it possible without doing everything dynamically.)

Share this post


Link to post
Share on other sites
Advertisement
On windows, the standard OpenGL lin is version 1.1 wqhich doesn't support the colour matrix. For any other functionality than basic 1.1 you need to fetch function pointers with wglGetProcAdress. I'd suggest letting an extension loading library like GLEW handle this for you.

Share this post


Link to post
Share on other sites
The color matrix needs no special functions; hence my dilema. I am currently just dynamically linking extensions but I may be forced to dynamically link everything (not terrible, just annoying).

Share this post


Link to post
Share on other sites
If the extensions string doesn't contain "ARB_imaging", then the imaging subset isn't supported. Have you checked this? I don't think ATI supports the imaging subset for example. If the imaging subset is supported, try glGetError.

Anyway, there is no need to dynamically link everything to use a newer OpenGL core version on windows, you just need to make sure the implementation suppotrs the veersion you want by calling glGet and then get function pointers to newer functions than 1.1 with wglGetProcAdress. New constants like GL_COLOR_MATRIX obviously aren't a problem

Share this post


Link to post
Share on other sites
Quote:
Original post by Puzzler183
Probing has indicated to me that it is working; it's just not changing the final rendering... Do I need to enable something?

The word "rendering" makes me think you're trying to render some primitives (lines, triangles, whatever), and expecting the color matrix to modify the rendered colors. The color matrix is for pixel transfers only. That is, glDrawPixels, glTexImage, and so on. It won't do anything for rendered primitives.

Share this post


Link to post
Share on other sites
GameCat, I completely understand extensions. ATI has supported ARB_imaging since at least the 8500's. I was just confused because my book lead me to beleive it was for everything; I suppose I'll try textured primitives instead.

EDIT: Excellent, it works; thanks Brother Bob.

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!