Vector4D GlslProgram :: getAttribute ( int index ) { float buf [4]; glGetVertexAttribfvARB ( index, GL_CURRENT_VERTEX_ATTRIB_ARB, buf ); return Vector4D ( buf [0], buf [1], buf [2], buf [3] ); }
Vector4D GlslProgram :: getAttribute ( const char * name ) { int index = glGetAttribLocationARB ( program, name ); if ( index < 0 ) return Vector4D ( 0, 0, 0, 0 ); float buf [4]; glGetVertexAttribfvARB ( index, GL_CURRENT_VERTEX_ATTRIB_ARB, buf ); return Vector4D ( buf [0], buf [1], buf [2], buf [3] ); }
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetVertexAttribfvARB(JNIEnv *env, jclass clazz, jint index, jint pname, jobject params, jint params_position, jlong function_pointer) { GLfloat *params_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, params)) + params_position; glGetVertexAttribfvARBPROC glGetVertexAttribfvARB = (glGetVertexAttribfvARBPROC)((intptr_t)function_pointer); glGetVertexAttribfvARB(index, pname, params_address); }
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetVertexAttribfvARB__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { glGetVertexAttribfvARBPROC glGetVertexAttribfvARB = (glGetVertexAttribfvARBPROC)tlsGetFunction(1438); intptr_t params = (intptr_t)paramsAddress; UNUSED_PARAM(clazz) glGetVertexAttribfvARB(index, pname, params); }