コード例 #1
0
ファイル: Checks.java プロジェクト: SilverTiger/lwjgl3
  /** 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;
  }
コード例 #2
0
 /** FloatBuffer version of: {@link #glGetBufferSubData GetBufferSubData} */
 public static void glGetBufferSubData(int target, long offset, FloatBuffer data) {
   nglGetBufferSubData(target, offset, data.remaining() << 2, memAddress(data));
 }
コード例 #3
0
 /** FloatBuffer version of: {@link #glBufferData BufferData} */
 public static void glBufferData(int target, FloatBuffer data, int usage) {
   nglBufferData(target, data.remaining() << 2, memAddress(data), usage);
 }
コード例 #4
0
 /** Alternative version of: {@link #glViewportArrayv ViewportArrayv} */
 public static void glViewportArrayv(int first, FloatBuffer v) {
   nglViewportArrayv(first, v.remaining() >> 2, memAddress(v));
 }