mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
Completed GL 2.0
This commit is contained in:
parent
73552e3d51
commit
2227e83ea4
4 changed files with 475 additions and 52 deletions
|
|
@ -125,20 +125,29 @@ public final class GL14 {
|
|||
}
|
||||
|
||||
private static native void nglMultiDrawArrays(int mode, IntBuffer piFirst, int piFirst_offset, IntBuffer piCount, int piCount_offset, int primcount);
|
||||
/* public static native void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount);*/
|
||||
/*public static native void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount);*/
|
||||
|
||||
public static native void glPointParameteri(int pname, int param);
|
||||
public static native void glPointParameterf(int pname, float param);
|
||||
|
||||
// ---------------------------
|
||||
public static void glPointParameter(int pname, IntBuffer params) {
|
||||
BufferChecks.checkBuffer(params);
|
||||
nglPointParameteriv(pname, params, params.position());
|
||||
}
|
||||
private static native void nglPointParameteriv(int pname, IntBuffer params, int params_offset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glPointParameter(int pname, FloatBuffer params) {
|
||||
BufferChecks.checkBuffer(params);
|
||||
nglPointParameterfv(pname, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglPointParameterfv(int pname, FloatBuffer params, int params_offset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glSecondaryColor3b(byte red, byte green, byte blue);
|
||||
|
||||
public static native void glSecondaryColor3f(float red, float green, float blue);
|
||||
|
||||
public static native void glSecondaryColor3ub(byte red, byte green, byte blue);
|
||||
|
||||
public static void glSecondaryColorPointer(int size, boolean unsigned, int stride, ByteBuffer data) {
|
||||
|
|
@ -152,14 +161,12 @@ public final class GL14 {
|
|||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
nglSecondaryColorPointer(size, GL11.GL_FLOAT, stride, data, data.position() << 2);
|
||||
}
|
||||
|
||||
private static native void nglSecondaryColorPointer(int size, int type, int stride, Buffer data, int data_offset);
|
||||
|
||||
public static void glSecondaryColorPointer(int size, int type, int stride, int buffer_offset) {
|
||||
GLBufferChecks.ensureArrayVBOenabled();
|
||||
nglSecondaryColorPointerVBO(size, type, stride, buffer_offset);
|
||||
}
|
||||
|
||||
private static native void nglSecondaryColorPointerVBO(int size, int type, int stride, int buffer_offset);
|
||||
|
||||
public static native void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha);
|
||||
|
|
|
|||
|
|
@ -34,10 +34,7 @@ package org.lwjgl.opengl;
|
|||
import org.lwjgl.BufferChecks;
|
||||
import org.lwjgl.LWJGLException;
|
||||
|
||||
import java.nio.BufferOverflowException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.*;
|
||||
|
||||
public final class GL20 {
|
||||
|
||||
|
|
@ -46,19 +43,28 @@ public final class GL20 {
|
|||
|
||||
static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ----------------------[ ARB_shading_language_100 ]----------------------
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* Accepted by the <name> parameter of GetString:
|
||||
*/
|
||||
public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ----------------------[ ARB_shader_objects ]----------------------
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> argument of GetHandleARB:
|
||||
* Accepted by the <pname> argument of GetInteger:
|
||||
*/
|
||||
public static final int GL_PROGRAM_OBJECT = 0x8B40;
|
||||
public static final int GL_CURRENT_PROGRAM = 0x8B8D;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetObjectParameter{fi}vARB:
|
||||
*/
|
||||
public static final int GL_SHADER_TYPE = 0x8B4E;
|
||||
public static final int GL_SHADER_TYPE = 0x8B4F;
|
||||
public static final int GL_DELETE_STATUS = 0x8B80;
|
||||
public static final int GL_COMPILE_STATUS = 0x8B81;
|
||||
public static final int GL_LINK_STATUS = 0x8B82;
|
||||
|
|
@ -98,8 +104,6 @@ public final class GL20 {
|
|||
public static final int GL_SAMPLER_CUBE = 0x8B60;
|
||||
public static final int GL_SAMPLER_1D_SHADOW = 0x8B61;
|
||||
public static final int GL_SAMPLER_2D_SHADOW = 0x8B62;
|
||||
public static final int GL_SAMPLER_2D_RECT = 0x8B63;
|
||||
public static final int GL_SAMPLER_2D_RECT_SHADOW = 0x8B64;
|
||||
|
||||
// ---------------------------
|
||||
/**
|
||||
|
|
@ -448,6 +452,83 @@ public final class GL20 {
|
|||
IntBuffer length, int lengthOffset, ByteBuffer source, int sourceOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ----------------------[ ARB_vertex_program ]----------------------
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
public static native void glVertexAttrib1s(int index, short x);
|
||||
|
||||
public static native void glVertexAttrib1f(int index, float x);
|
||||
|
||||
public static native void glVertexAttrib2s(int index, short x, short y);
|
||||
|
||||
public static native void glVertexAttrib2f(int index, float x, float y);
|
||||
|
||||
public static native void glVertexAttrib3s(int index, short x, short y, short z);
|
||||
|
||||
public static native void glVertexAttrib3f(int index, float x, float y, float z);
|
||||
|
||||
public static native void glVertexAttrib4s(int index, short x, short y, short z, short w);
|
||||
|
||||
public static native void glVertexAttrib4f(int index, float x, float y, float z, float w);
|
||||
|
||||
public static native void glVertexAttrib4Nub(int index, byte x, byte y, byte z, byte w);
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position());
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, buffer, buffer.position() << 1);
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, FloatBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
nglVertexAttribPointer(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
|
||||
private static native void nglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, Buffer buffer, int bufferOffset);
|
||||
|
||||
// ---------------------------
|
||||
public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, int bufferOffset) {
|
||||
GLBufferChecks.ensureArrayVBOenabled();
|
||||
nglVertexAttribPointerVBO(index, size, type, normalized, stride, bufferOffset);
|
||||
}
|
||||
|
||||
private static native void nglVertexAttribPointerVBO(int index, int size, int type, boolean normalized, int stride, int bufferOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glEnableVertexAttribArray(int index);
|
||||
|
||||
public static native void glDisableVertexAttribArray(int index);
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttrib(int index, int pname, FloatBuffer params) {
|
||||
BufferChecks.checkBuffer(params);
|
||||
nglGetVertexAttribfv(index, pname, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetVertexAttribfv(int index, int pname, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttrib(int index, int pname, IntBuffer params) {
|
||||
BufferChecks.checkBuffer(params);
|
||||
nglGetVertexAttribiv(index, pname, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetVertexAttribiv(int index, int pname, IntBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native ByteBuffer glGetVertexAttribPointer(int index, int pname, int size);
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// ----------------------[ ARB_vertex_shader ]----------------------
|
||||
// -----------------------------------------------------------------
|
||||
|
|
@ -617,6 +698,18 @@ public final class GL20 {
|
|||
*/
|
||||
public static final int GL_COORD_REPLACE = 0x8862;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of PointParameter{if}vARB, and the
|
||||
* <pname> of Get:
|
||||
*/
|
||||
public static final int GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0;
|
||||
|
||||
/*
|
||||
* Accepted by the <param> parameter of PointParameter{if}vARB:
|
||||
*/
|
||||
public static final int GL_LOWER_LEFT = 0x8CA1;
|
||||
public static final int GL_UPPER_LEFT = 0x8CA2;
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// ----------------------[ Two-Sided Stencil ]----------------------
|
||||
// -----------------------------------------------------------------
|
||||
|
|
@ -625,11 +718,23 @@ public final class GL20 {
|
|||
public static final int GL_STENCIL_BACK_FAIL = 0x8801;
|
||||
public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
|
||||
public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
|
||||
public static final int GL_STENCIL_BACK_REF = 0x0000; // TODO: Find this value
|
||||
public static final int GL_STENCIL_BACK_VALUE_MASK = 0x0000; // TODO: Find this value
|
||||
|
||||
public static native void glStencilFuncSeparate(int face, int func, int ref, int mask);
|
||||
public static final int GL_STENCIL_BACK_REF = 0x8CA3;
|
||||
public static final int GL_STENCIL_BACK_VALUE_MASK = 0x8CA4;
|
||||
public static final int GL_STENCIL_BACK_WRITEMASK = 0x8CA5;
|
||||
|
||||
public static native void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass);
|
||||
|
||||
public static native void glStencilFuncSeparate(int face, int func, int ref, int mask);
|
||||
|
||||
public static native void glStencilMaskSeparate(int face, int mask);
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// ----------------------[ EXT_blend_equation_separate ]----------------------
|
||||
// -------------------------------------------------------------
|
||||
|
||||
public static final int GL_BLEND_EQUATION_RGB = 0x8009;
|
||||
public static final int GL_BLEND_EQUATION_ALPHA = 0x883D;
|
||||
|
||||
public static native void glBlendEquationSeparate(int modeRGB, int modeAlpha);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue