Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there is any way that I can simple disable the color in OpenGL 1.1? Or can I "grey out" textures in LWJGL?

share|improve this question
Check here… it may help – Savlon Apr 7 '13 at 10:53
You don't want OpenGL 1.1. – API-Beast Apr 7 '13 at 12:57
up vote 4 down vote accepted

In OpenGL 1.1 there is really no way to do this efficiently. You may be able to do something with glCopyTexSubImage2D to a GL_LUMINANCE target texture, but (IIRC) that will sum the colour channels during the copy process so you'll lose a good deal of brightness. Or you could load a second (greyscaled) copy of all your textures and use those instead, at the cost of increased video RAM usage. But just being able to say "give me a greyscale output from this" is something that you won't be able to do.

So you're going to have to move up a little. For example, if you have the imaging subset available you could apply a color matrix which would achieve the greyscaling. Better yet, with a fragment shader it's just a simple dotproduct operation.

All of this begs the question - Why are you restricting yourself to OpenGL 1.1? The last hardware that only supported 1.1 was in 1997 or thereabouts, and shaders have been absolutely ubiquitous for a decade or so. These certainly aren't fancy new features that you'd be taking a risk on; they're mainstream even down to the lowest of low-end.

So this isn't the answer you're looking for but then again neither is OpenGL 1.1 - just move up to a higher version and use it's capabilities.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.