GLFW.java: add glfwExtensionSupported
This commit is contained in:
1 parent
a0cb1c0789
commit
85563047a8
1 file changed
+7
@@ -17,6 +17,7 @@ import org.lwjgl.*;
|
||||
import org.lwjgl.system.*;
|
||||
import org.lwjgl.system.macosx.*;
|
||||
|
||||
import static org.lwjgl.opengl.GL20.*;
|
||||
import static org.lwjgl.system.APIUtil.*;
|
||||
import static org.lwjgl.system.Checks.*;
|
||||
import static org.lwjgl.system.JNI.*;
|
||||
@@ -1393,4 +1394,10 @@ return false;
|
||||
xpos[0] = mGLFWCursorX;
|
||||
ypos[0] = mGLFWCursorY;
|
||||
}
|
||||
|
||||
public static boolean glfwExtensionSupported(String ext) {
|
||||
//return Arrays.stream(glGetString(GL_EXTENSIONS).split(" ")).anyMatch(ext::equals);
|
||||
// Fast path, but will return true if one has the same prefix
|
||||
return glGetString(GL_EXTENSIONS).contains(ext);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user