Workaround to preserve case when checking availability of APPLE OpenCL extensions.
This commit is contained in:
parent
3ac0b43efd
commit
c17617175b
|
@ -46,4 +46,7 @@ public @interface Extension {
|
|||
String className() default "";
|
||||
boolean isFinal() default true;
|
||||
String postfix();
|
||||
|
||||
/** The extension name as it appears in the extension string. The default is the API prefix followed by the interface name, converted to lower-case. */
|
||||
String nativeName() default "";
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
package org.lwjgl.util.generator.opencl;
|
||||
|
||||
import org.lwjgl.PointerWrapper;
|
||||
import org.lwjgl.util.generator.Extension;
|
||||
import org.lwjgl.util.generator.Private;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
@ -108,7 +109,12 @@ public class CLPDCapabilitiesGenerator {
|
|||
|
||||
final String extName = CLGeneratorProcessorFactory.getExtensionName(t.getSimpleName());
|
||||
|
||||
writer.print("\t\t" + extName + " = extensions.contains(\"" + extName.toLowerCase() + "\")");
|
||||
String nativeName = extName.toLowerCase();
|
||||
Extension ext = t.getAnnotation(Extension.class);
|
||||
if ( ext != null && !ext.nativeName().isEmpty() )
|
||||
nativeName = ext.nativeName();
|
||||
|
||||
writer.print("\t\t" + extName + " = extensions.contains(\"" + nativeName + "\")");
|
||||
if ( !t.getMethods().isEmpty() )
|
||||
writer.print(" && CLCapabilities." + extName);
|
||||
writer.println(";");
|
||||
|
|
|
@ -39,6 +39,7 @@ import java.nio.ByteBuffer;
|
|||
@Private
|
||||
@CLPlatformExtension
|
||||
@CLDeviceExtension
|
||||
@Extension(postfix = "APPLE", nativeName = "cl_APPLE_ContextLoggingFunctions")
|
||||
public interface APPLE_ContextLoggingFunctions {
|
||||
|
||||
@Extern
|
||||
|
|
|
@ -33,6 +33,7 @@ package org.lwjgl.opencl;
|
|||
|
||||
import org.lwjgl.util.generator.Code;
|
||||
import org.lwjgl.util.generator.Constant;
|
||||
import org.lwjgl.util.generator.Extension;
|
||||
import org.lwjgl.util.generator.PointerWrapper;
|
||||
import org.lwjgl.util.generator.opencl.CLDeviceExtension;
|
||||
import org.lwjgl.util.generator.opencl.CLPlatformExtension;
|
||||
|
@ -40,6 +41,7 @@ import org.lwjgl.util.generator.opencl.cl_int;
|
|||
|
||||
@CLPlatformExtension
|
||||
@CLDeviceExtension
|
||||
@Extension(postfix = "APPLE", nativeName = "cl_APPLE_SetMemObjectDestructor")
|
||||
public interface APPLE_SetMemObjectDestructor {
|
||||
|
||||
@Code(
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.nio.ByteBuffer;
|
|||
|
||||
@CLPlatformExtension
|
||||
@CLDeviceExtension
|
||||
@Extension(postfix = "APPLE", className = "APPLEGLSharing")
|
||||
@Extension(postfix = "APPLE", className = "APPLEGLSharing", nativeName = "cl_APPLE_gl_sharing")
|
||||
public interface APPLE_gl_sharing {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue