/** * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. * * @param ptr the memory space to free */ public static void free(@Nullable @NativeType("void *") IntBuffer ptr) { nfree(memAddressSafe(ptr)); }
/** * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. * * @param ptr the aligned block of memory to free */ public static void aligned_free(@Nullable @NativeType("void *") LongBuffer ptr) { naligned_free(memAddressSafe(ptr)); }
/** * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. * * @param ptr the aligned block of memory to free */ public static void aligned_free(@Nullable @NativeType("void *") FloatBuffer ptr) { naligned_free(memAddressSafe(ptr)); }
/** Unsafe version of {@link #lpszMenuName(ByteBuffer) lpszMenuName}. */ public static void nlpszMenuName(long struct, @Nullable ByteBuffer value) { if (CHECKS) { checkNT2Safe(value); } memPutAddress(struct + WNDCLASSEX.LPSZMENUNAME, memAddressSafe(value)); } /** Unsafe version of {@link #lpszClassName(ByteBuffer) lpszClassName}. */
/** * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. * * @param ptr the memory space to free */ public static void free(@Nullable @NativeType("void *") ShortBuffer ptr) { nfree(memAddressSafe(ptr)); }
/** * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. * * @param ptr the memory space to free */ public static void free(@Nullable @NativeType("void *") FloatBuffer ptr) { nfree(memAddressSafe(ptr)); }
/** * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. * * @param ptr the memory space to free */ public static void free(@Nullable @NativeType("void *") DoubleBuffer ptr) { nfree(memAddressSafe(ptr)); }
/** * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. * * @param ptr the aligned block of memory to free */ public static void aligned_free(@Nullable @NativeType("void *") PointerBuffer ptr) { naligned_free(memAddressSafe(ptr)); }
/** * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. * * @param ptr the allocated memory to free */ public static void je_free(@Nullable @NativeType("void *") ByteBuffer ptr) { nje_free(memAddressSafe(ptr)); }
/** * Confines the cursor to a rectangular area on the screen. If a subsequent cursor position (set by the {@link #SetCursorPos} function or the mouse) lies * outside the rectangle, the system automatically adjusts the position to keep the cursor inside the rectangular area. * * @param rect a pointer to the structure that contains the screen coordinates of the upper-left and lower-right corners of the confining rectangle. If this * parameter is {@code NULL}, the cursor is free to move anywhere on the screen. */ @NativeType("BOOL") public static boolean ClipCursor(@Nullable @NativeType("RECT const *") RECT rect) { return nClipCursor(memAddressSafe(rect)) != 0; }
/** * See {@link VK11#vkDestroySamplerYcbcrConversion DestroySamplerYcbcrConversion}. * * @param device the logical device that destroys the Y’C<sub>B</sub>C<sub>R</sub> conversion. * @param ycbcrConversion the conversion to destroy. * @param pAllocator controls host memory allocation as described in the <a target="_blank" href="https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#memory-allocation">Memory Allocation</a> chapter. */ public static void vkDestroySamplerYcbcrConversionKHR(VkDevice device, @NativeType("VkSamplerYcbcrConversion") long ycbcrConversion, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, memAddressSafe(pAllocator)); }
@NativeType("GLboolean") public static boolean glPointAlongPathNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int startSegment, @NativeType("GLsizei") int numSegments, @NativeType("GLfloat") float distance, @Nullable @NativeType("GLfloat *") FloatBuffer x, @Nullable @NativeType("GLfloat *") FloatBuffer y, @Nullable @NativeType("GLfloat *") FloatBuffer tangentX, @Nullable @NativeType("GLfloat *") FloatBuffer tangentY) { if (CHECKS) { checkSafe(x, 1); checkSafe(y, 1); checkSafe(tangentX, 1); checkSafe(tangentY, 1); } return nglPointAlongPathNV(path, startSegment, numSegments, distance, memAddressSafe(x), memAddressSafe(y), memAddressSafe(tangentX), memAddressSafe(tangentY)); }
public static void glGetProgramPipelineInfoLogEXT(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { if (CHECKS) { checkSafe(length, 1); } nglGetProgramPipelineInfoLogEXT(pipeline, infoLog.remaining(), memAddressSafe(length), memAddress(infoLog)); }
/** <a target="_blank" href="http://docs.gl/es3/glGetShaderInfoLog">Reference Page</a> */ public static void glGetShaderInfoLog(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { if (CHECKS) { checkSafe(length, 1); } nglGetShaderInfoLog(shader, infoLog.remaining(), memAddressSafe(length), memAddress(infoLog)); }
/** * 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)); }
public static void glEGLImageTargetTextureStorageEXT(@NativeType("GLuint") int texture, @NativeType("GLeglImageOES") long image, @Nullable @NativeType("int const *") IntBuffer attrib_list) { if (CHECKS) { check(image); checkNTSafe(attrib_list); } nglEGLImageTargetTextureStorageEXT(texture, image, memAddressSafe(attrib_list)); }
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)); }
/** Array version of: {@link #stb_vorbis_open_filename open_filename} */ @NativeType("stb_vorbis *") public static long stb_vorbis_open_filename(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { if (CHECKS) { checkNT1(filename); check(error, 1); if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } } return nstb_vorbis_open_filename(memAddress(filename), error, memAddressSafe(alloc_buffer)); }
/** Array version of: {@link #vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR} */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, @NativeType("VkPhysicalDeviceSurfaceInfo2KHR const *") VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo, @NativeType("uint32_t *") int[] pSurfaceFormatCount, @Nullable @NativeType("VkSurfaceFormat2KHR *") VkSurfaceFormat2KHR.Buffer pSurfaceFormats) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceFormats2KHR; if (CHECKS) { check(__functionAddress); check(pSurfaceFormatCount, 1); checkSafe(pSurfaceFormats, pSurfaceFormatCount[0]); } return callPPPPI(__functionAddress, physicalDevice.address(), pSurfaceInfo.address(), pSurfaceFormatCount, memAddressSafe(pSurfaceFormats)); }
/** Array version of: {@link #vkCreateSamplerYcbcrConversionKHR CreateSamplerYcbcrConversionKHR} */ @NativeType("VkResult") public static int vkCreateSamplerYcbcrConversionKHR(VkDevice device, @NativeType("VkSamplerYcbcrConversionCreateInfo const *") VkSamplerYcbcrConversionCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSamplerYcbcrConversion *") long[] pYcbcrConversion) { long __functionAddress = device.getCapabilities().vkCreateSamplerYcbcrConversionKHR; if (CHECKS) { check(__functionAddress); check(pYcbcrConversion, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(__functionAddress, device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pYcbcrConversion); }