View Full Version : Looking for GLSL command line compiler. Please help.
01-29-2005, 07:36 AM
I'm kooking for GLSL command line compiler which can compile my shaders on GLSL languages. With options to make or not to make optimization and so on.
I've tried to compile OpenGL Compiler form 3DLabs but with no succes.
01-29-2005, 10:15 AM
Hello, There isn't any GLSL compiler outside the ones those comes with the gfx drivers, because GLSL 'is directly converted' (or ar least, should be directly converted) to specific machine microcodes. You can't compile a GLSL shader to a 'generic' object code file, the best case is convert it to ARB_fp with the NV compiler.
The 3DLabs command line parser/compiler 'only' validate the shader, showing errors related with the language syntaxis and grammar, and builds an intermediate tree, useful for those people that wants transverse it to produce real microcode for a real GL driver.
01-29-2005, 10:17 AM
Check out NVidia's shaderperf tool. I believe it gives you a full dump of the compiled shader, though I'm not sure how many optimization options it has.
01-29-2005, 04:14 PM
Nvidia's Cg compiler can compile GLSL code via the -oglsl command line switch, and you can use -strict to turn off Nvidia's 'extended' GLSL features.
01-29-2005, 09:57 PM
But NVIDIA Cg compiler compiles the code for GeForce cards. And itsn't optimized for ATI hardware.
01-30-2005, 05:38 AM
Just tried CGC.EXE with -oglsl and -profile ps_2_0 for fragment program and -profile vs_2_0 for vertex.
Hmm, in the out put file no headers like
It seems that out file is for D3D rendering system.
I will try to use it
01-30-2005, 05:41 AM
Ohh, just found , I have to use arbvp1 and arbfp1!
Now everything is ok.
01-30-2005, 03:16 PM
Originally posted by Matt Zamborsky:
But NVIDIA Cg compiler compiles the code for GeForce cards. And itsn't optimized for ATI hardware.You can turn off Nvidia optimization with another switch.
01-30-2005, 09:25 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.