How can I use jMonkeyEngine with core profile opengl?


#1

Hello,

I recently got a new laptop with support for opengl and glsl 3.3, but only in core contexts. This means that I can get my own opengl programs working, but when I attempt to use a GLSL330 shader in jMonkeyEngine, I can not do so because jMonkeyEngine seems to, by default, not use a core profile context. How can I configure jMonkeyEngine to use a core profile context, at least for my speific shaders?

Thank you.


#2

I managed to solve the issue via the command line flags MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330, to tell the OpenGl system to pretend jME is doing what I want.


#3

when you use lwjgl3 as back-end and set render as OpenGL 3.2, jME will use core profile for this.


#4
		settings.setRenderer(AppSettings.LWJGL_OPENGL33);

This will set core profile 3.3.