Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added unsafe methods without a function address argument.

  • Loading branch information...
Spasi committed Nov 23, 2013
1 parent e3a52e3 commit 74a8d464ab84dbf24431ef88279c5fe7eac72a4b
Showing with 9,624 additions and 8,240 deletions.
  1. +389 −328 java/org/lwjgl/openal/AL10.java
  2. +119 −98 java/org/lwjgl/openal/AL11.java
  3. +82 −59 java/org/lwjgl/openal/ALC10.java
  4. +24 −17 java/org/lwjgl/openal/ALC11.java
  5. +306 −270 java/org/lwjgl/openal/EXTEfx.java
  6. +30 −12 java/org/lwjgl/openal/SOFTBufferSamples.java
  7. +10 −4 java/org/lwjgl/openal/SOFTBufferSubData.java
  8. +22 −13 java/org/lwjgl/openal/SOFTLoopback.java
  9. +88 −64 java/org/lwjgl/openal/SOFTSourceLatency.java
  10. +35 −22 java/org/lwjgl/opencl/AMDBusAddressableMemory.java
  11. +12 −9 java/org/lwjgl/opencl/APPLEGLSharing.java
  12. +671 −680 java/org/lwjgl/opencl/CL10.java
  13. +105 −87 java/org/lwjgl/opencl/CL10GL.java
  14. +67 −62 java/org/lwjgl/opencl/CL11.java
  15. +157 −138 java/org/lwjgl/opencl/CL12.java
  16. +13 −10 java/org/lwjgl/opencl/CL12GL.java
  17. +154 −104 java/org/lwjgl/opencl/CL20.java
  18. +11 −6 java/org/lwjgl/opencl/KHRGLEvent.java
  19. +12 −9 java/org/lwjgl/opencl/KHRGLSharing.java
  20. +36 −29 java/org/lwjgl/opengl/AMDDebugOutput.java
  21. +27 −33 java/org/lwjgl/opengl/ARBBufferStorage.java
  22. +24 −24 java/org/lwjgl/opengl/ARBClearTexture.java
  23. +306 −284 java/org/lwjgl/opengl/ARBImaging.java
  24. +70 −48 java/org/lwjgl/opengl/ARBMultiBind.java
  25. +24 −21 java/org/lwjgl/opengl/ARBSync.java
  26. +1,984 −1,723 java/org/lwjgl/opengl/GL11.java
  27. +62 −88 java/org/lwjgl/opengl/GL12.java
  28. +356 −286 java/org/lwjgl/opengl/GL13.java
  29. +312 −241 java/org/lwjgl/opengl/GL14.java
  30. +175 −193 java/org/lwjgl/opengl/GL15.java
  31. +703 −589 java/org/lwjgl/opengl/GL20.java
  32. +72 −54 java/org/lwjgl/opengl/GL21.java
  33. +519 −452 java/org/lwjgl/opengl/GL30.java
  34. +102 −112 java/org/lwjgl/opengl/GL31.java
  35. +121 −137 java/org/lwjgl/opengl/GL32.java
  36. +425 −350 java/org/lwjgl/opengl/GL33.java
  37. +356 −308 java/org/lwjgl/opengl/GL40.java
  38. +666 −531 java/org/lwjgl/opengl/GL41.java
  39. +53 −69 java/org/lwjgl/opengl/GL42.java
  40. +282 −264 java/org/lwjgl/opengl/GL43.java
  41. +111 −101 java/org/lwjgl/opengl/GL44.java
  42. +33 −15 java/org/lwjgl/opengl/GLX11.java
  43. +109 −56 java/org/lwjgl/opengl/GLX13.java
  44. +10 −4 java/org/lwjgl/opengl/GLX14.java
  45. +23 −14 java/org/lwjgl/opengl/GLXAMDGPUAssociation.java
  46. +11 −6 java/org/lwjgl/opengl/GLXARBCreateContext.java
  47. +10 −4 java/org/lwjgl/opengl/GLXARBGetProcAddress.java
  48. +11 −6 java/org/lwjgl/opengl/GLXEXTImportContext.java
  49. +11 −6 java/org/lwjgl/opengl/GLXEXTTextureFromPixmap.java
  50. +26 −20 java/org/lwjgl/opengl/GLXSGIVideoSync.java
  51. +44 −22 java/org/lwjgl/opengl/GLXSGIXFBConfig.java
  52. +33 −18 java/org/lwjgl/opengl/GLXSGIXPBuffer.java
  53. +11 −6 java/org/lwjgl/opengl/GLXSGIXSwapBarrier.java
  54. +39 −36 java/org/lwjgl/opengl/WGLAMDGPUAssociation.java
  55. +11 −6 java/org/lwjgl/opengl/WGLARBCreateContext.java
  56. +11 −5 java/org/lwjgl/opengl/WGLARBExtensionsString.java
  57. +22 −12 java/org/lwjgl/opengl/WGLARBPbuffer.java
  58. +35 −24 java/org/lwjgl/opengl/WGLARBPixelFormat.java
  59. +10 −4 java/org/lwjgl/opengl/WGLEXTExtensionsString.java
  60. +24 −16 java/org/lwjgl/opengl/WGLNVDXInterop.java
  61. +47 −31 java/org/lwjgl/opengl/WGLNVGpuAffinity.java

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -116,6 +116,15 @@ static ALC10 create(java.util.Set<String> ext, FunctionProviderLocal provider) {
@JavadocExclude
public static native long nalcOpenDevice(long deviceSpecifier, long __functionAddress);

/** Unsafe version of {@link #alcOpenDevice OpenDevice} */
@JavadocExclude
public static long nalcOpenDevice(long deviceSpecifier) {
long __functionAddress = getInstance().OpenDevice;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcOpenDevice(deviceSpecifier, __functionAddress);
}

/**
* Allows the application to connect to a device.
* <p/>
@@ -125,20 +134,14 @@ static ALC10 create(java.util.Set<String> ext, FunctionProviderLocal provider) {
* @param deviceSpecifier the requested device or device configuration
*/
public static long alcOpenDevice(ByteBuffer deviceSpecifier) {
long __functionAddress = getInstance().OpenDevice;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
if ( deviceSpecifier != null ) checkNT1(deviceSpecifier);
}
return nalcOpenDevice(memAddressSafe(deviceSpecifier), __functionAddress);
return nalcOpenDevice(memAddressSafe(deviceSpecifier));
}

/** CharSequence version of: {@link #alcOpenDevice OpenDevice} */
public static long alcOpenDevice(CharSequence deviceSpecifier) {
long __functionAddress = getInstance().OpenDevice;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcOpenDevice(memAddressSafe(memEncodeUTF8(deviceSpecifier)), __functionAddress);
return nalcOpenDevice(memAddressSafe(memEncodeUTF8(deviceSpecifier)));
}

// --- [ alcCloseDevice ] ---
@@ -170,31 +173,36 @@ public static boolean alcCloseDevice(long deviceHandle) {
@JavadocExclude
public static native long nalcCreateContext(long deviceHandle, long attrList, long __functionAddress);

/** Unsafe version of {@link #alcCreateContext CreateContext} */
@JavadocExclude
public static long nalcCreateContext(long deviceHandle, long attrList) {
long __functionAddress = getInstance().CreateContext;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcCreateContext(deviceHandle, attrList, __functionAddress);
}

/**
* Creates an AL context.
*
* @param deviceHandle a valid device
* @param attrList null or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values. One of:<p/>{@link #ALC_FREQUENCY FREQUENCY}, {@link #ALC_REFRESH REFRESH}, {@link #ALC_SYNC SYNC}, {@link ALC11#ALC_MONO_SOURCES MONO_SOURCES}, {@link ALC11#ALC_STEREO_SOURCES STEREO_SOURCES}
*/
public static long alcCreateContext(long deviceHandle, ByteBuffer attrList) {
long __functionAddress = getInstance().CreateContext;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
checkPointer(deviceHandle);
if ( attrList != null ) checkNT4(attrList);
}
return nalcCreateContext(deviceHandle, memAddressSafe(attrList), __functionAddress);
return nalcCreateContext(deviceHandle, memAddressSafe(attrList));
}

/** Alternative version of: {@link #alcCreateContext CreateContext} */
public static long alcCreateContext(long deviceHandle, IntBuffer attrList) {
long __functionAddress = getInstance().CreateContext;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
checkPointer(deviceHandle);
if ( attrList != null ) checkNT(attrList);
}
return nalcCreateContext(deviceHandle, memAddressSafe(attrList), __functionAddress);
return nalcCreateContext(deviceHandle, memAddressSafe(attrList));
}

// --- [ alcMakeContextCurrent ] ---
@@ -333,6 +341,15 @@ public static long alcGetContextsDevice(long context) {
@JavadocExclude
public static native boolean nalcIsExtensionPresent(long deviceHandle, long extName, long __functionAddress);

/** Unsafe version of {@link #alcIsExtensionPresent IsExtensionPresent} */
@JavadocExclude
public static boolean nalcIsExtensionPresent(long deviceHandle, long extName) {
long __functionAddress = getInstance().IsExtensionPresent;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcIsExtensionPresent(deviceHandle, extName, __functionAddress);
}

/**
* Verifies that a given extension is available for the current context and the device it is associated with.
* <p/>
@@ -343,20 +360,14 @@ public static long alcGetContextsDevice(long context) {
* @param extName the extension name
*/
public static boolean alcIsExtensionPresent(long deviceHandle, ByteBuffer extName) {
long __functionAddress = getInstance().IsExtensionPresent;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
checkNT1(extName);
}
return nalcIsExtensionPresent(deviceHandle, memAddress(extName), __functionAddress);
return nalcIsExtensionPresent(deviceHandle, memAddress(extName));
}

/** CharSequence version of: {@link #alcIsExtensionPresent IsExtensionPresent} */
public static boolean alcIsExtensionPresent(long deviceHandle, CharSequence extName) {
long __functionAddress = getInstance().IsExtensionPresent;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcIsExtensionPresent(deviceHandle, memAddress(memEncodeASCII(extName)), __functionAddress);
return nalcIsExtensionPresent(deviceHandle, memAddress(memEncodeASCII(extName)));
}

// --- [ alcGetProcAddress ] ---
@@ -365,6 +376,15 @@ public static boolean alcIsExtensionPresent(long deviceHandle, CharSequence extN
@JavadocExclude
public static native long nalcGetProcAddress(long deviceHandle, long funcName, long __functionAddress);

/** Unsafe version of {@link #alcGetProcAddress GetProcAddress} */
@JavadocExclude
public static long nalcGetProcAddress(long deviceHandle, long funcName) {
long __functionAddress = getInstance().GetProcAddress;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcGetProcAddress(deviceHandle, funcName, __functionAddress);
}

/**
* Retrieves extension entry points.
* <p/>
@@ -378,20 +398,14 @@ public static boolean alcIsExtensionPresent(long deviceHandle, CharSequence extN
* @param funcName the function name
*/
public static long alcGetProcAddress(long deviceHandle, ByteBuffer funcName) {
long __functionAddress = getInstance().GetProcAddress;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
checkNT1(funcName);
}
return nalcGetProcAddress(deviceHandle, memAddress(funcName), __functionAddress);
return nalcGetProcAddress(deviceHandle, memAddress(funcName));
}

/** CharSequence version of: {@link #alcGetProcAddress GetProcAddress} */
public static long alcGetProcAddress(long deviceHandle, CharSequence funcName) {
long __functionAddress = getInstance().GetProcAddress;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcGetProcAddress(deviceHandle, memAddress(memEncodeASCII(funcName)), __functionAddress);
return nalcGetProcAddress(deviceHandle, memAddress(memEncodeASCII(funcName)));
}

// --- [ alcGetEnumValue ] ---
@@ -400,6 +414,15 @@ public static long alcGetProcAddress(long deviceHandle, CharSequence funcName) {
@JavadocExclude
public static native int nalcGetEnumValue(long deviceHandle, long enumName, long __functionAddress);

/** Unsafe version of {@link #alcGetEnumValue GetEnumValue} */
@JavadocExclude
public static int nalcGetEnumValue(long deviceHandle, long enumName) {
long __functionAddress = getInstance().GetEnumValue;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcGetEnumValue(deviceHandle, enumName, __functionAddress);
}

/**
* Returns extension enum values.
* <p/>
@@ -410,20 +433,14 @@ public static long alcGetProcAddress(long deviceHandle, CharSequence funcName) {
* @param enumName the enum name
*/
public static int alcGetEnumValue(long deviceHandle, ByteBuffer enumName) {
long __functionAddress = getInstance().GetEnumValue;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
checkNT1(enumName);
}
return nalcGetEnumValue(deviceHandle, memAddress(enumName), __functionAddress);
return nalcGetEnumValue(deviceHandle, memAddress(enumName));
}

/** CharSequence version of: {@link #alcGetEnumValue GetEnumValue} */
public static int alcGetEnumValue(long deviceHandle, CharSequence enumName) {
long __functionAddress = getInstance().GetEnumValue;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcGetEnumValue(deviceHandle, memAddress(memEncodeASCII(enumName)), __functionAddress);
return nalcGetEnumValue(deviceHandle, memAddress(memEncodeASCII(enumName)));
}

// --- [ alcGetError ] ---
@@ -457,6 +474,15 @@ public static int alcGetError(long deviceHandle) {
@JavadocExclude
public static native long nalcGetString(long deviceHandle, int token, long __functionAddress);

/** Unsafe version of {@link #alcGetString GetString} */
@JavadocExclude
public static long nalcGetString(long deviceHandle, int token) {
long __functionAddress = getInstance().GetString;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcGetString(deviceHandle, token, __functionAddress);
}

/**
* Obtains string value(s) from ALC.
* <p/>
@@ -466,10 +492,7 @@ public static int alcGetError(long deviceHandle) {
* @param token the information to query. One of:<p/>{@link #ALC_DEFAULT_DEVICE_SPECIFIER DEFAULT_DEVICE_SPECIFIER}, {@link #ALC_DEVICE_SPECIFIER DEVICE_SPECIFIER}, {@link #ALC_EXTENSIONS EXTENSIONS}, {@link ALC11#ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER CAPTURE_DEFAULT_DEVICE_SPECIFIER}, {@link ALC11#ALC_CAPTURE_DEVICE_SPECIFIER CAPTURE_DEVICE_SPECIFIER}
*/
public static String alcGetString(long deviceHandle, int token) {
long __functionAddress = getInstance().GetString;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
long __result = nalcGetString(deviceHandle, token, __functionAddress);
long __result = nalcGetString(deviceHandle, token);
return memDecodeUTF8(memByteBufferNT1(__result));
}

@@ -479,6 +502,15 @@ public static String alcGetString(long deviceHandle, int token) {
@JavadocExclude
public static native void nalcGetIntegerv(long deviceHandle, int token, int size, long dest, long __functionAddress);

/** Unsafe version of {@link #alcGetInteger(long, int, int, ByteBuffer) alcGetInteger} */
@JavadocExclude
public static void nalcGetIntegerv(long deviceHandle, int token, int size, long dest) {
long __functionAddress = getInstance().GetIntegerv;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
nalcGetIntegerv(deviceHandle, token, size, dest, __functionAddress);
}

/**
* Obtains integer value(s) from ALC.
*
@@ -488,30 +520,21 @@ public static String alcGetString(long deviceHandle, int token) {
* @param dest the destination buffer
*/
public static void alcGetInteger(long deviceHandle, int token, int size, ByteBuffer dest) {
long __functionAddress = getInstance().GetIntegerv;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
checkBuffer(dest, size << 2);
}
nalcGetIntegerv(deviceHandle, token, size, memAddress(dest), __functionAddress);
nalcGetIntegerv(deviceHandle, token, size, memAddress(dest));
}

/** Alternative version of: {@link #alcGetInteger(long, int, int, ByteBuffer) alcGetInteger} */
public static void alcGetInteger(long deviceHandle, int token, IntBuffer dest) {
long __functionAddress = getInstance().GetIntegerv;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
nalcGetIntegerv(deviceHandle, token, dest.remaining(), memAddress(dest), __functionAddress);
nalcGetIntegerv(deviceHandle, token, dest.remaining(), memAddress(dest));
}

/** Single return value version of: {@link #alcGetInteger(long, int, int, ByteBuffer) alcGetInteger} */
public static int alcGetInteger(long deviceHandle, int token) {
long __functionAddress = getInstance().GetIntegerv;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
APIBuffer __buffer = apiBuffer();
int dest = __buffer.intParam();
nalcGetIntegerv(deviceHandle, token, 1, __buffer.address() + dest, __functionAddress);
nalcGetIntegerv(deviceHandle, token, 1, __buffer.address() + dest);
return __buffer.intValue(dest);
}

@@ -75,6 +75,15 @@ static ALC11 create(java.util.Set<String> ext, FunctionProviderLocal provider) {
@JavadocExclude
public static native long nalcCaptureOpenDevice(long devicename, int frequency, int format, int buffersize, long __functionAddress);

/** Unsafe version of {@link #alcCaptureOpenDevice CaptureOpenDevice} */
@JavadocExclude
public static long nalcCaptureOpenDevice(long devicename, int frequency, int format, int buffersize) {
long __functionAddress = getInstance().CaptureOpenDevice;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcCaptureOpenDevice(devicename, frequency, format, buffersize, __functionAddress);
}

/**
* Allows the application to connect to a capture device.
* <p/>
@@ -87,20 +96,14 @@ static ALC11 create(java.util.Set<String> ext, FunctionProviderLocal provider) {
* @param buffersize the number of sample frame to buffer in the AL
*/
public static long alcCaptureOpenDevice(ByteBuffer devicename, int frequency, int format, int buffersize) {
long __functionAddress = getInstance().CaptureOpenDevice;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
if ( devicename != null ) checkNT1(devicename);
}
return nalcCaptureOpenDevice(memAddressSafe(devicename), frequency, format, buffersize, __functionAddress);
return nalcCaptureOpenDevice(memAddressSafe(devicename), frequency, format, buffersize);
}

/** CharSequence version of: {@link #alcCaptureOpenDevice CaptureOpenDevice} */
public static long alcCaptureOpenDevice(CharSequence devicename, int frequency, int format, int buffersize) {
long __functionAddress = getInstance().CaptureOpenDevice;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
return nalcCaptureOpenDevice(memAddressSafe(memEncodeUTF8(devicename)), frequency, format, buffersize, __functionAddress);
return nalcCaptureOpenDevice(memAddressSafe(memEncodeUTF8(devicename)), frequency, format, buffersize);
}

// --- [ alcCaptureCloseDevice ] ---
@@ -176,6 +179,15 @@ public static void alcCaptureStop(long device) {
@JavadocExclude
public static native void nalcCaptureSamples(long device, long buffer, int samples, long __functionAddress);

/** Unsafe version of {@link #alcCaptureSamples CaptureSamples} */
@JavadocExclude
public static void nalcCaptureSamples(long device, long buffer, int samples) {
long __functionAddress = getInstance().CaptureSamples;
if ( LWJGLUtil.CHECKS )
checkFunctionAddress(__functionAddress);
nalcCaptureSamples(device, buffer, samples, __functionAddress);
}

/**
* Obtains captured audio samples from the AL.
* <p/>
@@ -186,23 +198,18 @@ public static void alcCaptureStop(long device) {
* @param samples the buffer size
*/
public static void alcCaptureSamples(long device, ByteBuffer buffer, int samples) {
long __functionAddress = getInstance().CaptureSamples;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
checkPointer(device);
checkBuffer(buffer, samples);
}
nalcCaptureSamples(device, memAddress(buffer), samples, __functionAddress);
nalcCaptureSamples(device, memAddress(buffer), samples);
}

/** Alternative version of: {@link #alcCaptureSamples CaptureSamples} */
public static void alcCaptureSamples(long device, ByteBuffer buffer) {
long __functionAddress = getInstance().CaptureSamples;
if ( LWJGLUtil.CHECKS ) {
checkFunctionAddress(__functionAddress);
if ( LWJGLUtil.CHECKS )
checkPointer(device);
}
nalcCaptureSamples(device, memAddress(buffer), buffer.remaining(), __functionAddress);
nalcCaptureSamples(device, memAddress(buffer), buffer.remaining());
}

}
Oops, something went wrong.

0 comments on commit 74a8d46

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.