Changed BaseReferences to use GL20.GL_MAX_TEXTURE_IMAGE_UNITS when available (GL13.GL_MAX_TEXTURE_UNITS is deprecated).
Catch and log OpenGL errors during context creation, instead of throwing an exception.
This commit is contained in:
parent
47714e4bea
commit
7ef37e9858
|
@ -58,7 +58,10 @@ class BaseReferences {
|
|||
glVertexAttribPointer_buffer = new Buffer[max_vertex_attribs];
|
||||
|
||||
int max_texture_units;
|
||||
if (caps.OpenGL13 || caps.GL_ARB_multitexture) {
|
||||
if (caps.OpenGL20) {
|
||||
GL11.glGetInteger(GL20.GL_MAX_TEXTURE_IMAGE_UNITS, temp);
|
||||
max_texture_units = temp.get(0);
|
||||
} else if (caps.OpenGL13 || caps.GL_ARB_multitexture) {
|
||||
GL11.glGetInteger(GL13.GL_MAX_TEXTURE_UNITS, temp);
|
||||
max_texture_units = temp.get(0);
|
||||
} else
|
||||
|
|
|
@ -881,7 +881,11 @@ public final class Display {
|
|||
|
||||
private static void makeCurrentAndSetSwapInterval() throws LWJGLException {
|
||||
makeCurrent();
|
||||
Util.checkGLError();
|
||||
try {
|
||||
Util.checkGLError();
|
||||
} catch (OpenGLException e) {
|
||||
LWJGLUtil.log("OpenGL error during context creation: " + e.getMessage());
|
||||
}
|
||||
setSwapInterval(swap_interval);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue