Update of /cvsroot/csdopenglnet/csdOpenGL/Cg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10308
Modified Files:
demo.cs
Log Message:
now the demo works correct
Index: demo.cs
===================================================================
RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** demo.cs 13 Aug 2004 08:26:43 -0000 1.5
--- demo.cs 13 Aug 2004 08:30:09 -0000 1.6
***************
*** 153,157 ****
for ( v=0; v<nv; ++v ) {
float fv = ((float)v)/((float)(nv-1));
- Console.WriteLine( fv );
for (u=0; u<nu; ++u ) {
float fu= ((float)u) /((float)(nu-1));
--- 153,156 ----
***************
*** 246,267 ****
}
- protected void drawTriangles( uint[] indices ) {
- Debug.Indent();
- Debug.WriteLine( "Entering Demo.drawTriangls(uint[])" );
-
- int i = 0;
- while ( i+8<indices.Length ) {
- glBegin( GL_TRIANGLES );
- glVertex3f( indices[i], indices[i+1], indices[i+2] );
- glVertex3f( indices[i+3], indices[i+4], indices[i+5] );
- glVertex3f( indices[i+6], indices[i+7], indices[i+8] );
- glEnd();
- i+=9;
- }
-
- Debug.WriteLine( "Exiting Demo.drawTriangles(uint[])" );
- Debug.Unindent();
- }
-
protected void ChooseProfiles() {
Debug.Indent();
--- 245,248 ----
***************
*** 320,323 ****
--- 301,305 ----
uint handle ;
uint[] h = new uint[1];
+ int dp=0;
glGenTextures( 1, h );
handle = h[0];
***************
*** 335,348 ****
for ( int j=0; j<res; j++ ) {
if ( (i/32+j/32)%2==0 ) {
! data[i*res+j*4] = 0.7f;
! data[i*res+j*4+1] = 0.7f;
! data[i*res+j*4+2] = 0.7f;
! data[i*res+j*4+3] = 0.7f;
} else {
! data[i*res+j*4] = 0.1f;
! data[i*res+j*4+1] = 0.1f;
! data[i*res+j*4+2] = 0.1f;
! data[i*res+j*4+3] = 0.1f;
}
}
}
--- 317,329 ----
for ( int j=0; j<res; j++ ) {
if ( (i/32+j/32)%2==0 ) {
! data[dp++] = 0.7f;
! data[dp++] = 0.7f;
! data[dp++] = 0.7f;
} else {
! data[dp++] = 0.1f;
! data[dp++] = 0.1f;
! data[dp++] = 0.1f;
}
+ data[dp++] = 0.1f;
}
}
|