Win32 part of Display/Window merge

This commit is contained in:
Elias Naur 2004-07-03 10:16:28 +00:00
parent 84110e9c13
commit e59ed5d906
10 changed files with 342 additions and 329 deletions

View file

@ -168,6 +168,8 @@ public final class Display {
*/
private static void createWindow() throws LWJGLException {
nCreateWindow(current_mode, fullscreen);
if (title != null)
nSetTitle(title);
initControls();
}
@ -360,10 +362,9 @@ public final class Display {
* @param newTitle The new window title
*/
public static void setTitle(String newTitle) {
if (!isCreated())
throw new IllegalStateException("Cannot set title on uncreated window");
title = newTitle;
nSetTitle(title);
if (isCreated())
nSetTitle(title);
}
/**
@ -607,11 +608,6 @@ public final class Display {
return context;
}
/**
* Destroy the native window peer.
*/
private static native void nDestroy();
/**
* @return true if the window's native peer has been created
*/

View file

@ -182,11 +182,11 @@ public final class Pbuffer {
this.height = height;
if ( renderTexture == null )
handle = nCreate(width, height, pixel_format, null, 0, null, 0);
handle = nCreate(width, height, pixel_format, null, null);
else
handle = nCreate(width, height, pixel_format,
renderTexture.pixelFormatCaps, renderTexture.pixelFormatCaps.limit(),
renderTexture.pBufferAttribs, renderTexture.pBufferAttribs.limit());
renderTexture.pixelFormatCaps,
renderTexture.pBufferAttribs);
}
/**
@ -230,8 +230,8 @@ public final class Pbuffer {
* Native method to create a Pbuffer
*/
private static native int nCreate(int width, int height, PixelFormat pixel_format,
IntBuffer pixelFormatCaps, int pixelFormatCapsSize,
IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLException;
IntBuffer pixelFormatCaps,
IntBuffer pBufferAttribs) throws LWJGLException;
/**
* Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was