PDA

View Full Version : const unsigned char VP_Environment[]={...} etc....



MickeyMouse
05-22-2002, 01:24 AM
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).]

kehziah
05-22-2002, 01:56 AM
This is a vertex program written for NVIDIA boards. Vertex programs are exposed through an extension (GL_NV_vertex_program IIRC).

MickeyMouse
05-22-2002, 02:38 AM
thx, no use on my voodoo2 anyway http://www.opengl.org/discussion_boards/ubb/smile.gif
is there going to be something similar in OpenGL 2?

secnuop
05-22-2002, 10:23 PM
Originally posted by MickeyMouse:
thx, no use on my voodoo2 anyway http://www.opengl.org/discussion_boards/ubb/smile.gif
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).

kehziah
05-23-2002, 04:26 AM
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.

secnuop
05-23-2002, 06:25 AM
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... http://www.opengl.org/discussion_boards/ubb/smile.gif

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.

kehziah
05-23-2002, 02:38 PM
Originally posted by secnuop :
That's what I get for posting late at night...No problem http://www.opengl.org/discussion_boards/ubb/wink.gif. 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.