mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
Move getPbufferCaps to DisplayImplementation. Mac OS X pbuffer support
This commit is contained in:
parent
c307e9a13e
commit
9ec94cb364
10 changed files with 182 additions and 43 deletions
|
|
@ -234,4 +234,7 @@ public interface DisplayImplementation {
|
|||
public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException;
|
||||
|
||||
public void destroyCursor(Object cursor_handle);
|
||||
|
||||
/* Pbuffer caps */
|
||||
public int getPbufferCaps();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,4 +102,5 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
}
|
||||
|
||||
public native void destroyCursor(Object cursorHandle);
|
||||
public native int getPbufferCaps();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -376,6 +376,10 @@ final class MacOSXDisplay implements DisplayImplementation {
|
|||
public void destroyCursor(Object cursor_handle) {
|
||||
}
|
||||
|
||||
public int getPbufferCaps() {
|
||||
return GL11.glGetString(GL11.GL_EXTENSIONS).indexOf("GL_APPLE_pixel_buffer") != -1 ? Pbuffer.PBUFFER_SUPPORTED : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class captures com.apple.eawt.ApplicationEvents through reflection
|
||||
* to enable compilation on other platforms than Mac OS X
|
||||
|
|
|
|||
|
|
@ -236,7 +236,9 @@ public final class Pbuffer {
|
|||
*
|
||||
* @return a bitmask of Pbuffer capabilities.
|
||||
*/
|
||||
public static native int getPbufferCaps();
|
||||
public static int getPbufferCaps() {
|
||||
return Display.getImplementation().getPbufferCaps();
|
||||
}
|
||||
|
||||
/**
|
||||
* Native method to create a Pbuffer
|
||||
|
|
|
|||
|
|
@ -102,4 +102,5 @@ final class Win32Display implements DisplayImplementation {
|
|||
}
|
||||
|
||||
public native void destroyCursor(Object cursorHandle);
|
||||
public native int getPbufferCaps();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue