Jan

06-27-2003, 04:26 AM

const unsigned char ARBVP[] =

"!!ARBvp1.0\

#\n\

# This is a sample ARB Vertex Program\n\

#\n\

ATTRIB iPos = vertex.position;\

ATTRIB iColor = vertex.color;\

ATTRIB iTex0 = vertex.texcoord[0];\

ATTRIB iTex1 = vertex.texcoord[1];\

ATTRIB iTex2 = vertex.texcoord[2];\

ATTRIB iTex3 = vertex.texcoord[3];\

PARAM mvp[4] = { state.matrix.mvp };\

OUTPUT oPos = result.position;\

OUTPUT oColor = result.color;\

OUTPUT oTex0 = result.texcoord[0];\

OUTPUT oTex1 = result.texcoord[1];\

OUTPUT oTex2 = result.texcoord[2];\

OUTPUT oTex3 = result.texcoord[3];\

# This just does out vertex transform by the modelview projection matrix\n\

DP4 oPos.x, mvp[0], iPos;\

DP4 oPos.y, mvp[1], iPos;\

DP4 oPos.z, mvp[2], iPos;\

DP4 oPos.w, mvp[3], iPos;\

# Write our color out directly\n\

MOV oColor, iColor;\

MOV oTex0, iTex0;\

MOV oTex1, iTex1;\

MOV oTex2, iTex2;\

MOV oTex3, iTex3;\

END";

It does transform the vertices correctly into clip-space, but it seems not to pass the texture-coordinates through.

glProgramStringARB does not return an error, therefore i think it should work. Does anyone see an error here?

Thanks,

Jan.

"!!ARBvp1.0\

#\n\

# This is a sample ARB Vertex Program\n\

#\n\

ATTRIB iPos = vertex.position;\

ATTRIB iColor = vertex.color;\

ATTRIB iTex0 = vertex.texcoord[0];\

ATTRIB iTex1 = vertex.texcoord[1];\

ATTRIB iTex2 = vertex.texcoord[2];\

ATTRIB iTex3 = vertex.texcoord[3];\

PARAM mvp[4] = { state.matrix.mvp };\

OUTPUT oPos = result.position;\

OUTPUT oColor = result.color;\

OUTPUT oTex0 = result.texcoord[0];\

OUTPUT oTex1 = result.texcoord[1];\

OUTPUT oTex2 = result.texcoord[2];\

OUTPUT oTex3 = result.texcoord[3];\

# This just does out vertex transform by the modelview projection matrix\n\

DP4 oPos.x, mvp[0], iPos;\

DP4 oPos.y, mvp[1], iPos;\

DP4 oPos.z, mvp[2], iPos;\

DP4 oPos.w, mvp[3], iPos;\

# Write our color out directly\n\

MOV oColor, iColor;\

MOV oTex0, iTex0;\

MOV oTex1, iTex1;\

MOV oTex2, iTex2;\

MOV oTex3, iTex3;\

END";

It does transform the vertices correctly into clip-space, but it seems not to pass the texture-coordinates through.

glProgramStringARB does not return an error, therefore i think it should work. Does anyone see an error here?

Thanks,

Jan.