Hello Guest

Feature Request

  • 2 Replies
  • 5091 Views
Feature Request
« 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).

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Feature Request
« Reply #1 on: August 10, 2005, 07:38:17 »
Use glGetInteger:

Code: [Select]

        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

Feature Request
« Reply #2 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.