const unsigned char VP_Environment[]={...} etc....

hi!
i’m still quite new to OpenGL, could you please tell me what is this:

const unsigned char VP_Environment ={
“!!VP1.1”
“OPTION NV_position_invariant;”
“ADD R0, c[4], -v[OPOS];”
“DP3 R0.w, R0, R0;”
“RSQ R0.w, R0.w;”
“MUL R0, R0, R0.w;”
“ADD o[TEX0].x,R0.x,v[NRML].x;”
“ADD o[TEX0].y,R0.y,v[NRML].y;”
“MOV o[COL0],v[COL0];”
“MOV o[BFC0],v[COL0];”
“END”};

i just took it from advanced forum, and i see many use this kind of transcription to build their own OpenGL shaders…
but do you write your own converters for this, or you use some extensions(?) that just takes whole string array and performs wanted operations?

thx for answering my question…
lol!

[This message has been edited by MickeyMouse (edited 05-22-2002).]

This is a vertex program written for NVIDIA boards. Vertex programs are exposed through an extension (GL_NV_vertex_program IIRC).

thx, no use on my voodoo2 anyway
is there going to be something similar in OpenGL 2?

Originally posted by MickeyMouse:
thx, no use on my voodoo2 anyway
is there going to be something similar in OpenGL 2?

You don’t have to wait until OpenGL 2.0. OpenGL 1.4 will add ARB_vertex_program which will be similar (some would actually argue better).

Actually, OpenGL 2.0 will have way better implementation of so-called vertex programs. You will manipulate a programmable vertex processor through a high-level, platform independent C-like language. This vertex processor will replace the T&L part of the OpenGL pipeline.

Originally posted by kehziah:
Actually, OpenGL 2.0 will have way better implementation of so-called vertex programs. You will manipulate a programmable vertex processor through a high-level, platform independent C-like language. This vertex processor will replace the T&L part of the OpenGL pipeline.

That’s what I get for posting late at night…

I was really trying to compare ARB_vertex_program to NV_vertex_program. You’re absolutely right – OpenGL 2.0 will have a high-level C-like shader language that is definitely more powerful than either OpenGL 1.x extension.

Originally posted by secnuop :
That’s what I get for posting late at night…
No problem . You are right that NVIDIA’s vertex program extension will be promoted to an ARB extension. I was just pointing out that there is better coming in OpenGL 2.0, which IMO people should begin to care about, much more than about these ‘new extensions’ exposed by newer graphics cards. A majority of extensions will soon be obsolete.