Cg dependencies

5 views
Skip to first unread message

Ray Smith

unread,
Aug 4, 2009, 12:33:57 PM8/4/09
to O3D-discuss
Hello,

I am trying to assess the feasibility of porting o3d to ARM Linux with
OpenGL ES. The (or a) main issue seems to be shaders and Cg. Cg is
currently used to compile the shaders to arbvp1/arbfp1, but a) there
isn't ARB_vertex_program etc extensions for GL ES, and b) there is no
ARM version of Cg. I should be able to use HLSL2GLSL to convert o3d
shaders to GLSL ES, so not having to use Cg. All the associated Cg
will also have to be replaced, but I believe this will be possible.

My question is, is Cg required anywhere else, apart from all things
shader related?

Many thanks for any pointers,

Ray

Antoine Labour

unread,
Aug 4, 2009, 6:14:38 PM8/4/09
to o3d-d...@googlegroups.com

Hi Ray,

Thanks for your interest. We've started looking at the ARM issue at
the high level, and at the same time, would like to have a more open
solution to shader compilation, so a solution removing Cg would be a
good thing possibly.
Cg is only used for shader, and shader-related things. It goes beyond
just compiling shaders though, we also use Cg to iterate through the
uniforms, inspect their properties, etc. which will need to be updated
to gl. Also, I believe GLSL doesn't have a notion of uniform semantics
like HLSL/Cg, which we use to automatically bind useful standard
parameters like the ModelView matrix, so an alternative will need to
be found.

Antoine

Ray Smith

unread,
Aug 5, 2009, 3:57:09 PM8/5/09
to O3D-discuss
On Aug 4, 11:14 pm, Antoine Labour <pi...@google.com> wrote:
Thanks for your reply Antoine. That's good about Cg, I was expecting
it to be more than just shader compilation, but the rest seems
solvable without Cg, although not trivial.
Thanks for pointing out the uniform semantics - I'm not too familiar
with them but if I understand them right it looks like I can do
something about them.
I'll be working on this now, I've just successfully ported Canvas3D to
ARM with OpenGL ES, and attempting o3d is next. I think I started on
the simpler one for sure!

Ray
Reply all
Reply to author
Forward
0 new messages