mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation.
This commit is contained in:
parent
28aff73635
commit
925139bc7d
11 changed files with 189 additions and 119 deletions
|
|
@ -47,6 +47,7 @@ import org.lwjgl.LWJGLException;
|
|||
|
||||
final class Win32Display implements DisplayImplementation {
|
||||
private static final int CURSOR_HANDLE_SIZE = 8;
|
||||
private static final int PBUFFER_HANDLE_SIZE = 24;
|
||||
|
||||
public native void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException;
|
||||
public native void destroyWindow();
|
||||
|
|
@ -104,6 +105,27 @@ final class Win32Display implements DisplayImplementation {
|
|||
|
||||
public native void destroyCursor(Object cursorHandle);
|
||||
public native int getPbufferCaps();
|
||||
public native boolean isBufferLost(ByteBuffer handle);
|
||||
public native void makePbufferCurrent(ByteBuffer handle) throws LWJGLException;
|
||||
|
||||
public ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format,
|
||||
IntBuffer pixelFormatCaps,
|
||||
IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException {
|
||||
ByteBuffer handle = BufferUtils.createByteBuffer(PBUFFER_HANDLE_SIZE);
|
||||
nCreatePbuffer(handle, width, height, pixel_format, pixelFormatCaps, pBufferAttribs, shared_pbuffer_handle);
|
||||
return handle;
|
||||
}
|
||||
|
||||
private native void nCreatePbuffer(ByteBuffer handle, int width, int height, PixelFormat pixel_format,
|
||||
IntBuffer pixelFormatCaps,
|
||||
IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException;
|
||||
|
||||
public native void destroyPbuffer(ByteBuffer handle);
|
||||
|
||||
public native void setPbufferAttrib(ByteBuffer handle, int attrib, int value);
|
||||
public native void bindTexImageToPbuffer(ByteBuffer handle, int buffer);
|
||||
public native void releaseTexImageFromPbuffer(ByteBuffer handle, int buffer);
|
||||
|
||||
public boolean openURL(String url) {
|
||||
nOpenURL(url);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue