1 /* 2 * Copyright (c) 2002-2008 LWJGL Project 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: 8 * 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * * Neither the name of 'LWJGL' nor the names of 17 * its contributors may be used to endorse or promote products derived 18 * from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 package org.lwjgl.opengl; 33 34 import org.lwjgl.util.generator.*; 35 import org.lwjgl.util.generator.Alternate; 36 import org.lwjgl.util.generator.opengl.*; 37 38 import java.nio.*; 39 40 @Extension(postfix = "ARB", isFinal = false) 41 public interface ARB_program { 42 43 /** Accepted by the <format> parameter of ProgramStringARB: */ 44 int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875; 45 46 /** Accepted by the <pname> parameter of GetProgramivARB: */ 47 int GL_PROGRAM_LENGTH_ARB = 0x8627; 48 int GL_PROGRAM_FORMAT_ARB = 0x8876; 49 int GL_PROGRAM_BINDING_ARB = 0x8677; 50 int GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0; 51 int GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1; 52 int GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2; 53 int GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3; 54 int GL_PROGRAM_TEMPORARIES_ARB = 0x88A4; 55 int GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5; 56 int GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6; 57 int GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7; 58 int GL_PROGRAM_PARAMETERS_ARB = 0x88A8; 59 int GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9; 60 int GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA; 61 int GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB; 62 int GL_PROGRAM_ATTRIBS_ARB = 0x88AC; 63 int GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD; 64 int GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE; 65 int GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF; 66 int GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4; 67 int GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5; 68 int GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6; 69 70 /** Accepted by the <pname> parameter of GetProgramStringARB: */ 71 int GL_PROGRAM_STRING_ARB = 0x8628; 72 73 /** 74 * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 75 * GetFloatv, and GetDoublev: 76 */ 77 int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B; 78 int GL_CURRENT_MATRIX_ARB = 0x8641; 79 int GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7; 80 int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640; 81 int GL_MAX_PROGRAM_MATRICES_ARB = 0x862F; 82 int GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E; 83 84 /** Accepted by the <name> parameter of GetString: */ 85 int GL_PROGRAM_ERROR_STRING_ARB = 0x8874; 86 87 /** Accepted by the <mode> parameter of MatrixMode: */ 88 int GL_MATRIX0_ARB = 0x88C0; 89 int GL_MATRIX1_ARB = 0x88C1; 90 int GL_MATRIX2_ARB = 0x88C2; 91 int GL_MATRIX3_ARB = 0x88C3; 92 int GL_MATRIX4_ARB = 0x88C4; 93 int GL_MATRIX5_ARB = 0x88C5; 94 int GL_MATRIX6_ARB = 0x88C6; 95 int GL_MATRIX7_ARB = 0x88C7; 96 int GL_MATRIX8_ARB = 0x88C8; 97 int GL_MATRIX9_ARB = 0x88C9; 98 int GL_MATRIX10_ARB = 0x88CA; 99 int GL_MATRIX11_ARB = 0x88CB; 100 int GL_MATRIX12_ARB = 0x88CC; 101 int GL_MATRIX13_ARB = 0x88CD; 102 int GL_MATRIX14_ARB = 0x88CE; 103 int GL_MATRIX15_ARB = 0x88CF; 104 int GL_MATRIX16_ARB = 0x88D0; 105 int GL_MATRIX17_ARB = 0x88D1; 106 int GL_MATRIX18_ARB = 0x88D2; 107 int GL_MATRIX19_ARB = 0x88D3; 108 int GL_MATRIX20_ARB = 0x88D4; 109 int GL_MATRIX21_ARB = 0x88D5; 110 int GL_MATRIX22_ARB = 0x88D6; 111 int GL_MATRIX23_ARB = 0x88D7; 112 int GL_MATRIX24_ARB = 0x88D8; 113 int GL_MATRIX25_ARB = 0x88D9; 114 int GL_MATRIX26_ARB = 0x88DA; 115 int GL_MATRIX27_ARB = 0x88DB; 116 int GL_MATRIX28_ARB = 0x88DC; 117 int GL_MATRIX29_ARB = 0x88DD; 118 int GL_MATRIX30_ARB = 0x88DE; 119 int GL_MATRIX31_ARB = 0x88DF; 120 glProgramStringARB(@Lenum int target, @GLenum int format, @AutoSize(R) @GLsizei int length, @Const @GLbyte Buffer string)121 void glProgramStringARB(@GLenum int target, @GLenum int format, @AutoSize("string") @GLsizei int length, @Const @GLbyte Buffer string); 122 123 @Alternate("glProgramStringARB") glProgramStringARB(@Lenum int target, @GLenum int format, @Constant(R) @GLsizei int length, CharSequence string)124 void glProgramStringARB(@GLenum int target, @GLenum int format, @Constant("string.length()") @GLsizei int length, CharSequence string); 125 glBindProgramARB(@Lenum int target, @GLuint int program)126 void glBindProgramARB(@GLenum int target, @GLuint int program); 127 glDeleteProgramsARB(@utoSizeR) @Lsizei int n, @Const @GLuint IntBuffer programs)128 void glDeleteProgramsARB(@AutoSize("programs") @GLsizei int n, @Const @GLuint IntBuffer programs); 129 130 @Alternate("glDeleteProgramsARB") glDeleteProgramsARB(@onstantR) @Lsizei int n, @Constant(value = R, keepParam = true) int program)131 void glDeleteProgramsARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, program)", keepParam = true) int program); 132 glGenProgramsARB(@utoSizeR) @Lsizei int n, @OutParameter @GLuint IntBuffer programs)133 void glGenProgramsARB(@AutoSize("programs") @GLsizei int n, @OutParameter @GLuint IntBuffer programs); 134 135 @Alternate("glGenProgramsARB") 136 @GLreturn("programs") glGenProgramsARB2(@onstantR) @Lsizei int n, @OutParameter @GLuint IntBuffer programs)137 void glGenProgramsARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer programs); 138 glProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w)139 void glProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w); 140 glProgramEnvParameter4dARB(int target, int index, double x, double y, double z, double w)141 void glProgramEnvParameter4dARB(int target, int index, double x, double y, double z, double w); 142 143 @StripPostfix("params") glProgramEnvParameter4fvARB(@Lenum int target, @GLuint int index, @Check(R) @Const FloatBuffer params)144 void glProgramEnvParameter4fvARB(@GLenum int target, @GLuint int index, @Check("4") @Const FloatBuffer params); 145 146 @StripPostfix("params") glProgramEnvParameter4dvARB(@Lenum int target, @GLuint int index, @Check(R) @Const DoubleBuffer params)147 void glProgramEnvParameter4dvARB(@GLenum int target, @GLuint int index, @Check("4") @Const DoubleBuffer params); 148 glProgramLocalParameter4fARB(@Lenum int target, @GLuint int index, float x, float y, float z, float w)149 void glProgramLocalParameter4fARB(@GLenum int target, @GLuint int index, float x, float y, float z, float w); 150 glProgramLocalParameter4dARB(@Lenum int target, @GLuint int index, double x, double y, double z, double w)151 void glProgramLocalParameter4dARB(@GLenum int target, @GLuint int index, double x, double y, double z, double w); 152 153 @StripPostfix("params") glProgramLocalParameter4fvARB(@Lenum int target, @GLuint int index, @Check(R) @Const FloatBuffer params)154 void glProgramLocalParameter4fvARB(@GLenum int target, @GLuint int index, @Check("4") @Const FloatBuffer params); 155 156 @StripPostfix("params") glProgramLocalParameter4dvARB(@Lenum int target, @GLuint int index, @Check(R) @Const DoubleBuffer params)157 void glProgramLocalParameter4dvARB(@GLenum int target, @GLuint int index, @Check("4") @Const DoubleBuffer params); 158 159 @StripPostfix("params") glGetProgramEnvParameterfvARB(@Lenum int target, @GLuint int index, @OutParameter @Check(R) FloatBuffer params)160 void glGetProgramEnvParameterfvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") FloatBuffer params); 161 162 @StripPostfix("params") glGetProgramEnvParameterdvARB(@Lenum int target, @GLuint int index, @OutParameter @Check(R) DoubleBuffer params)163 void glGetProgramEnvParameterdvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") DoubleBuffer params); 164 165 @StripPostfix("params") glGetProgramLocalParameterfvARB(@Lenum int target, @GLuint int index, @OutParameter @Check(R) FloatBuffer params)166 void glGetProgramLocalParameterfvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") FloatBuffer params); 167 168 @StripPostfix("params") glGetProgramLocalParameterdvARB(@Lenum int target, @GLuint int index, @OutParameter @Check(R) DoubleBuffer params)169 void glGetProgramLocalParameterdvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") DoubleBuffer params); 170 171 @StripPostfix("params") glGetProgramivARB(@Lenum int target, @GLenum int parameterName, @OutParameter @Check(R) IntBuffer params)172 void glGetProgramivARB(@GLenum int target, @GLenum int parameterName, @OutParameter @Check("4") IntBuffer params); 173 174 /** @deprecated Will be removed in 3.0. Use {@link #glGetProgramiARB} instead. */ 175 @Alternate("glGetProgramivARB") 176 @GLreturn("params") 177 @StripPostfix("params") 178 @Reuse(value = "ARBProgram", method = "glGetProgramiARB") 179 @Deprecated glGetProgramivARB2(@Lenum int target, @GLenum int parameterName, @OutParameter IntBuffer params)180 void glGetProgramivARB2(@GLenum int target, @GLenum int parameterName, @OutParameter IntBuffer params); 181 182 @Alternate("glGetProgramivARB") 183 @GLreturn("params") 184 @StripPostfix(value = "params", hasPostfix = false) glGetProgramivARB3(@Lenum int target, @GLenum int parameterName, @OutParameter IntBuffer params)185 void glGetProgramivARB3(@GLenum int target, @GLenum int parameterName, @OutParameter IntBuffer params); 186 glGetProgramStringARB(@Lenum int target, @GLenum int parameterName, @OutParameter @Check @GLbyte Buffer paramString)187 void glGetProgramStringARB(@GLenum int target, @GLenum int parameterName, @OutParameter @Check @GLbyte Buffer paramString); 188 189 @Alternate("glGetProgramStringARB") 190 @Code("\t\tint programLength = glGetProgramiARB(target, GL_PROGRAM_LENGTH_ARB);") 191 @GLreturn(value="paramString", maxLength = "programLength", forceMaxLength = true) glGetProgramStringARB2(@Lenum int target, @GLenum int parameterName, @OutParameter @GLchar ByteBuffer paramString)192 void glGetProgramStringARB2(@GLenum int target, @GLenum int parameterName, @OutParameter @GLchar ByteBuffer paramString); 193 glIsProgramARB(@Luint int program)194 boolean glIsProgramARB(@GLuint int program); 195 } 196