• Advertisement

Archived

This topic is now archived and is closed to further replies.

triangle_fan with CG shaders

This topic is 5210 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I m trying to use Cg with OpenGL API. But even the simplest Vertex shader which does nothing void VertexProgram( in float4 position : POSITION, in float4 color : COLOR0, in float2 texCoord0 : TEXCOORD0, out float4 positionO : POSITION, out float4 colorO : COLOR0, out float2 texCoordO0 : TEXCOORD0, const uniform float4x4 ModelViewMatrix ) { positionO = mul(position, ModelViewMatrix); texCoordO0 = texCoord0; colorO = color; } isn''t working. is it because we are using GL_TRIANGLE_FAN? we r referring NEHE lesson47. the screen just shows black color. please help. Keep Smiling!

Share this post


Link to post
Share on other sites
Advertisement
Post your code please.



"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

Share this post


Link to post
Share on other sites
mul(position, ModelViewMatrix) should be mul(ModelViewMatrix, position).

Enigma

Share this post


Link to post
Share on other sites

  • Advertisement