Nifty-GUI is using deprecated OpenGL functions?

  • Sarge

    Sarge - 2012-12-07

    If I use this kind of lwjgl Display startup:

    val contextAtrributes = new ContextAttribs(3, 2)
    Display.create(new PixelFormat(), contextAtrributes)

    Nifty-GUI fails with exception

    "java.lang.IllegalStateException: Function is not supported"
        at org.lwjgl.BufferChecks.checkFunctionAddress(
        at org.lwjgl.opengl.GL11.glGenLists(
        at de.lessvoid.nifty.renderer.lwjgl.render.font.Font.initDisplayList(

    Is it normal? If it is, is there any way to permit using deprecated functions only within Nifty, but forbid them in my code?
    I'm using lwjgl 2.8.5.

    Last edit: Sarge 2012-12-07
  • void256

    void256 - 2012-12-07

    Nifty does not YET support OpenGL Core Profile when using the native Nifty LWJGL-Renderer. There is not much you can do to work around this, I'm afraid.

    We're already working on it but it might still take a while to get this renderer production ready since we'd like to improve render speed A LOT when switching to Core Profile.

  • void256

    void256 - 2012-12-08

    You might want to keep an eye on this branch

    There is still a lot to do but there was some progress and so far it seems to be quite a LOT faster than the original naive approach. I'll need to blog about all of this some time :)

    Last edit: void256 2012-12-08
  • Sarge

    Sarge - 2012-12-10

    Wow, cool. I'll keep an eye on it.
    (Theoretically, as far as i can understand, using custom shaders might help a lot to get rid of unneeded calculations on GPU)

  • void256

    void256 - 2013-03-21

    I've just added Core Profile support to the 1.3 branch of Nifty. See this commit here for details:

    The second part of this blog post on the Nifty Blog: will go into more details.

    If you want to try it, you'll need a nightly build of Nifty 1.3.3 (should be in the Maven repository at tommorow) and then you can do something like:

    BatchRenderDevice renderDevice = new BatchRenderDevice(
      new LwjglBatchRenderBackendCoreProfile(), 2048, 2048);
    nifty = new Nifty(renderDevice, ...

    The blog post (part 2) will explain that in more detail.

    As always when using Nifty with native LWJGL you'll need to initialize OpenGL Core Profile before you call any of Niftys methods.


Log in to post a comment.