Seeking Reference/Info about VGP

Like everyone and their cousin, I’m studying the MBX light used in the iPhone.

The ‘Chameleon Man’ demo is compelling, and I assume (and am testing) to see if the vertex program used there is generically applicable as a DOT3 lighting method on most models.

What I’m looking for, though, is reference materials and/or tutorials on how to create programs for the VGP compiler in the SDK. Unless I simply walked passed it, I haven’t found much detail in how these programs were created for any of the 3 demos that exemplify it.

Any pointers, links, books or the like would be greatly appreciated…



The specification for GL_IMG_vertex_program can be found in the Documentation folder of our OpenGL 1.1 SDK. It is based on the GL_ARB_vertex_program extension. Are you looking for tutorials on writing vertex program code, or for a generic lighting method?





Note that the iPhone platform doesn’t export GL_IMG_vertex_program.

So no matter what I do, I can’t use a compiled vertex program on the iPhone?

I was looking for tutorials or reference on writing vertex program code, and I think NVidia’s Cg might suffice if I find nothing else, but at the least I’m looking for bump mapping (often called DOT3), as demonstrated in Chameleon man.

Would the method found in the MultiTexture demo, specifically what’s called DOT3, do the same basic thing on the iPhone’s MBX light?



JVene wrote:
So no matter what I do, I can't use a compiled vertex program on the iPhone?

Unfortunately that is the case.



Quote:
I was looking for tutorials or reference on writing vertex program code, and I think NVidia's Cg might suffice if I find nothing else, but at the least I'm looking for bump mapping (often called DOT3), as demonstrated in Chameleon man.Would the method found in the MultiTexture demo, specifically what's called DOT3, do the same basic thing on the iPhone's MBX light?


GL_IMG_vertex_program (and GL_ARB_vertex_program from which it is derived) uses an assembly-like language that is unlike higher level shading languages (such as GLSL, HLSL, or Cg). Of course you can still use shaders written in the latter to learn algorithms.



Bump mapping (normal mapping) generally consists of two steps:

(1) calculating the direction of the light in normal map space, and

(2) evaluating the lighting equation per fragment using a normal sampled from the normal map and the light direction from step 1.



Step 2 can be performed by MBX (Lite) by setting up a texture environment with the GL_DOT3_RGB combiner operation. Step 1 has to be performed by the CPU in case GL_IMG_vertex_program is not supported.

How is the VGP-lite used on the iPhone if GL_IMG_vertex_program is not supported?

Why isn't GL_IMG_vertex_program supported?

What are my animation options?

 

VGP can perform the fixed function vertex processing when vertex programs are not used.





For animations you might be able to use the GL_OES_matrix_palette extension.