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
This commit is contained in:
parent
72afa14aa3
commit
8040e723c6
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue