Anyways, I have the Det 40’s installed and all that good stuff, but let’s say I’m using NeHe’s lesson2 code and I want to make my own ARB_vertex_program. What code would I need to add? I searched the board and couldn’t find what I was looking for, and I also can’t seem to find any examples anywhere on the 'net.
You need to use glGetString() to get the extensions string to test that the extension is supported.
Then you need to use wglGetProcAddress() (or glx, or whatever your platform is) to get the extension functions as defined in the extension registry.
You need to Enable() on VERTEX_PROGRAM_ARB.
You need to use GenProgramsARB() to generate program Ids (much like texture Ids), BindProgramARB() to bind a program, ProgramStringARB() to actually send your program to the system (much like TexImage). You do this on the VERTEX_PROGRAM_ARB target.
Use GetString() on PROGRAM_ERROR_STRING_ARB to get the error message if ProgramStringARB() failed.
You need to set up any parameters your program may need with ProgramEnvParameterARB() and ProgramLocalParameterARB().
You need to feed vertex data to the program with VertexAttrib*ARB() (or the array version).
Originally posted by jwatte:
[b]You need to use glGetString() to get the extensions string to test that the extension is supported.
Then you need to use wglGetProcAddress() (or glx, or whatever your platform is) to get the extension functions as defined in the extension registry.
You need to Enable() on VERTEX_PROGRAM_ARB.
You need to use GenProgramsARB() to generate program Ids (much like texture Ids), BindProgramARB() to bind a program, ProgramStringARB() to actually send your program to the system (much like TexImage). You do this on the VERTEX_PROGRAM_ARB target.
Use GetString() on PROGRAM_ERROR_STRING_ARB to get the error message if ProgramStringARB() failed.
You need to set up any parameters your program may need with ProgramEnvParameterARB() and ProgramLocalParameterARB().
You need to feed vertex data to the program with VertexAttrib*ARB() (or the array version).