/** * Floating-point version of {@link #stbi_load load}. * * @param filename the file name * @param x outputs the image width in pixels * @param y outputs the image height in pixels * @param comp outputs number of components in image * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br> * <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table> */ public static FloatBuffer stbi_loadf( ByteBuffer filename, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) { if (CHECKS) { checkNT1(filename); checkBuffer(x, 1); checkBuffer(y, 1); checkBuffer(comp, 1); } long __result = nstbi_loadf(memAddress(filename), memAddress(x), memAddress(y), memAddress(comp), req_comp); return memFloatBuffer( __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position())); }
/** * Floating-point version of {@link #stbi_load_from_callbacks load_from_callbacks}. * * @param clbk an {@link STBIIOCallbacks} struct * @param user a pointer to user data * @param x outputs the image width in pixels * @param y outputs the image height in pixels * @param comp outputs number of components in image * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br> * <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table> */ public static FloatBuffer stbi_loadf_from_callbacks( STBIIOCallbacks clbk, long user, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) { if (CHECKS) { checkBuffer(x, 1); checkBuffer(y, 1); checkBuffer(comp, 1); STBIIOCallbacks.validate(clbk.address()); } long __result = nstbi_loadf_from_callbacks( clbk.address(), user, memAddress(x), memAddress(y), memAddress(comp), req_comp); return memFloatBuffer( __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position())); }
/** * Floating-point version of {@link #stbi_load_from_memory load_from_memory}. * * @param buffer the buffer from which to load the image data * @param x outputs the image width in pixels * @param y outputs the image height in pixels * @param comp outputs number of components in image * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br> * <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table> */ public static FloatBuffer stbi_loadf_from_memory( ByteBuffer buffer, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) { if (CHECKS) { checkBuffer(x, 1); checkBuffer(y, 1); checkBuffer(comp, 1); } long __result = nstbi_loadf_from_memory( memAddress(buffer), buffer.remaining(), memAddress(x), memAddress(y), memAddress(comp), req_comp); return memFloatBuffer( __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position())); }
static { IntBuffer offsets = memAllocInt(2); SIZEOF = offsets(memAddress(offsets)); X = offsets.get(0); Y = offsets.get(1); memFree(offsets); }
public static int glGetUniformuiEXT(int program, int location) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer params = stack.callocInt(1); nglGetUniformuivEXT(program, location, memAddress(params)); return params.get(0); } finally { stack.setPointer(stackPointer); } }
/** * Unsigned version of {@link #glGetVertexAttribIivEXT GetVertexAttribIivEXT}. * * @param index the index of the pure integer generic vertex attribute to be modified * @param pname the symbolic name of the vertex attribute parameter to be queried */ public static int glGetVertexAttribIuiEXT(int index, int pname) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer params = stack.callocInt(1); nglGetVertexAttribIuivEXT(index, pname, memAddress(params)); return params.get(0); } finally { stack.setPointer(stackPointer); } }
public static int glGetNextPerfQueryIdINTEL(int queryId) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer nextQueryId = stack.callocInt(1); nglGetNextPerfQueryIdINTEL(queryId, memAddress(nextQueryId)); return nextQueryId.get(0); } finally { stack.setPointer(stackPointer); } }
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); } }
public static int glCreatePerfQueryINTEL(int queryId) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer queryHandle = stack.callocInt(1); nglCreatePerfQueryINTEL(queryId, memAddress(queryHandle)); return queryHandle.get(0); } finally { stack.setPointer(stackPointer); } }
/** * ZLIB client - used by PNG, available for other purposes * * @param buffer */ public static ByteBuffer stbi_zlib_decode_malloc(ByteBuffer buffer) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer outlen = stack.callocInt(1); long __result = nstbi_zlib_decode_malloc(memAddress(buffer), buffer.remaining(), memAddress(outlen)); return memByteBuffer(__result, outlen.get(0)); } finally { stack.setPointer(stackPointer); } }
public static int glGetPerfQueryIdByNameINTEL(CharSequence queryName) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { ByteBuffer queryNameEncoded = stack.ASCII(queryName); IntBuffer queryId = stack.callocInt(1); nglGetPerfQueryIdByNameINTEL(memAddress(queryNameEncoded), memAddress(queryId)); return queryId.get(0); } finally { stack.setPointer(stackPointer); } }
/** * Floating-point version of {@link #stbi_load load}. * * @param filename the file name * @param x outputs the image width in pixels * @param y outputs the image height in pixels * @param comp outputs number of components in image * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br> * <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table> */ public static FloatBuffer stbi_loadf( CharSequence filename, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) { if (CHECKS) { checkBuffer(x, 1); checkBuffer(y, 1); checkBuffer(comp, 1); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { ByteBuffer filenameEncoded = stack.ASCII(filename); long __result = nstbi_loadf( memAddress(filenameEncoded), memAddress(x), memAddress(y), memAddress(comp), req_comp); return memFloatBuffer( __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position())); } finally { stack.setPointer(stackPointer); } }
static { IntBuffer offsets = BufferUtils.createIntBuffer(6); SIZEOF = offsets(memAddress(offsets)); WIDTH = offsets.get(0); HEIGHT = offsets.get(1); REDBITS = offsets.get(2); GREENBITS = offsets.get(3); BLUEBITS = offsets.get(4); REFRESHRATE = offsets.get(5); }
/** * ZLIB client - used by PNG, available for other purposes * * @param buffer * @param initial_size * @param parse_header */ public static ByteBuffer stbi_zlib_decode_malloc_guesssize_headerflag( ByteBuffer buffer, int initial_size, int parse_header) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer outlen = stack.callocInt(1); long __result = nstbi_zlib_decode_malloc_guesssize_headerflag( memAddress(buffer), buffer.remaining(), initial_size, memAddress(outlen), parse_header); return memByteBuffer(__result, outlen.get(0)); } finally { stack.setPointer(stackPointer); } }