/** Ensures that the specified FloatBuffer is null-terminated. */ public static FloatBuffer checkNT(FloatBuffer buf) { checkBuffer(buf, 1); if (buf.get(buf.limit() - 1) != 0.0f) throw new IllegalArgumentException("Missing null termination"); return buf; }
/** FloatBuffer version of: {@link #glGetBufferSubData GetBufferSubData} */ public static void glGetBufferSubData(int target, long offset, FloatBuffer data) { nglGetBufferSubData(target, offset, data.remaining() << 2, memAddress(data)); }
/** FloatBuffer version of: {@link #glBufferData BufferData} */ public static void glBufferData(int target, FloatBuffer data, int usage) { nglBufferData(target, data.remaining() << 2, memAddress(data), usage); }
/** Alternative version of: {@link #glViewportArrayv ViewportArrayv} */ public static void glViewportArrayv(int first, FloatBuffer v) { nglViewportArrayv(first, v.remaining() >> 2, memAddress(v)); }