/** * ASCII encodes the specified strings and ensures space for two additional * buffers filled with the lengths and memory addresses of the encoded * strings, respectively. The lengths are pointer-sized integers and the * memory address buffer starts immediately after the lengths buffer. * * <p> * The encoded buffers must be later freed with * {@link #pointerArrayFree(int, int)}.</p> * * @return the offset to the lengths buffer */ public int pointerArrayParamASCIIp(CharSequence... strings) { int buffersAddress = bufferParam(strings.length << POINTER_SHIFT); int lengthsAddress = bufferParam(strings.length << POINTER_SHIFT); for (int i = 0; i < strings.length; i++) { ByteBuffer buffer = MemoryUtil.memASCII(strings[i]); pointerParam(buffersAddress, i, memAddress(buffer)); pointerParam(lengthsAddress, i, buffer.remaining()); } return buffersAddress; }
/** * Loads pre-compiled shader binaries. * * @param shaders an array of shader handles into which to load pre-compiled shader binaries * @param binaryformat the format of the shader binaries contained in {@code binary} * @param binary an array of bytes containing pre-compiled binary shader code * * @see <a target="_blank" href="http://docs.gl/gl4/glShaderBinary">Reference Page</a> */ public static void glShaderBinary(@NativeType("GLuint const *") IntBuffer shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { nglShaderBinary(shaders.remaining(), memAddress(shaders), binaryformat, memAddress(binary), binary.remaining()); }
/** * Sets the current vertex weights. * * @param weights the vertex weights */ public static void glWeightfvARB(@NativeType("GLfloat *") FloatBuffer weights) { nglWeightfvARB(weights.remaining(), memAddress(weights)); }
/** * Robust version of {@link ARBImaging#glGetSeparableFilter GetSeparableFilter} * * @param target the filter target. Must be:<br><table><tr><td>{@link ARBImaging#GL_SEPARABLE_2D SEPARABLE_2D}</td></tr></table> * @param format the filter data format. One of:<br><table><tr><td>{@link GL11#GL_RED RED}</td><td>{@link GL11#GL_GREEN GREEN}</td><td>{@link GL11#GL_BLUE BLUE}</td><td>{@link GL11#GL_ALPHA ALPHA}</td><td>{@link GL11#GL_RGB RGB}</td><td>{@link GL11#GL_RGBA RGBA}</td><td>{@link GL12#GL_BGR BGR}</td><td>{@link GL12#GL_BGRA BGRA}</td><td>{@link GL11#GL_LUMINANCE LUMINANCE}</td><td>{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}</td></tr></table> * @param type the filter data type. One of:<br><table><tr><td>{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}</td><td>{@link GL11#GL_BYTE BYTE}</td><td>{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}</td><td>{@link GL11#GL_SHORT SHORT}</td></tr><tr><td>{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}</td><td>{@link GL11#GL_INT INT}</td><td>{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}</td><td>{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}</td></tr><tr><td>{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}</td><td>{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}</td><td>{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}</td><td>{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}</td></tr><tr><td>{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}</td><td>{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}</td><td>{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}</td><td>{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}</td></tr><tr><td>{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}</td><td>{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}</td></tr></table> * @param row a buffer in which to return the filter row * @param column a buffer in which to return the filter column */ public static void glGetnSeparableFilterARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer row, @NativeType("void *") ByteBuffer column, @Nullable @NativeType("void *") ByteBuffer span) { nglGetnSeparableFilterARB(target, format, type, row.remaining(), memAddress(row), column.remaining(), memAddress(column), memAddressSafe(span)); }
@NativeType("void") public static int glGenSemaphoresEXT() { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer semaphores = stack.callocInt(1); nglGenSemaphoresEXT(1, memAddress(semaphores)); return semaphores.get(0); } finally { stack.setPointer(stackPointer); } }
@NativeType("bool") public static boolean VRChaperoneSetup_ExportLiveToBuffer(@Nullable @NativeType("char *") ByteBuffer pBuffer, @NativeType("uint32_t *") IntBuffer pnBufferLength) { if (CHECKS) { check(pnBufferLength, 1); checkSafe(pBuffer, pnBufferLength.get(pnBufferLength.position())); } return nVRChaperoneSetup_ExportLiveToBuffer(memAddressSafe(pBuffer), memAddress(pnBufferLength)); }
/** * Deletes named buffer objects. * * @param buffers an array of buffer objects to be deleted * * @see <a target="_blank" href="http://docs.gl/gl4/glDeleteBuffers">Reference Page</a> */ public static void glDeleteBuffers(@NativeType("GLuint const *") IntBuffer buffers) { nglDeleteBuffers(buffers.remaining(), memAddress(buffers)); }
public static void glGetProgramResourcefvNV(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") IntBuffer props, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLfloat *") FloatBuffer params) { if (CHECKS) { checkSafe(length, 1); } nglGetProgramResourcefvNV(program, programInterface, index, props.remaining(), memAddress(props), params.remaining(), memAddressSafe(length), memAddress(params)); }
public static void glGetPerfMonitorCounterDataAMD(@NativeType("GLuint") int monitor, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer data, @Nullable @NativeType("GLint *") IntBuffer bytesWritten) { if (CHECKS) { checkSafe(bytesWritten, 1); } nglGetPerfMonitorCounterDataAMD(monitor, pname, data.remaining(), memAddress(data), memAddressSafe(bytesWritten)); }
/** * UTF16 encodes the specified strings and ensures space for two additional * buffers filled with the lengths and memory addresses of the encoded * strings, respectively. The lengths are 4-bytes integers and the memory * address buffer starts immediately after the lengths buffer. * * <p> * The encoded buffers must be later freed with * {@link #pointerArrayFree(int, int)}.</p> * * @return the offset to the lengths buffer */ public int pointerArrayParamUTF16i(CharSequence... strings) { int buffersAddress = bufferParam(strings.length << POINTER_SHIFT); int lengthsAddress = bufferParam(strings.length << 2); for (int i = 0; i < strings.length; i++) { ByteBuffer buffer = MemoryUtil.memUTF16(strings[i]); pointerParam(buffersAddress, i, memAddress(buffer)); intParam(lengthsAddress, i, buffer.remaining()); } return buffersAddress; }
public static void glGetTransformFeedbackVaryingEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { if (CHECKS) { checkSafe(length, 1); check(size, 1); check(type, 1); } nglGetTransformFeedbackVaryingEXT(program, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); }
/** Requests a number of effect slots. */ @NativeType("ALvoid") public static int alGenAuxiliaryEffectSlots() { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer effectSlots = stack.callocInt(1); nalGenAuxiliaryEffectSlots(1, memAddress(effectSlots)); return effectSlots.get(0); } finally { stack.setPointer(stackPointer); } }
/** * Sets the current matrix indices. * * @param indices the matrix index values */ public static void glMatrixIndexuivARB(@NativeType("GLuint *") IntBuffer indices) { nglMatrixIndexuivARB(indices.remaining(), memAddress(indices)); }
/** Unsafe version of {@link #v(FloatBuffer) v}. */ public static void nv(long struct, FloatBuffer value) { if (CHECKS) { checkGT(value, 4); } memCopy(memAddress(value), struct + HmdVector4.V, value.remaining() * 4); } /** Unsafe version of {@link #v(int, float) v}. */
/** * ASCII encodes the specified strings and ensures space for two additional * buffers filled with the lengths and memory addresses of the encoded * strings, respectively. The lengths are 4-bytes integers and the memory * address buffer starts immediately after the lengths buffer. * * <p> * The encoded buffers must be later freed with * {@link #pointerArrayFree(int, int)}.</p> * * @return the offset to the lengths buffer */ public int pointerArrayParamASCIIi(CharSequence... strings) { int buffersAddress = bufferParam(strings.length << POINTER_SHIFT); int lengthsAddress = bufferParam(strings.length << 2); for (int i = 0; i < strings.length; i++) { ByteBuffer buffer = MemoryUtil.memASCII(strings[i]); pointerParam(buffersAddress, i, memAddress(buffer)); intParam(lengthsAddress, i, buffer.remaining()); } return buffersAddress; }
@NativeType("void") public static int glGenProgramPipelinesEXT() { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer pipelines = stack.callocInt(1); nglGenProgramPipelinesEXT(1, memAddress(pipelines)); return pipelines.get(0); } finally { stack.setPointer(stackPointer); } }
/** * Deletes program pipeline objects. * * @param pipelines an array of names of program pipeline objects to delete * * @see <a target="_blank" href="http://docs.gl/gl4/glDeleteProgramPipelines">Reference Page</a> */ public static void glDeleteProgramPipelines(@NativeType("GLuint const *") IntBuffer pipelines) { nglDeleteProgramPipelines(pipelines.remaining(), memAddress(pipelines)); }
/** Unsafe version of {@link #color(FloatBuffer) color}. */ public static void ncolor(long struct, FloatBuffer value) { if (CHECKS) { checkGT(value, 4); } memCopy(memAddress(value), struct + VkDebugUtilsLabelEXT.COLOR, value.remaining() * 4); } /** Unsafe version of {@link #color(int, float) color}. */
/** * UTF8 encodes the specified strings and ensures space for two additional * buffers filled with the lengths and memory addresses of the encoded * strings, respectively. The lengths are pointer-sized integers and the * memory address buffer starts immediately after the lengths buffer. * * <p> * The encoded buffers must be later freed with * {@link #pointerArrayFree(int, int)}.</p> * * @return the offset to the lengths buffer */ public int pointerArrayParamUTF8p(CharSequence... strings) { int buffersAddress = bufferParam(strings.length << POINTER_SHIFT); int lengthsAddress = bufferParam(strings.length << POINTER_SHIFT); for (int i = 0; i < strings.length; i++) { ByteBuffer buffer = MemoryUtil.memUTF8(strings[i]); pointerParam(buffersAddress, i, memAddress(buffer)); pointerParam(lengthsAddress, i, buffer.remaining()); } return buffersAddress; }
@NativeType("void") public static int glGetFirstPerfQueryIdINTEL() { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer queryId = stack.callocInt(1); nglGetFirstPerfQueryIdINTEL(memAddress(queryId)); return queryId.get(0); } finally { stack.setPointer(stackPointer); } }