PDA

View Full Version : 3Dlabs compiler



V-man
02-19-2004, 02:30 PM
There is something called StandAlone in the 3Dlabs OGL2 SDK.

I was running it like this

StandAlone -i sample.vert
StandAlone -i sample.frag

and it looks like it just outputs something to the console. There are other flags like -c and -h but I don't understand what this does. It compiles and produces what exactly?

Of course, StandAlone uses glslang.dll which you can compile separatly, but there isn't any documentation on what can be done with this.

There is also bison.exe and flex.exe
What are they for?

Zengar
02-19-2004, 07:13 PM
I can only help you with flex and bison http://www.opengl.org/discussion_boards/ubb/smile.gif
google for it if you want to know more :P

V-man
02-21-2004, 08:44 AM
OK on bison and flex.

The only thing that describes standlone.exe is in the readme

"StandAlone.exe uses
this interface to create a version of the compiler that can run outside
the ICD environment."

OK, it's compiler and it prints "stuff" in the console. What's the purpose of this?
Anything interesting can be done with it?

lc_overlord
02-22-2004, 11:28 PM
I can't really tell with this kind of information(the console output would be nice), but it could perhaps be used as a debugger for GLSlang(it's better to do a testcompile here instead of trying to run it in your software).

V-man
02-23-2004, 02:28 PM
I think it can serve more for writing shaders without having access to a GLSL compiler in the ICD.

Here is one output when ran on simple.vert

#### BEGIN COMPILER 0 INFO LOG ####
0:? Sequence
0:3 Function Definition: main( (void)
0:3 Function Parameters:
0:5 Sequence
0:5 move second child to first child (3-component vector of float)
0:5 'color' (varying 3-component vector of float)
0:5 Construct vec3 (const 3-component vector of float)
0:5 1.000000 (const float)
0:5 1.000000 (const float)
0:5 1.000000 (const float)
0:7 move second child to first child (4-component vector of float)
0:7 'gl_Position' (Position 4-component vector of float)
0:7 matrix-times-vector (4-component vector of float)
0:7 'gl_ModelViewProjectionMatrix' (uniform 4X4 matrix of float)
0:7 'gl_Vertex' (attribute 4-component vector of float)

#### END COMPILER 0 INFO LOG ####
#### BEGIN LINKER INFO LOG ####

#### END LINKER INFO LOG ####

and the contents of simple.vert

varying vec3 color;

void main()
{
color = vec3(1.0, 1.0, 1.0);

gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}