Mac OS X: Fixed an issue where pbuffer contexts could not share with the display context.
This commit is contained in:
parent
be343cf334
commit
a9bd41f12e
|
@ -42,8 +42,8 @@ import org.lwjgl.LWJGLException;
|
||||||
final class MacOSXAWTGLCanvasPeerInfo extends MacOSXCanvasPeerInfo {
|
final class MacOSXAWTGLCanvasPeerInfo extends MacOSXCanvasPeerInfo {
|
||||||
private final AWTGLCanvas canvas;
|
private final AWTGLCanvas canvas;
|
||||||
|
|
||||||
public MacOSXAWTGLCanvasPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
|
public MacOSXAWTGLCanvasPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format, boolean support_pbuffer) throws LWJGLException {
|
||||||
super(pixel_format);
|
super(pixel_format, support_pbuffer);
|
||||||
this.canvas = canvas;
|
this.canvas = canvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,11 @@ import org.lwjgl.LWJGLException;
|
||||||
*/
|
*/
|
||||||
final class MacOSXCanvasImplementation implements AWTCanvasImplementation {
|
final class MacOSXCanvasImplementation implements AWTCanvasImplementation {
|
||||||
public PeerInfo createPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
|
public PeerInfo createPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
|
||||||
return new MacOSXAWTGLCanvasPeerInfo(canvas, pixel_format);
|
try {
|
||||||
|
return new MacOSXAWTGLCanvasPeerInfo(canvas, pixel_format, true);
|
||||||
|
} catch (LWJGLException e) {
|
||||||
|
return new MacOSXAWTGLCanvasPeerInfo(canvas, pixel_format, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -45,8 +45,8 @@ import org.lwjgl.LWJGLException;
|
||||||
abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo {
|
abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo {
|
||||||
private final AWTSurfaceLock awt_surface = new AWTSurfaceLock();
|
private final AWTSurfaceLock awt_surface = new AWTSurfaceLock();
|
||||||
|
|
||||||
public MacOSXCanvasPeerInfo(PixelFormat pixel_format) throws LWJGLException {
|
public MacOSXCanvasPeerInfo(PixelFormat pixel_format, boolean support_pbuffer) throws LWJGLException {
|
||||||
super(pixel_format, true, true, false, true);
|
super(pixel_format, true, true, support_pbuffer, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initHandle(Canvas canvas) throws LWJGLException {
|
protected void initHandle(Canvas canvas) throws LWJGLException {
|
||||||
|
|
|
@ -215,7 +215,11 @@ final class MacOSXDisplay implements DisplayImplementation {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PeerInfo createPeerInfo(PixelFormat pixel_format) throws LWJGLException {
|
public PeerInfo createPeerInfo(PixelFormat pixel_format) throws LWJGLException {
|
||||||
return new MacOSXDisplayPeerInfo(pixel_format);
|
try {
|
||||||
|
return new MacOSXDisplayPeerInfo(pixel_format, true);
|
||||||
|
} catch (LWJGLException e) {
|
||||||
|
return new MacOSXDisplayPeerInfo(pixel_format, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static IntBuffer current_viewport = BufferUtils.createIntBuffer(16);
|
private final static IntBuffer current_viewport = BufferUtils.createIntBuffer(16);
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.lwjgl.LWJGLException;
|
||||||
final class MacOSXDisplayPeerInfo extends MacOSXCanvasPeerInfo {
|
final class MacOSXDisplayPeerInfo extends MacOSXCanvasPeerInfo {
|
||||||
private boolean locked = false;
|
private boolean locked = false;
|
||||||
|
|
||||||
public MacOSXDisplayPeerInfo(PixelFormat pixel_format) throws LWJGLException {
|
public MacOSXDisplayPeerInfo(PixelFormat pixel_format, boolean support_pbuffer) throws LWJGLException {
|
||||||
super(pixel_format);
|
super(pixel_format, support_pbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doLockAndInitHandle() throws LWJGLException {
|
protected void doLockAndInitHandle() throws LWJGLException {
|
||||||
|
|
Loading…
Reference in New Issue