From 8040e723c607ce0a9fa5a6df1b8039e2e86426c4 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 29 Jul 2004 15:45:45 +0000 Subject: [PATCH] Removed all instances of synchronized, as we're not really multithread safe anyway. It is up to the user of LWJGL to synchronize access to LWJGL --- src/java/org/lwjgl/opengl/Display.java | 4 ++-- src/java/org/lwjgl/opengl/GLContext.java | 2 +- src/java/org/lwjgl/opengl/Pbuffer.java | 12 ++++++------ src/java/org/lwjgl/opengl/VBOTracker.java | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/java/org/lwjgl/opengl/Display.java b/src/java/org/lwjgl/opengl/Display.java index d0df1151..122c558b 100644 --- a/src/java/org/lwjgl/opengl/Display.java +++ b/src/java/org/lwjgl/opengl/Display.java @@ -494,7 +494,7 @@ public final class Display { * Make the Display the current rendering context for GL calls. Also initialize native stubs. * @throws LWJGLException If the context could not be made current */ - public static synchronized void makeCurrent() throws LWJGLException { + public static void makeCurrent() throws LWJGLException { if (!isCreated()) throw new IllegalStateException("No window created to make current"); nMakeCurrent(); @@ -627,7 +627,7 @@ public final class Display { * Destroy the Display. After this call, there will be no current GL rendering context, * regardless of whether the Display was the current rendering context. */ - public static synchronized void destroy() { + public static void destroy() { if (!isCreated()) { return; } diff --git a/src/java/org/lwjgl/opengl/GLContext.java b/src/java/org/lwjgl/opengl/GLContext.java index c6e67555..1a00bf64 100644 --- a/src/java/org/lwjgl/opengl/GLContext.java +++ b/src/java/org/lwjgl/opengl/GLContext.java @@ -229,7 +229,7 @@ public final class GLContext { * the native stubs are unloaded. * @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded */ - public static synchronized void useContext(Object context) throws LWJGLException { + public static void useContext(Object context) throws LWJGLException { if (context == null) { unloadStubs(); if (did_auto_load) diff --git a/src/java/org/lwjgl/opengl/Pbuffer.java b/src/java/org/lwjgl/opengl/Pbuffer.java index a72d7762..fbc98dc3 100644 --- a/src/java/org/lwjgl/opengl/Pbuffer.java +++ b/src/java/org/lwjgl/opengl/Pbuffer.java @@ -248,7 +248,7 @@ public final class Pbuffer { * * @return true if the buffer is lost and destroyed, false if the buffer is valid. */ - public synchronized boolean isBufferLost() { + public boolean isBufferLost() { return nIsBufferLost(handle); } @@ -261,7 +261,7 @@ public final class Pbuffer { * Method to make the Pbuffer context current. All subsequent OpenGL calls will go to this buffer. * @throws LWJGLException if the context could not be made current */ - public synchronized void makeCurrent() throws LWJGLException { + public void makeCurrent() throws LWJGLException { if (display_context != null && display_context != Display.getContext()) throw new IllegalStateException("Cannot make a Pbuffer current after the Display has been destroyed"); nMakeCurrent(handle); @@ -292,7 +292,7 @@ public final class Pbuffer { * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was * the current rendering context or not. */ - public synchronized void destroy() { + public void destroy() { try { makeCurrent(); int error = GL11.glGetError(); @@ -327,7 +327,7 @@ public final class Pbuffer { * @param attrib * @param value */ - public synchronized void setAttrib(int attrib, int value) { + public void setAttrib(int attrib, int value) { nSetAttrib(handle, attrib, value); } @@ -340,7 +340,7 @@ public final class Pbuffer { * * @param buffer */ - public synchronized void bindTexImage(int buffer) { + public void bindTexImage(int buffer) { nBindTexImage(handle, buffer); } @@ -351,7 +351,7 @@ public final class Pbuffer { * * @param buffer */ - public synchronized void releaseTexImage(int buffer) { + public void releaseTexImage(int buffer) { nReleaseTexImage(handle, buffer); } diff --git a/src/java/org/lwjgl/opengl/VBOTracker.java b/src/java/org/lwjgl/opengl/VBOTracker.java index 1e2f07b2..5fbc007c 100644 --- a/src/java/org/lwjgl/opengl/VBOTracker.java +++ b/src/java/org/lwjgl/opengl/VBOTracker.java @@ -70,7 +70,7 @@ class VBOTracker { * VBO tracker. * @param context */ - static synchronized void setCurrent(Object context) { + static void setCurrent(Object context) { if (context == null) { current_tracker = null; return;