Hello,
I’m experimenting with cg and jogl and started by running the included cg demo. My question is, what is this demo supposed to display?
Here’s what I get, when running cgGL_vertex_example I get the output listed at the end of this post, and the frame that opens just displays a black scene.
When I run runtime_ogl_vertex_fragment there is no output, and I see a completely black sphere (not shaded) against a grey background. I think it’s a sphere because by looking at the edges it appears to be rotating, but I can’t tell for sure since it’s not shaded at all.
I am using jogl 1.1.1
I have an NVIDIA GeForce 7600 GS
I’m assuming this isn’t what the demos are supposed to look like. Any advice on figuring out what’s wrong? CG should be compatible with my 3d card because I have been able to run a program written in c++ that uses cg shaders.
I haven’t seen any discussion or screenshots for this demo online or in the documentation so I would really appreciate your help. If anything just a screenshot or description of what the demos are supposed to look like.
Thanks.
Output for cgGL_vertex_example:
LAST LISTING----null----
---- PROGRAM BEGIN ----
!!VP1.1
cgc version 2.1.0016, build date Nov 20 2008
command line args: -q -profile vp20 -entry main
#vendor NVIDIA Corporation
#version 2.1.0.16
#profile vp20
#program main
#semantic main.Kd
#semantic main.ModelViewProj
#var float4 IN.position : $vin.POSITION : ATTR0 : 0 : 1
#var float3 IN.normal : $vin.NORMAL : : 0 : 0
#var float3 IN.color : $vin.DIFFUSE : : 0 : 0
#var float3 IN.TestColor : $vin.SPECULAR : ATTR4 : 0 : 1
#var float4 Kd : : c[4] : 1 : 1
#var float4x4 ModelViewProj : : c[0], 4 : 2 : 1
#var float4 main.HPOS : $vout.POSITION : HPOS : -1 : 1
#var float4 main.COL0 : $vout.COLOR0 : COL0 : -1 : 1
#const c[5] = 1
MUL o[COL0].xyz, v[4], c[4];
DP4 o[HPOS].w, v[0], c[3];
DP4 o[HPOS].z, v[0], c[2];
DP4 o[HPOS].y, v[0], c[1];
DP4 o[HPOS].x, v[0], c[0];
MOV o[COL0].w, c[5].x;
END
6 instructions, 0 R-regs
---- PROGRAM END ----