Jump to content
  • Advertisement
Sign in to follow this  
LargeJ

OpenGL Enabling operations of the imaging subset stucks the program during drawing

This topic is 2945 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,

I have a problem regarding the OpenGL color table that is part of the imaging subset. I was reading the OpenGL red book and example 8-5 showed me how to use glColorTable, but this example doesn't work at my computer.

By calling glGetString(GL_EXTENSIONS), I saw that GL_ARB_imaging was present in the returned list. By calling glGetError(), GL_NO_ERROR is returned. Also by giving the argument GL_PROXY_COLOR_TABLE to glColorTable and retrieving the width-parameter, everything is supposed to work correctly, because width != 0.

The problem is that when I enable the color table with glEnable(GL_COLOR_TABLE), and draw pixels to the framebuffer by calling glDrawPixels(...) only the outline of the window is drawn and the contents are not drawn. At this point my program stucks, as if it ended in an infinite loop during glDrawPixels(...). Also when I want to use a 2D convolution filter (and possibly the other operations in the imaging subset too), the same problem occurs.

I'm on Windows Vista using VC++ 2010 Express edition and I am using GLUT and GLEW. I guess the problem lies somewhere in GLEW.

Does anyone know how I can solve this problem?

Share this post


Link to post
Share on other sites
Advertisement
As you're aware, not all implementations support the imaging subset, and of those that do they are most likely to support it in software only (unless it's a "professional" quality 3D card you have).

These days if you wanted to do a convolution on the framebuffer you'd use render to texture and a shader instead. It's going to be much faster, much more flexible, and will be supported on a wider range of hardware.

Share this post


Link to post
Share on other sites
Okay, thanks for the tip. My red book is from the year 2006 (explaining openGL version 2.0) and by glancing at a more recent version, I notice that the subject "imaging subset" is completely dissappeared. So I assume the imaging subset is removed (or at least deprecated)?

Share this post


Link to post
Share on other sites
I believe it's deprecated, yes, although I don't have a copy of a more recent spec to hand at the moment.

The "from the horse's mouth" source on not using it is here: http://www.opengl.org/wiki/Common_Mistakes#Color_Index.2C_The_imaging_subset

Share this post


Link to post
Share on other sites
Thanks. But though it's software emulated, do you or somebody knows why enabling operations of the imaging subset lets the program crash? I'm not into shaders yet, so I'm just doubting why the code I have doesn't work.

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!