Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
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"
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.
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.
You might want to keep an eye on this branch https://github.com/void256/nifty-gui/tree/1.4-lwjgl-core-experiment
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 :)
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)
I've just added Core Profile support to the 1.3 branch of Nifty. See this commit here for details: https://github.com/void256/nifty-gui/commit/0cb9a6fc726c05c1e89f8d965cffc38fc0ea0eff
The second part of this blog post on the Nifty Blog: http://nifty-gui.lessvoid.com/archives/505 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 sf.net 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.