mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 14:35:58 +00:00
Linux/win32 changes for 0.6
This commit is contained in:
parent
d4dbc47949
commit
bc33d3ff2b
17 changed files with 627 additions and 457 deletions
|
|
@ -114,14 +114,14 @@ public abstract class Window {
|
|||
*/
|
||||
public final void setTitle(String newTitle) {
|
||||
title = newTitle;
|
||||
nSetTitle();
|
||||
nSetTitle(title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Native implementation of setTitle(). This will read the window's title member
|
||||
* and stash it in the native title of the window.
|
||||
*/
|
||||
private native void nSetTitle();
|
||||
private native void nSetTitle(String title);
|
||||
|
||||
/**
|
||||
* @return true if the user or operating system has asked the window to close
|
||||
|
|
@ -156,13 +156,10 @@ public abstract class Window {
|
|||
*/
|
||||
public final void paint() {
|
||||
dirty = false;
|
||||
swapBuffers();
|
||||
doPaint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Swap the buffers.
|
||||
*/
|
||||
private native void swapBuffers();
|
||||
|
||||
protected abstract void doPaint();
|
||||
|
||||
/**
|
||||
* Create the window.
|
||||
|
|
@ -188,7 +185,6 @@ public abstract class Window {
|
|||
if (!created)
|
||||
return;
|
||||
doDestroy();
|
||||
nDestroy();
|
||||
currentWindow = null;
|
||||
created = false;
|
||||
}
|
||||
|
|
@ -198,10 +194,6 @@ public abstract class Window {
|
|||
*/
|
||||
protected abstract void doDestroy();
|
||||
|
||||
/**
|
||||
* Natively destroy the window
|
||||
*/
|
||||
private native void nDestroy();
|
||||
|
||||
/**
|
||||
* @return the native window handle
|
||||
|
|
|
|||
|
|
@ -133,6 +133,15 @@ public class BaseGL extends Window {
|
|||
protected void doCreate() throws Exception {
|
||||
nCreate(getTitle(), x, y, getWidth(), getHeight(), color, alpha, depth, stencil, fullscreen);
|
||||
}
|
||||
|
||||
protected void doPaint() {
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Swap the buffers.
|
||||
*/
|
||||
private native void swapBuffers();
|
||||
|
||||
/**
|
||||
* Native method to create a windowed GL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue