LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: aldacron on August 10, 2005, 04:23:19

Title: Feature Request
Post by: aldacron on August 10, 2005, 04:23:19
Adding a getPixelFormat method to the Display class would be a nice convenience. Sometimes it might be desirable to know exactly the format that we are working with rather than the minimum requested (i.e. do I actually have a 24-bit depth buffer instead of the minimum 16-bit I asked for).
Title: Feature Request
Post by: elias on August 10, 2005, 07:38:17
Use glGetInteger:


       int r = GLUtils.getGLInteger(GL11.GL_RED_BITS);
       int g = GLUtils.getGLInteger(GL11.GL_GREEN_BITS);
       int b = GLUtils.getGLInteger(GL11.GL_BLUE_BITS);
       int a = GLUtils.getGLInteger(GL11.GL_ALPHA_BITS);
       int depth = GLUtils.getGLInteger(GL11.GL_DEPTH_BITS);
       int stencil = GLUtils.getGLInteger(GL11.GL_STENCIL_BITS);


- elias
Title: Feature Request
Post by: aldacron on August 10, 2005, 11:19:12
Interesting. I never even considered all of that would be available through the OpenGL API. I've always used GetPixelFormat on Windows, or SDL_GL_GetAttribute through SDL. Thanks for pointing that out.