From e61f0050516cf96e0e2e24c05254187cd6c5ed4b Mon Sep 17 00:00:00 2001 From: Ioannis Tsakpinis Date: Fri, 7 May 2010 17:03:36 +0000 Subject: [PATCH] Fix for OpenAL debug builds. Added alternate methods for NV_fence. --- src/java/org/lwjgl/util/generator/Utils.java | 4 ++++ src/templates/org/lwjgl/opengl/NV_fence.java | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/java/org/lwjgl/util/generator/Utils.java b/src/java/org/lwjgl/util/generator/Utils.java index 63f6bf3d..34066f05 100644 --- a/src/java/org/lwjgl/util/generator/Utils.java +++ b/src/java/org/lwjgl/util/generator/Utils.java @@ -166,7 +166,9 @@ public class Utils { return null; } + // DISABLED: We always generate indirect methods. (affects OpenAL only at the time of this change) public static boolean isMethodIndirect(boolean generate_error_checks, boolean context_specific, MethodDeclaration method) { + /* for (ParameterDeclaration param : method.getParameters()) { if (isAddressableType(param.getType()) || getParameterAutoAnnotation(param) != null || param.getAnnotation(Constant.class) != null) @@ -176,6 +178,8 @@ public class Utils { method.getAnnotation(CachedResult.class) != null || (generate_error_checks && method.getAnnotation(NoErrorCheck.class) == null) || context_specific; + */ + return true; } public static String getNativeQualifiedName(String qualified_name) { diff --git a/src/templates/org/lwjgl/opengl/NV_fence.java b/src/templates/org/lwjgl/opengl/NV_fence.java index 6822f700..a5a5e89d 100644 --- a/src/templates/org/lwjgl/opengl/NV_fence.java +++ b/src/templates/org/lwjgl/opengl/NV_fence.java @@ -42,8 +42,15 @@ public interface NV_fence { void glGenFencesNV(@AutoSize("piFences") @GLsizei int n, @OutParameter @GLuint IntBuffer piFences); + @Alternate("glGenFencesNV") + @GLreturn("piFences") + void glGenFencesNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer piFences); + void glDeleteFencesNV(@AutoSize("piFences") @GLsizei int n, @Const @GLuint IntBuffer piFences); + @Alternate("glDeleteFencesNV") + void glDeleteFencesNV(@Constant("1") @GLsizei int n, @Const @GLuint @Constant(value = "APIUtils.getBufferInt().put(0, fence), 0", keepParam = true) int fence); + void glSetFenceNV(@GLuint int fence, @GLenum int condition); boolean glTestFenceNV(@GLuint int fence);