You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(79) |
Aug
(69) |
Sep
(120) |
Oct
(17) |
Nov
(7) |
Dec
|
---|
From: Tim R. <ti...@us...> - 2004-08-06 11:42:43
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10447/generator Modified Files: function.cs typedef.cs Log Message: bla Index: typedef.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/typedef.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** typedef.cs 5 Aug 2004 15:50:48 -0000 1.4 --- typedef.cs 6 Aug 2004 11:42:34 -0000 1.5 *************** *** 50,53 **** --- 50,57 ---- tList.Add( "byte", "byte" ); tList.Add( "int", "int" ); + tList.Add( "float", "float" ); + tList.Add( "double", "double" ); + tList.Add( "long", "long" ); + Debug.WriteLine( "Exiting TypeDef.Define(StreamWriter)" ); Index: function.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/function.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** function.cs 5 Aug 2004 15:50:48 -0000 1.3 --- function.cs 6 Aug 2004 11:42:34 -0000 1.4 *************** *** 259,262 **** --- 259,263 ---- ((ParamSet)f.parameters[pos]).type = ((string)baseTypes[i]) + "[]"; list.Add(f); + removeIntPtr( f, pos+1 ); } } |
From: Tim R. <ti...@us...> - 2004-08-06 06:07:35
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29751/GL Modified Files: gl.xml glu.xml glut.xml glxtokens.xml Log Message: namespaces are now set to correct values Index: glu.xml =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/glu.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glu.xml 5 Aug 2004 15:21:24 -0000 1.1 --- glu.xml 6 Aug 2004 06:07:24 -0000 1.2 *************** *** 13,15 **** --- 13,16 ---- <File>gl_8h.xml</File> </TypeDefs> + <Namespace>csDragons.OpenGL</Namespace> </Configuration> \ No newline at end of file Index: gl.xml =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/gl.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gl.xml 5 Aug 2004 15:21:24 -0000 1.1 --- gl.xml 6 Aug 2004 06:07:24 -0000 1.2 *************** *** 12,14 **** --- 12,15 ---- <TypeDefs> </TypeDefs> + <Namespace>csDragons.OpenGL</Namespace> </Configuration> \ No newline at end of file Index: glxtokens.xml =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/glxtokens.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glxtokens.xml 5 Aug 2004 15:21:24 -0000 1.1 --- glxtokens.xml 6 Aug 2004 06:07:24 -0000 1.2 *************** *** 12,14 **** --- 12,15 ---- <TypeDefs> </TypeDefs> + <Namespace>csDragons.OpenGL</Namespace> </Configuration> \ No newline at end of file Index: glut.xml =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/glut.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glut.xml 5 Aug 2004 15:27:02 -0000 1.2 --- glut.xml 6 Aug 2004 06:07:24 -0000 1.3 *************** *** 13,15 **** --- 13,16 ---- <File>gl_8h.xml</File> </TypeDefs> + <Namespace>csDragons.OpenGL</Namespace> </Configuration> \ No newline at end of file |
From: Tim R. <ti...@us...> - 2004-08-06 06:07:35
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29751/generator Modified Files: generator.cs Log Message: namespaces are now set to correct values Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** generator.cs 5 Aug 2004 21:13:56 -0000 1.6 --- generator.cs 6 Aug 2004 06:07:25 -0000 1.7 *************** *** 209,213 **** writer.WriteLine( "" ); ! if (config.Namespace!="") { writer.WriteLine( "" ); writer.Write( "namespace " ); --- 209,213 ---- writer.WriteLine( "" ); ! if (config.Namespace.Trim()!="") { writer.WriteLine( "" ); writer.Write( "namespace " ); *************** *** 237,241 **** writer.WriteLine( "}" ); // class footer ! if (config.Namespace!="") writer.WriteLine( "}" ); writer.WriteLine( config.Footer ); --- 237,241 ---- writer.WriteLine( "}" ); // class footer ! if (config.Namespace.Trim()!="") writer.WriteLine( "}" ); writer.WriteLine( config.Footer ); |
From: Tim R. <ti...@us...> - 2004-08-06 06:02:18
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29274 Added Files: cg.xml cgGL.xml Log Message: --- NEW FILE: cg.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>cg_8h.xml</xmlInput> <linkLibrary>libcsdCg.so</linkLibrary> <className>csdCgBase</className> <upperClass>csDragons.OpenGL.GL</upperClass> <outputFile>csdCgBase.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>false</writeDelegates> <writeDefines>false</writeDefines> <BaseTypes> <Type>CGcontext</Type> <Type>CGprogram</Type> <Type>CGparameter</Type> <Type>CGprofile</Type> <Type>CGenum</Type> <Type>CGerror</Type> <Type>CGGLenum</Type> <Type>CGressource</Type> <Type>CGtype</Type> </BaseTypes> <TypeDefs> </TypeDefs> <IgnoreFunctions> <Function>cgSetErrorCallback</Function> <Function>cgGetErrorCallback</Function> </IgnoreFunctions> <Header>using CGcontext = System.IntPtr;using CGparameter = System.IntPtr;using CGprogram = System.IntPtr;using CGerror = System.IntPtr; </Header> <Footer></Footer> <Namespace>csDragons.OpenGL.Cg</Namespace> </Configuration> --- NEW FILE: cgGL.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>cgGL_8h.xml</xmlInput> <linkLibrary>libcsdCg.so</linkLibrary> <className>csdCgGLBase</className> <upperClass>csdCgBase</upperClass> <outputFile>csdCgGLBase.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>false</writeDelegates> <writeDefines>false</writeDefines> <TypeDefs> <File>cg_8h.xml</File> </TypeDefs> <BaseTypes> <Type>CGcontext</Type> <Type>CGprogram</Type> <Type>CGparameter</Type> <Type>CGprofile</Type> <Type>CGenum</Type> <Type>CGerror</Type> <Type>CGGLenum</Type> <Type>CGressource</Type> <Type>CGtype</Type> </BaseTypes> <TypeDefs> </TypeDefs> <IgnoreFunctions> </IgnoreFunctions> <Header>using CGcontext = System.IntPtr;using CGparameter = System.IntPtr;using CGprogram = System.IntPtr;</Header> <Footer></Footer> <Namespace>csDragons.OpenGL.Cg</Namespace> </Configuration> |
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/Cg Modified Files: Makefile cgEnums.cs cgError.cs cgGLEnum.cs cgProfile.cs cgRessource.cs cgType.cs csdCg.cs Added Files: demo.cs demo_frag.cg demo_vert.cg Log Message: Cg Advanced Index: cgError.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgError.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgError.cs 5 Aug 2004 18:37:58 -0000 1.1 --- cgError.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 3,7 **** namespace Cg { ! enum CgError { CG_NO_ERROR = 0, CG_COMPILER_ERROR, --- 3,7 ---- namespace Cg { ! public enum CGerror { CG_NO_ERROR = 0, CG_COMPILER_ERROR, Index: cgProfile.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgProfile.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgProfile.cs 5 Aug 2004 18:37:58 -0000 1.1 --- cgProfile.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 3,7 **** namespace Cg { ! enum CgProfile { CG_PROFILE_START=6144, CG_PROFILE_UNKNOWN, --- 3,7 ---- namespace Cg { ! public enum CGprofile { CG_PROFILE_START=6144, CG_PROFILE_UNKNOWN, *************** *** 17,20 **** --- 17,27 ---- CG_PROFILE_PS_2_X, + CG_PROFILE_VP20 = 6146, + CG_PROFILE_FP20 = 6147, + CG_PROFILE_VP30 = 6148, + CG_PROFILE_FP30 = 6149, + CG_PROFILE_ARBVP1 = 6150, + CG_PROFILE_ARBFP1 = 7000, + CG_PROFILE_MAX=7100 } --- NEW FILE: demo_frag.cg --- /*********************************************************************NVMH3**** Copyright NVIDIA Corporation 2002 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: ******************************************************************************/ // Utility functions that return the appropriate components from the vector // of lighting coefficients returned by the standard library lighting // funciton, lit(). half diffuse(half4 l) { return l.y; } half specular(half4 l) { return l.z; } // Main shader. half4 main(float3 Peye : TEXCOORD0, half3 Neye : TEXCOORD1, half2 uv : TEXCOORD2, half3 Kd : COLOR0, half3 Ks : COLOR1, uniform sampler2D diffuseMap, uniform float3 Plight, uniform half3 lightColor, uniform half3 shininess) : COLOR { // Normalize surface normal, vector to light source, and vector // to the viewer half3 N = normalize(Neye); half3 L = normalize(Plight - Peye); half3 V = normalize(-Peye); // Compute half-angle vector for specular lighting half3 H = normalize(L + V); // Compute lighting values. lit() returns the diffuse coefficient // in y (or zero, if NdotL < 0), and the specular coefficient in z // (or zero, also if NdotL < 0). half NdotL = dot(N, L), NdotH = dot(N, H); half4 lighting = lit(NdotL, NdotH, shininess); // Compute overall color for the fragment. Scale sum of diffuse // and specular contributions together and by the light color. half3 C = lightColor * (diffuse(lighting) * Kd * (half3)tex2D(diffuseMap, uv).xyz + specular(lighting) * Ks); // Always set the alpha value to 1. return half4(C, 1); } Index: cgEnums.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgEnums.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgEnums.cs 5 Aug 2004 18:37:58 -0000 1.1 --- cgEnums.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 3,7 **** namespace Cg { ! enum CgEnum { CG_UNKNOWN = 4096, CG_IN, --- 3,7 ---- namespace Cg { ! public enum CGenum { CG_UNKNOWN = 4096, CG_IN, Index: cgGLEnum.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgGLEnum.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgGLEnum.cs 5 Aug 2004 18:50:53 -0000 1.1 --- cgGLEnum.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 3,7 **** namespace Cg { ! enum CgGLEnum { CG_GL_MATRIX_IDENTITY = 0, CG_GL_MATRIX_TRANSPOSE = 1, --- 3,7 ---- namespace Cg { ! public enum CGGLenum { CG_GL_MATRIX_IDENTITY = 0, CG_GL_MATRIX_TRANSPOSE = 1, Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 5 Aug 2004 18:50:53 -0000 1.6 --- Makefile 5 Aug 2004 21:13:56 -0000 1.7 *************** *** 13,19 **** all: csdCg.dll ! csdCg.dll: $(FILES) ! $(MCS) -target:library $^ -out:$@ cg_8h.xml: ln -sf ../doxygen/cg_xml/cg_8h.xml . --- 13,28 ---- all: csdCg.dll ! csdCg.dll: $(FILES) csdGL.dll ! $(MCS) -target:library -r:csdGL.dll $(FILES) -out:$@ ! ! csdGL.dll: ! ln -sf ../GL/csdGL.dll ! ! libcsdCg.so: ! ln -sf ../cbonding/libcsdCg.so + libcsdGL.so: + ln -sf ../cbonding/libcsdGL.so + cg_8h.xml: ln -sf ../doxygen/cg_xml/cg_8h.xml . *************** *** 28,36 **** $(GEN) cgGL.xml test: test.exe ! test.exe: test.cs $(FILES) ! $(MCS) test.cs $(FILES) -out:test.exe && ./test.exe ! install: install-gac --- 37,50 ---- $(GEN) cgGL.xml + + demo: demo.exe + + demo.exe: demo.cs csdCg.dll libcsdCg.so libcsdGL.so + $(MCS) -r:csdCg.dll -r:csdGL.dll demo.cs -out:demo.exe + test: test.exe ! test.exe: test.cs $(FILES) ! $(MCS) -r:csdGL.dll test.cs $(FILES) -out:test.exe install: install-gac --- NEW FILE: demo_vert.cg --- /*********************************************************************NVMH3**** Copyright NVIDIA Corporation 2002 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: ******************************************************************************/ void main(float4 Pobject : POSITION, float3 Nobject : NORMAL, float2 TexUV : TEXCOORD0, float3 diffuse : TEXCOORD1, float3 specular : TEXCOORD2, uniform float4x4 ModelViewProj, uniform float4x4 ModelView, uniform float4x4 ModelViewIT, out float4 HPosition : POSITION, out float3 Peye : TEXCOORD0, out float3 Neye : TEXCOORD1, out float2 uv : TEXCOORD2, out float3 Kd : COLOR0, out float3 Ks : COLOR1) { // compute homogeneous position of vertex for rasterizer HPosition = mul(ModelViewProj, Pobject); // transform position and normal from model-space to view-space Peye = mul(ModelView, Pobject).xyz; Neye = mul(ModelViewIT, float4(Nobject, 0)).xyz; // pass uv, Kd, and Ks through unchanged; if they are varying // per-vertex, however, they'll be interpolated before being // passed to the fragment program. uv = TexUV; Kd = diffuse; Ks = specular; } Index: csdCg.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/csdCg.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** csdCg.cs 5 Aug 2004 18:50:53 -0000 1.4 --- csdCg.cs 5 Aug 2004 21:13:56 -0000 1.5 *************** *** 3,9 **** using System.Runtime.InteropServices; ! namespace csDragons { ! namespace OpenGL { ! namespace Cg { public delegate void CgErrorEvent(); --- 3,7 ---- using System.Runtime.InteropServices; ! namespace csDragons.OpenGL.Cg { public delegate void CgErrorEvent(); *************** *** 16,25 **** public static int CG_FALSE = 0; ! public static int CG_TRUE = 0; ! [ DllImport( "libcsdCG.so" ) ] public static extern void cgSetErrorCallback( CgErrorEvent func ); ! [ DllImport( "libcsdCG.so" ) ] public static extern CgErrorEvent cgGetErrorCallback(); --- 14,23 ---- public static int CG_FALSE = 0; ! public static int CG_TRUE = 1; ! [ DllImport( "libcsdCg.so" ) ] public static extern void cgSetErrorCallback( CgErrorEvent func ); ! [ DllImport( "libcsdCg.so" ) ] public static extern CgErrorEvent cgGetErrorCallback(); *************** *** 30,33 **** } - } - } \ No newline at end of file --- 28,29 ---- Index: cgType.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgType.cs 5 Aug 2004 18:10:52 -0000 1.1 --- cgType.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 3,7 **** namespace Cg { ! enum CgType { CG_UNKNOWN_TYPE, CG_STRUCT, --- 3,7 ---- namespace Cg { ! public enum CGtype { CG_UNKNOWN_TYPE, CG_STRUCT, --- NEW FILE: demo.cs --- using csDragons.OpenGL; using System; using System.Diagnostics; namespace csDragons { namespace OpenGL { namespace Cg { public class Demo : Cg { IntPtr context, vertexProgram, fragmentProgram; CGprofile vertexProfile, fragmentProfile; int curTime = 0; bool haveLoadedPrograms = false; int res=512; float[] P, N, uv; uint[] indices; public Demo() { glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( res, res ); glutCreateWindow("Cg Demo"); glutDisplayFunc( new cb0_glutDisplayFunc( draw ) ); glutKeyboardFunc( new cb0_glutKeyboardFunc(keyboard) ); cgSetErrorCallback( new CgErrorEvent( errorHandler ) ); context = cgCreateContext(); glutMainLoop(); } protected void errorHandler() { } protected void draw() { if (!haveLoadedPrograms) { ChooseProfiles(); LoadCgPrograms(); LoadTextures(); glEnable( GL_DEPTH_TEST ); haveLoadedPrograms = true; } glClearColor( 0.25f, 0.25f, 0.25f, 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 30.0, 1.0, 0.1, 100.0 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 4.0, 4.0, -4.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ); glRotatef( curTime, 0, 1, 0 ); //cgGLBindProgram( vertexProgram ); //cgGLBindProgram( fragmentProgram ); //cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewProj"), CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY); //cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelView"), CG_GL_MODELVIEW_MATRIX, CG_GL_MATRIX_IDENTITY); //cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewIT"), CG_GL_MODELVIEW_MATRIX, CG_GL_MATRIX_INVERSE_TRANSPOSE); float[] Kd = { 0.7f, 0.2f, 0.2f }; float[] Ks = { 0.9f, 0.9f, 0.9f }; //cgGLSetParameter3fv(cgGetNamedParameter(vertexProgram, "diffuse"), Kd); //cgGLSetParameter3fv(cgGetNamedParameter(vertexProgram, "specular"), Ks); float[] lightPos = { 3, 2, -3 }; //cgGLSetParameter3fv(cgGetNamedParameter(fragmentProgram, "Plight"), lightPos); float[] lightColor = { 1, 1, 1 }; //cgGLSetParameter3fv(cgGetNamedParameter(fragmentProgram, "lightColor"), lightColor); //cgGLSetParameter1f(cgGetNamedParameter(fragmentProgram, "shininess"), 40); //cgGLEnableTextureParameter(cgGetNamedParameter(fragmentProgram, "diffuseMap")); // And go ahead and draw the scene geometry DrawGeometry(); //cgGLDisableTextureParameter(cgGetNamedParameter(fragmentProgram, "diffuseMap")); glutSwapBuffers(); ++curTime; glutPostRedisplay(); } protected void DrawGeometry() { int nu = 30; int nv = 30; int nTris = 2*(nu-1)*(nv-1); int nVerts = nu*nv; int pp = 0; int np = 0; int uvp = 0; if (P==null) { int u,v; P = new float[3*nVerts]; N = new float[3*nVerts]; uv = new float[2*nVerts]; for ( v=0; v<nv; ++v ) { float fv = (float)(v/(nv-1)); for (u=0; u<nu; ++u ) { float fu=(float)(u/(nu-1)); uv[uvp] = fu; uv[uvp+1] = fu; parametricEval( fu, fv, pp, np ); pp += 3; np += 3; uvp += 2; } } indices = new uint[3*nTris]; int ip = 0; for ( v=0; v<nv-1; ++v ) { for ( u=0; u<nu-1; ++u) { indices[ip++] = (uint)(u+v*nu); indices[ip++] = (uint)((u+1)+v*nu); indices[ip++] = (uint)((u+1)+(v+1)*nu); indices[ip++] = (uint)(u+v*nu); indices[ip++] = (uint)((u+1)+(v+1)*nu); indices[ip++] = (uint)(u+(v+1)*nu); } } uint[] a3 = {3}; uint[] af = {GL_FLOAT}; uint[] a0 = {0}; IntPtr param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, a3, af, a0, P ); } } protected void parametricEval( float u, float v, int pp, int np ) { double theta = System.Math.PI * u; double phi = 2.0 * System.Math.PI * v; P[pp] = (float)(System.Math.Sin(theta) * System.Math.Sin(phi)); P[pp+1] = (float)(System.Math.Sin(theta) * System.Math.Cos(phi)); P[pp+2] = (float)(System.Math.Cos(theta)); N[pp] = P[pp]; N[pp+1] = P[pp+1]; N[pp+2] = P[pp+2]; } protected void ChooseProfiles() { if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_ARBVP1 ) ) { vertexProfile = CGprofile.CG_PROFILE_ARBVP1; } else if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_VP30 ) ) { vertexProfile = CGprofile.CG_PROFILE_VP30; } else { Console.WriteLine( "Neither arbvp1 or vp30 vertex profiles supported on this system!" ); System.Environment.Exit(1); } if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_ARBFP1 ) ) { fragmentProfile = CGprofile.CG_PROFILE_ARBFP1; } else if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_FP30 ) ) { fragmentProfile = CGprofile.CG_PROFILE_FP30; } else { Console.WriteLine( "Netiher arbfp1 or fp30 fragment profiles supported on this system!" ); System.Environment.Exit(2); } } protected void LoadCgPrograms() { Debug.Assert( CG_TRUE==cgIsContext( context ) ); vertexProgram = cgCreateProgramFromFile( context, CGenum.CG_SOURCE, "demo_vert.cg", vertexProfile, null, null ); cgGLEnableProfile( vertexProfile ); cgGLLoadProgram( vertexProgram ); fragmentProgram = cgCreateProgramFromFile( context, CGenum.CG_SOURCE, "demo_frag.cg", fragmentProfile, null, null ); if ( CG_FALSE==cgIsProgramCompiled( fragmentProgram ) ) cgCompileProgram( fragmentProgram ); cgGLEnableProfile( fragmentProfile ); cgGLLoadProgram( fragmentProgram ); } protected void LoadTextures() { uint handle ; uint[] h = new uint[1]; glGenTextures( 1, h ); handle = h[0]; glBindTexture( GL_TEXTURE_2D, handle ); glTexParameterf(GL_TEXTURE_2D, 33169, GL_TRUE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); float[] data = new float[res*res*4]; for ( int i=0; i<res; i++ ) { 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; } } } glTexImage2D( GL_TEXTURE_2D, 0, 4, res, res, 0, GL_RGBA, GL_FLOAT, data ); cgGLSetTextureParameter( cgGetNamedParameter( fragmentProgram, "diffuseMap" ), h ); } protected void keyboard( byte key, int x, int y ) { Console.Write( "Key ==> " ); Console.WriteLine( key ); } public static void Main( string[] args) { Demo demo = new Demo(); } } } } } Index: cgRessource.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgRessource.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgRessource.cs 5 Aug 2004 18:10:52 -0000 1.1 --- cgRessource.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 3,7 **** namespace Cg { ! enum CgRessource { CG_TEXUNIT0=2048, CG_TEXUNIT1, --- 3,7 ---- namespace Cg { ! public enum CGressource { CG_TEXUNIT0=2048, CG_TEXUNIT1, |
From: Tim R. <ti...@us...> - 2004-08-05 21:14:12
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/generator Modified Files: config.cs generator.cs Log Message: Cg Advanced Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** generator.cs 5 Aug 2004 15:55:25 -0000 1.5 --- generator.cs 5 Aug 2004 21:13:56 -0000 1.6 *************** *** 208,212 **** writer.WriteLine( "using System.Runtime.InteropServices;" ); writer.WriteLine( "" ); ! // class header writer.Write( "public class " ); --- 208,219 ---- writer.WriteLine( "using System.Runtime.InteropServices;" ); writer.WriteLine( "" ); ! ! if (config.Namespace!="") { ! writer.WriteLine( "" ); ! writer.Write( "namespace " ); ! writer.Write( config.Namespace ); ! writer.WriteLine( " { " ); ! } ! // class header writer.Write( "public class " ); *************** *** 230,233 **** --- 237,241 ---- writer.WriteLine( "}" ); // class footer + if (config.Namespace!="") writer.WriteLine( "}" ); writer.WriteLine( config.Footer ); Index: config.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/config.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.cs 5 Aug 2004 15:55:25 -0000 1.3 --- config.cs 5 Aug 2004 21:13:56 -0000 1.4 *************** *** 38,41 **** --- 38,42 ---- public string Header; public string Footer; + public string Namespace; /** \brief basetypes which should not be replaced */ |
From: Tim R. <ti...@us...> - 2004-08-05 21:14:12
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/GL Modified Files: csdGL.cs Log Message: Cg Advanced Index: csdGL.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/csdGL.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** csdGL.cs 5 Aug 2004 13:09:15 -0000 1.1 --- csdGL.cs 5 Aug 2004 21:13:56 -0000 1.2 *************** *** 9,13 **** * This class combines all OpenGL functionality. */ ! public class csdGL : csdGLUTBase { /** \brief control flag for type of error handling --- 9,13 ---- * This class combines all OpenGL functionality. */ ! public class GL : csdGLUTBase { /** \brief control flag for type of error handling |
From: Tim R. <ti...@us...> - 2004-08-05 18:51:02
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30673 Modified Files: Makefile csdCg.cs Added Files: cgGLEnum.cs Log Message: basic Cg should be work Index: csdCg.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/csdCg.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** csdCg.cs 5 Aug 2004 18:37:58 -0000 1.3 --- csdCg.cs 5 Aug 2004 18:50:53 -0000 1.4 *************** *** 13,17 **** * This class combines all OpenGL functionality. */ ! public class Cg : csdCgBase { public static int CG_FALSE = 0; --- 13,17 ---- * This class combines all OpenGL functionality. */ ! public class Cg : csdCgGLBase { public static int CG_FALSE = 0; Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 5 Aug 2004 18:37:58 -0000 1.5 --- Makefile 5 Aug 2004 18:50:53 -0000 1.6 *************** *** 1,3 **** ! FILES=csdCgBase.cs AssemblyInfo.cs csdCg.cs cgType.cs cgRessource.cs cgProfile.cs cgError.cs cgEnums.cs GEN=mono ../generator/csdGenerator.exe --- 1,3 ---- ! FILES=csdCgBase.cs csdCgGLBase.cs AssemblyInfo.cs csdCg.cs cgType.cs cgRessource.cs cgProfile.cs cgError.cs cgEnums.cs cgGLEnum.cs GEN=mono ../generator/csdGenerator.exe *************** *** 19,25 **** --- 19,30 ---- ln -sf ../doxygen/cg_xml/cg_8h.xml . + cgGL_8h.xml: + ln -sf ../doxygen/cg_xml/cgGL_8h.xml . + csdCgBase.cs: cg_8h.xml cg.xml $(GEN) cg.xml + csdCgGLBase.cs: cgGL_8h.xml cgGL.xml + $(GEN) cgGL.xml test: test.exe *************** *** 44,47 **** --- 49,53 ---- rm -f *.dll rm -f csdCgBase.cs + rm -f csdCgGLBase.cs .IGNORE: --- NEW FILE: cgGLEnum.cs --- namespace csDragons { namespace OpenGL { namespace Cg { enum CgGLEnum { CG_GL_MATRIX_IDENTITY = 0, CG_GL_MATRIX_TRANSPOSE = 1, CG_GL_MATRIX_INVERSE = 2, CG_GL_MATRIX_INVERSE_TRANSPOSE = 3, CG_GL_MODELVIEW_MATRIX, CG_GL_PROJECTION_MATRIX, CG_GL_TEXTURE_MATRIX, CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_VERTEX, CG_GL_FRAGMENT } } } } |
From: Tim R. <ti...@us...> - 2004-08-05 18:38:07
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27447 Modified Files: Makefile csdCg.cs Added Files: cgEnums.cs cgError.cs cgProfile.cs Log Message: implemented cg.h wrapping Index: csdCg.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/csdCg.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** csdCg.cs 5 Aug 2004 18:10:52 -0000 1.2 --- csdCg.cs 5 Aug 2004 18:37:58 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Diagnostics; + using System.Runtime.InteropServices; namespace csDragons { *************** *** 6,9 **** --- 7,12 ---- namespace Cg { + public delegate void CgErrorEvent(); + /** \brief Main class for csdGL * *************** *** 14,17 **** --- 17,27 ---- public static int CG_FALSE = 0; public static int CG_TRUE = 0; + + [ DllImport( "libcsdCG.so" ) ] + public static extern void cgSetErrorCallback( CgErrorEvent func ); + + [ DllImport( "libcsdCG.so" ) ] + public static extern CgErrorEvent cgGetErrorCallback(); + } --- NEW FILE: cgEnums.cs --- namespace csDragons { namespace OpenGL { namespace Cg { enum CgEnum { CG_UNKNOWN = 4096, CG_IN, CG_OUT, CG_INOUT, CG_MIXED, CG_VARYING, CG_UNIFORM, CG_CONSTANT, CG_PROGRAM_SOURCE, CG_PROGRAM_ENTRY, CG_COMPILED_PROGRAM, CG_PROGRAM_PROFILE, CG_GLOBAL, CG_PROGRAM, CG_DEFAULT, CG_ERROR, CG_SOURCE, CG_OBJECT, CG_COMPILE_MANUAL, CG_COMPILE_IMMEDIATE, CG_COMPILE_LAZY, CG_CURRENT, CG_LITERAL, CG_VERSION } } } } Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 5 Aug 2004 18:10:52 -0000 1.4 --- Makefile 5 Aug 2004 18:37:58 -0000 1.5 *************** *** 1,3 **** ! FILES=csdCgBase.cs AssemblyInfo.cs csdCg.cs cgType.cs cgRessource.cs GEN=mono ../generator/csdGenerator.exe --- 1,3 ---- ! FILES=csdCgBase.cs AssemblyInfo.cs csdCg.cs cgType.cs cgRessource.cs cgProfile.cs cgError.cs cgEnums.cs GEN=mono ../generator/csdGenerator.exe --- NEW FILE: cgError.cs --- namespace csDragons { namespace OpenGL { namespace Cg { enum CgError { CG_NO_ERROR = 0, CG_COMPILER_ERROR, CG_INVALID_PARAMETER_ERROR, CG_INVALID_PROFILE_ERROR, CG_PROGRAM_LOAD_ERROR, CG_PROGRAM_BIND_ERROR, CG_PROGRAM_NOT_LOADED_ERROR, CG_UNSPPORTED_GL_EXTENSION_ERROR, CG_INVALID_VALUE_TYPE_ERROR, CG_NOT_MATRIX_PARAM_ERROR, CG_INVALID_ENUMERANT_ERROR, CG_NOT_4x4_MATRIX_ERROR, CG_FILE_READ_ERROR, CG_FILE_WRITE_ERROR, CG_NVPARSE_ERROR, CG_MEMORY_ALLOC_ERROR, CG_INVALID_CONTEXT_HANDLE_ERROR, CG_INVALID_PROGRAM_HANDLE_ERROR, CG_INVALID_PARAM_HANDLE_ERROR, CG_UNKNOWN_PROFILE_ERROR, CG_VAR_ARG_ERROR, CG_INVALIUD_DIMENSION_ERROR, CG_ARRAY_PARAM_ERROR, CG_OUT_OF_ARRAY_BOUND_ERROR, CG_CONFLICTING_TYPES_ERROR, CG_CONFLICTING_PARAMETER_TYPES_ERROR, CG_PARAMETER_IS_NOT_SHARED_ERROR, CG_INVALID_PARAMETER_VARIABILITY_ERROR, CG_CANNOT_DESTROY_PARAMETER_ERROR, CG_NOT_ROOT_PARAMETER_ERROR, CG_PARAMETERS_DO_NOT_MATCH_ERROR, CG_IS_NOT_PROGRAM_PARAMETER_ERROR, CG_INVALID_PARAMETER_TYPE_ERROR, CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR, CG_INVALID_SIZE_ERROR, CG_BIN_CREATES_CYCLE_ERROR, CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR, CG_ARRAY_DIMENSION_DO_NOT_MATCH_ERROR, CG_ARRAY_HAS_WRON_DIMENSION_ERROR, CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR } } } } --- NEW FILE: cgProfile.cs --- namespace csDragons { namespace OpenGL { namespace Cg { enum CgProfile { CG_PROFILE_START=6144, CG_PROFILE_UNKNOWN, CG_PROFILE_VS_1_1 = 6153, CG_PROFILE_VS_2_0, CG_PROFILE_VS_2_X, CG_PROFILE_PS_1_1 = 6159, CG_PROFILE_PS_1_2, CG_PROFILE_PS_1_3, CG_PROFILE_PS_2_0, CG_PROFILE_PS_2_X, CG_PROFILE_MAX=7100 } } } } |
From: Tim R. <ti...@us...> - 2004-08-05 18:11:02
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22082/Cg Modified Files: Makefile csdCg.cs Added Files: cgRessource.cs cgType.cs Log Message: added two enumerations Index: csdCg.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/csdCg.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** csdCg.cs 5 Aug 2004 16:02:32 -0000 1.1 --- csdCg.cs 5 Aug 2004 18:10:52 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- namespace csDragons { namespace OpenGL { + namespace Cg { /** \brief Main class for csdGL *************** *** 11,15 **** public class Cg : csdCgBase { ! } --- 12,18 ---- public class Cg : csdCgBase { ! public static int CG_FALSE = 0; ! public static int CG_TRUE = 0; ! } *************** *** 18,19 **** --- 21,23 ---- } } + } \ No newline at end of file --- NEW FILE: cgRessource.cs --- namespace csDragons { namespace OpenGL { namespace Cg { enum CgRessource { CG_TEXUNIT0=2048, CG_TEXUNIT1, CG_TEXUNIT2, CG_TEXUNIT3, CG_TEXUNIT4, CG_TEXUNIT5, CG_TEXUNIT6, CG_TEXUNIT7, CG_TEXUNIT8, CG_TEXUNIT9, CG_TEXUNIT10, CG_TEXUNIT11, CG_TEXUNIT12, CG_TEXUNIT13, CG_TEXUNIT14, CG_TEXUNIT15, CG_ATTR0=2113, CG_ATTR1, CG_ATTR2, CG_ATTR3, CG_ATTR4, CG_ATTR5, CG_ATTR6, CG_ATTR7, CG_ATTR8, CG_ATTR9, CG_ATTR10, CG_ATTR11, CG_ATTR12, CG_ATTR13, CG_ATTR14, CG_ATTR15, CGI_UNIFORM_PARAM = 2178, CG_TEX0=2179, CG_TEX1, CG_TEX2, CG_TEX3=2192, CG_TEX4, CG_TEX5, CG_TEX6, CG_TEX7, CG_HPOS=2243, CG_COL0=2245, CG_COL1=2246, CG_COL2=2247, CG_COL3=2248, CG_PSIZ=2309, CG_WPOS=2373, CG_POSITION0=2437, CG_POSITION1, CG_POSITION2, CG_POSITION3, CG_POSITION4, CG_POSITION5, CG_POSITION6, CG_POSITION7, CG_POSITION8, CG_POSITION9, CG_POSITION10, CG_POSITION11, CG_POSITION12, CG_POSITION13, CG_POSITION14, CG_POSITION15, CG_DIFFUSE0=2501, CG_TANGENT0=2565, CG_TANGENT1, CG_TANGENT2, CG_TANGENT3, CG_TANGENT4, CG_TANGENT5, CG_TANGENT6, CG_TANGENT7, CG_TANGENT8, CG_TANGENT9, CG_TANGENT10, CG_TANGENT11, CG_TANGENT12, CG_TANGENT13, CG_TANGENT14, CG_TANGENT15, CG_SPECULAR0=2629, CG_BLENDINDICES0=2693, CG_BLENDINDICES1, CG_BLENDINDICES2, CG_BLENDINDICES3, CG_BLENDINDICES4, CG_BLENDINDICES5, CG_BLENDINDICES6, CG_BLENDINDICES7, CG_BLENDINDICES8, CG_BLENDINDICES9, CG_BLENDINDICES10, CG_BLENDINDICES11, CG_BLENDINDICES12, CG_BLENDINDICES13, CG_BLENDINDICES14, CG_BLENDINDICES15, CG_COLOR0=2757, CG_COLOR1, CG_COLOR2, CG_COLOR3, CG_COLOR4, CG_COLOR5, CG_COLOR6, CG_COLOR7, CG_COLOR8, CG_COLOR9, CG_COLOR10, CG_COLOR11, CG_COLOR12, CG_COLOR13, CG_COLOR14, CG_COLOR15, CG_PSIZE0=2821, CG_PSIZE1, CG_PSIZE2, CG_PSIZE3, CG_PSIZE4, CG_PSIZE5, CG_PSIZE6, CG_PSIZE7, CG_PSIZE8, CG_PSIZE9, CG_PSIZE10, CG_PSIZE11, CG_PSIZE12, CG_PSIZE13, CG_PSIZE14, CG_PSIZE15, CG_BINORMAL0=2885, CG_BINORMAL1, CG_BINORMAL2, CG_BINORMAL3, CG_BINORMAL4, CG_BINORMAL5, CG_BINORMAL6, CG_BINORMAL7, CG_BINORMAL8, CG_BINORMAL9, CG_BINORMAL10, CG_BINORMAL11, CG_BINORMAL12, CG_BINORMAL13, CG_BINORMAL14, CG_BINORMAL15, CG_FOG0=2917, CG_FOG1, CG_FOG2, CG_FOG3, CG_FOG4, CG_FOG5, CG_FOG6, CG_FOG7, CG_FOG8, CG_FOG9, CG_FOG10, CG_FOG11, CG_FOG12, CG_FOG13, CG_FOG14, CG_FOG15, CG_DEPTH0=2933, CG_DEPTH1, CG_DEPTH2, CG_DEPTH3, CG_DEPTH4, CG_DEPTH5, CG_DEPTH6, CG_DEPTH7, CG_DEPTH8, CG_DEPTH9, CG_DEPTH10, CG_DEPTH11, CG_DEPTH12, CG_DEPTH13, CG_DEPTH14, CG_DEPTH15, CG_SAMPLE0=2949, CG_SAMPLE1, CG_SAMPLE2, CG_SAMPLE3, CG_SAMPLE4, CG_SAMPLE5, CG_SAMPLE6, CG_SAMPLE7, CG_SAMPLE8, CG_SAMPLE9, CG_SAMPLE10, CG_SAMPLE11, CG_SAMPLE12, CG_SAMPLE13, CG_SAMPLE14, CG_SAMPLE15, CG_BLENDWEIGHT0=3028, CG_BLENDWEIGHT1, CG_BLENDWEIGHT2, CG_BLENDWEIGHT3, CG_BLENDWEIGHT4, CG_BLENDWEIGHT5, CG_BLENDWEIGHT6, CG_BLENDWEIGHT7, CG_BLENDWEIGHT8, CG_BLENDWEIGHT9, CG_BLENDWEIGHT10, CG_BLENDWEIGHT11, CG_BLENDWEIGHT12, CG_BLENDWEIGHT13, CG_BLENDWEIGHT14, CG_BLENDWEIGHT15, CG_NORMAL0=3092, CG_NORMAL1, CG_NORMAL2, CG_NORMAL3, CG_NORMAL4, CG_NORMAL5, CG_NORMAL6, CG_NORMAL7, CG_NORMAL8, CG_NORMAL9, CG_NORMAL10, CG_NORMAL11, CG_NORMAL12, CG_NORMAL13, CG_NORMAL14, CG_NORMAL15, CG_FOGCOORD=3156, CG_TEXCOORD0=3220, CG_TEXCOORD1, CG_TEXCOORD2, CG_TEXCOORD3, CG_TEXCOORD4, CG_TEXCOORD5, CG_TEXCOORD6, CG_TEXCOORD7, CG_TEXCOORD8, CG_TEXCOORD9, CG_TEXCOORD10, CG_TEXCOORD11, CG_TEXCOORD12, CG_TEXCOORD13, CG_TEXCOORD14, CG_TEXCOORD15, CG_COMBINER_CONST0=3284, CG_COMBINER_CONTS1=3285, CG_COMBINER_STAGE_CONST0=3286, CG_COMBINER_STAGE_CONST1=3287, CG_OFFSET_TEXTURE_MATRIX=3288, CG_OFFSET_TEXTURE_SCALE=3289, CG_OFFSET_TEXTURE_BIAS=3290, CG_CONST_EYE=3291, CG_TESSFACTOR=3255, CG_UNDEFINED } } } } Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 5 Aug 2004 16:10:51 -0000 1.3 --- Makefile 5 Aug 2004 18:10:52 -0000 1.4 *************** *** 1,3 **** ! FILES=csdCgBase.cs AssemblyInfo.cs GEN=mono ../generator/csdGenerator.exe --- 1,3 ---- ! FILES=csdCgBase.cs AssemblyInfo.cs csdCg.cs cgType.cs cgRessource.cs GEN=mono ../generator/csdGenerator.exe *************** *** 22,25 **** --- 22,32 ---- $(GEN) cg.xml + + test: test.exe + + test.exe: test.cs $(FILES) + $(MCS) test.cs $(FILES) -out:test.exe && ./test.exe + + install: install-gac --- NEW FILE: cgType.cs --- namespace csDragons { namespace OpenGL { namespace Cg { enum CgType { CG_UNKNOWN_TYPE, CG_STRUCT, CG_ARRAY, CG_TYPE_START_ENUM = 1024, CG_HALF, CG_HALF2, CG_HALF3, CG_HALF4, CG_HALF1x1, CG_HALF1x2, CG_HALF1x3, CG_HALF1x4, CG_HALF2x1, CG_HALF2x2, CG_HALF2x3, CG_HALF2x4, CG_HALF3x1, CG_HALF3x2, CG_HALF3x3, CG_HALF3x4, CG_HALF4x1, CG_HALF4x2, CG_HALF4x3, CG_HALF4x4, CG_FLOAT, CG_FLOAT2, CG_FLOAT3, CG_FLOAT4, CG_FLOAT1x1, CG_FLOAT1x2, CG_FLOAT1x3, CG_FLOAT1x4, CG_FLOAT2x1, CG_FLOAT2x2, CG_FLOAT2x3, CG_FLOAT2x4, CG_FLOAT3x1, CG_FLOAT3x2, CG_FLOAT3x3, CG_FLOAT3x4, CG_FLOAT4x1, CG_FLOAT4x2, CG_FLOAT4x3, CG_FLOAT4x4, CG_SAMPLER1D, CG_SAMPLER2D, CG_SAMPLER3D, CG_SAMPLERRECT, CG_SAMPLERCUBE, CG_FIXED, CG_FIXED2, CG_FIXED3, CG_FIXED4, CG_FIXED1x1, CG_FIXED1x2, CG_FIXED1x3, CG_FIXED1x4, CG_FIXED2x1, CG_FIXED2x2, CG_FIXED2x3, CG_FIXED2x4, CG_FIXED3x1, CG_FIXED3x2, CG_FIXED3x3, CG_FIXED3x4, CG_FIXED4x1, CG_FIXED4x2, CG_FIXED4x3, CG_FIXED4x4, CG_HALF1, CG_FLOAT1, CG_FIXED1, CG_INT, CG_INT1, CG_INT2, CG_INT3, CG_INT4, CG_INT1x1, CG_INT1x2, CG_INT1x3, CG_INT1x4, CG_INT2x1, CG_INT2x2, CG_INT2x3, CG_INT2x4, CG_INT3x1, CG_INT3x2, CG_INT3x3, CG_INT3x4, CG_INT4x1, CG_INT4x2, CG_INT4x3, CG_INT4x4, CG_BOOL, CG_BOOL1, CG_BOOL2, CG_BOOL3, CG_BOOL4, CG_BOOL1x1, CG_BOOL1x2, CG_BOOL1x3, CG_BOOL1x4, CG_BOOL2x1, CG_BOOL2x2, CG_BOOL2x3, CG_BOOL2x4, CG_BOOL3x1, CG_BOOL3x2, CG_BOOL3x3, CG_BOOL3x4, CG_BOOL4x1, CG_BOOL4x2, CG_BOOL4x3, CG_BOOL4x4 } } } } |
From: Tim R. <ti...@us...> - 2004-08-05 18:11:02
|
Update of /cvsroot/csdopenglnet/csdOpenGL/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22082/doc Modified Files: doxygen.conf Log Message: added two enumerations Index: doxygen.conf =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/doc/doxygen.conf,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** doxygen.conf 12 Jul 2004 17:14:20 -0000 1.1.1.1 --- doxygen.conf 5 Aug 2004 18:10:52 -0000 1.2 *************** *** 18,22 **** # by quotes) that should identify the project. ! PROJECT_NAME = csDragons OpenGL.NET # The PROJECT_NUMBER tag can be used to enter a project or revision number. --- 18,22 ---- # by quotes) that should identify the project. ! PROJECT_NAME = csDragons OpenGL# # The PROJECT_NUMBER tag can be used to enter a project or revision number. *************** *** 362,366 **** # with spaces. ! INPUT = ../generator ../math # If the value of the INPUT tag contains directories, you can use the --- 362,366 ---- # with spaces. ! INPUT = ../generator ../math ../Cg ../GL # If the value of the INPUT tag contains directories, you can use the |
From: Tim R. <ti...@us...> - 2004-08-05 18:11:02
|
Update of /cvsroot/csdopenglnet/csdOpenGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22082 Modified Files: ChangeLog Log Message: added two enumerations Index: ChangeLog =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChangeLog 20 Jul 2004 09:07:22 -0000 1.5 --- ChangeLog 5 Aug 2004 18:10:51 -0000 1.6 *************** *** 1,2 **** --- 1,6 ---- + since 0.1.2: + added basic Cg support + freeglut support is removed, because we focus on Gtk# and freeglut was not as easy as glut + since 0.1.1: add freeglut support |
From: Tim R. <ti...@us...> - 2004-08-05 16:11:04
|
Update of /cvsroot/csdopenglnet/csdOpenGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30837 Modified Files: Makefile Log Message: update Makefile structure Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 5 Aug 2004 13:09:14 -0000 1.5 --- Makefile 5 Aug 2004 16:10:51 -0000 1.6 *************** *** 4,7 **** --- 4,8 ---- $(MAKE) -C generator $(MAKE) -C GL + $(MAKE) -C Cg $(MAKE) -C math $(MAKE) -C tools *************** *** 15,18 **** --- 16,20 ---- install: $(MAKE) -C GL install + $(MAKE) -C Cg install $(MAKE) -C tools install $(MAKE) -C cbonding install *************** *** 20,23 **** --- 22,26 ---- uninstall: $(MAKE) -C GL uninstall + $(MAKE) -C Cg uninstall $(MAKE) -C tools uninstall $(MAKE) -C cbonding uninstall *************** *** 32,35 **** --- 35,39 ---- $(MAKE) -C tools clean $(MAKE) -C GL clean + $(MAKE) -C Cg clean .IGNORE: |
From: Tim R. <ti...@us...> - 2004-08-05 16:11:04
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30837/Cg Modified Files: Makefile Log Message: update Makefile structure Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 5 Aug 2004 16:02:32 -0000 1.2 --- Makefile 5 Aug 2004 16:10:51 -0000 1.3 *************** *** 26,37 **** install-gac: csdGL.dll csdGL_Gtk.dll ! $(GAC) /i csdGL.dll /f /package $(PACKAGE) ! $(GAC) /i csdGL_Gtk.dll /f /package $(PACKAGE) uninstall: uninstall-gac uninstall-gac: ! $(GAC) /u csdGL ! $(GAC) /u csdGL_Gtk clean: --- 26,35 ---- install-gac: csdGL.dll csdGL_Gtk.dll ! $(GAC) /i csdCg.dll /f /package $(PACKAGE) uninstall: uninstall-gac uninstall-gac: ! $(GAC) /u csdCg clean: |
From: Tim R. <ti...@us...> - 2004-08-05 16:08:36
|
Update of /cvsroot/csdopenglnet/csdOpenGL/cbonding In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30338 Modified Files: Makefile Added Files: csdCg.c csdCg.h Log Message: target library for Cg Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/cbonding/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 1 Aug 2004 10:55:46 -0000 1.5 --- Makefile 5 Aug 2004 16:08:27 -0000 1.6 *************** *** 1,33 **** INCPATH = -I /usr/X11R6/include/ - LIBS = -lm -lpthread -lcsdGlut LIBPATH = -L/usr/lib -L/usr/X11R6/lib/ -L. ! all: libcsdGL.so libcsdGL.so: csdGL.o ! gcc -shared -Wl,-soname,libcsdGlut.so.1 $(LIBPATH) -lglut -lGLU -lGL -o libcsdGL.so csdGL.o ! %.exe:%.cs ! mcs $^ -o $@ %.o:%.c gcc -fPIC -c $^ -o $@ - %:%.c - gcc $(INCPATH) $(LIBPATH) $^ $(LIBS) -o $@ - - %:%.cpp - g++ $(INCPATH) $(LIBPATH) $^ $(LIBS) -o $@ - - %:%.cc - g++ $(INCPATH) $(LIBPATH) $^ $(LIBS) -o $@ - install: mkdir -p $(DESTDIR)/usr/lib cp libcsdGL.so $(DESTDIR)/usr/lib ! uninstall: rm $(DESTDIR)/usr/lib/libcsdGL.so clean: --- 1,25 ---- INCPATH = -I /usr/X11R6/include/ LIBPATH = -L/usr/lib -L/usr/X11R6/lib/ -L. ! all: libcsdGL.so libcsdCg.so libcsdGL.so: csdGL.o ! gcc -shared -Wl,-soname,libcsdGL.so.1 $(LIBPATH) -lglut -lGLU -lGL -o libcsdGL.so csdGL.o ! libcsdCg.so: csdCg.o ! gcc -shared -Wl,-soname,libcsdCg.so.1 $(LIBPATH) -lCgGL -lCg -o libcsdCg.so csdCg.o %.o:%.c gcc -fPIC -c $^ -o $@ install: mkdir -p $(DESTDIR)/usr/lib cp libcsdGL.so $(DESTDIR)/usr/lib ! cp libcsdCg.so $(DESTDIR)/usr/lib ! uninstall: rm $(DESTDIR)/usr/lib/libcsdGL.so + rm $(DESTDIR)/usr/lib/libcsdCg.so clean: --- NEW FILE: csdCg.h --- #ifndef __csdCg__ #define __csdCg__ #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> #include <Cg/cg.h> #include <Cg/cgGL.h> #include <stdlib.h> #endif --- NEW FILE: csdCg.c --- #include "csdCg.h" |
From: Tim R. <ti...@us...> - 2004-08-05 16:02:41
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29388 Modified Files: Makefile Added Files: AssemblyInfo.cs PublicKeyFile.snk csdCg.cs Log Message: first Cg wrapping --- NEW FILE: csdCg.cs --- using System; using System.Diagnostics; namespace csDragons { namespace OpenGL { /** \brief Main class for csdGL * * This class combines all OpenGL functionality. */ public class Cg : csdCgBase { } } } --- NEW FILE: AssemblyInfo.cs --- using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following // attributes. // // change them to the information which is associated with the assembly // you compile. [assembly: AssemblyTitle("csDragons.Cg")] [assembly: AssemblyDescription("Wrapper-Library for Cg")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("csDragons")] [assembly: AssemblyProduct("csDragons OpenGL.NET")] [assembly: AssemblyCopyright("(C)Copyright 2004 by Tim Rädisch & Kai Reichert")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has following format : // // Major.Minor.Build.Revision // // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): [assembly: AssemblyVersion("0.1.*")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. // This is not required, if you don't want signing let these attributes like they're. [assembly: AssemblyDelaySign(true)] [assembly: AssemblyKeyFile("PublicKeyFile.snk")] Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 5 Aug 2004 13:09:14 -0000 1.1 --- Makefile 5 Aug 2004 16:02:32 -0000 1.2 *************** *** 1,3 **** ! FILES=csdGLBase.cs csdGL.cs csdGLUBase.cs csdGLUTBase.cs Exceptions.cs GEN=mono ../generator/csdGenerator.exe --- 1,3 ---- ! FILES=csdCgBase.cs AssemblyInfo.cs GEN=mono ../generator/csdGenerator.exe *************** *** 11,23 **** GAC=gacutil $(GACUTIL_FLAGS) ! all: csdCgBase.cs cg_8h.xml: ln -sf ../doxygen/cg_xml/cg_8h.xml . ! csdCgBase.cs: cg_8h.xml ! $(GEN) cg_8h.xml libcsdGL.so csdCgBase System.Object csdCgBase.cs ! install: install-gac --- 11,24 ---- GAC=gacutil $(GACUTIL_FLAGS) ! all: csdCg.dll + csdCg.dll: $(FILES) + $(MCS) -target:library $^ -out:$@ cg_8h.xml: ln -sf ../doxygen/cg_xml/cg_8h.xml . ! csdCgBase.cs: cg_8h.xml cg.xml ! $(GEN) cg.xml install: install-gac --- NEW FILE: PublicKeyFile.snk --- (This appears to be a binary file; contents omitted.) |
From: Tim R. <ti...@us...> - 2004-08-05 15:55:34
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28042 Modified Files: config.cs generator.cs Log Message: additional footer and header can be specified; e.g. for adding using-aliases Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** generator.cs 5 Aug 2004 15:50:48 -0000 1.4 --- generator.cs 5 Aug 2004 15:55:25 -0000 1.5 *************** *** 204,207 **** --- 204,208 ---- // default usings + writer.WriteLine( config.Header ); writer.WriteLine( "using System;" ); writer.WriteLine( "using System.Runtime.InteropServices;" ); *************** *** 229,232 **** --- 230,234 ---- writer.WriteLine( "}" ); // class footer + writer.WriteLine( config.Footer ); Debug.WriteLine( "Exiting Generator.writeFooter(StreamWriter)" ); Index: config.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/config.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.cs 5 Aug 2004 15:50:48 -0000 1.2 --- config.cs 5 Aug 2004 15:55:25 -0000 1.3 *************** *** 36,39 **** --- 36,41 ---- public bool writeDelegates; public bool writeDefines; + public string Header; + public string Footer; /** \brief basetypes which should not be replaced */ *************** *** 66,69 **** --- 68,73 ---- ignoreFunctions = new ArrayList(); ignoreFunctions.Add( "Function" ); + Header = "/*Header*/"; + Footer = "/*Fiiter*/"; } } |
From: Tim R. <ti...@us...> - 2004-08-05 15:50:57
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27231 Modified Files: config.cs function.cs generator.cs typedef.cs Log Message: a list of function names can be specified which will not be wrapped Index: config.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/config.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.cs 5 Aug 2004 15:05:28 -0000 1.1 --- config.cs 5 Aug 2004 15:50:48 -0000 1.2 *************** *** 50,53 **** --- 50,57 ---- public ArrayList typedefFiles; + [System.Xml.Serialization.XmlArray("IgnoreFunctions")] + [System.Xml.Serialization.XmlArrayItem("Function",typeof(string))] + public ArrayList ignoreFunctions; + public Configuration() { xmlInput = "XML"; *************** *** 60,63 **** --- 64,69 ---- typedefFiles = new ArrayList(); typedefFiles.Add( "File" ); + ignoreFunctions = new ArrayList(); + ignoreFunctions.Add( "Function" ); } } Index: typedef.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/typedef.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** typedef.cs 5 Aug 2004 13:09:15 -0000 1.3 --- typedef.cs 5 Aug 2004 15:50:48 -0000 1.4 *************** *** 55,62 **** } ! public TypeDef( StreamWriter w, string addTypes ) : this ( w ) { ! tList.Add( "CGcontext", "CGcontext" ); ! tList.Add( "CGprogram", "CGprogram" ); ! tList.Add( "CGparameter", "CGparameter" ); } --- 55,63 ---- } ! public TypeDef( StreamWriter w, ArrayList typedefs ) : this ( w ) { ! IEnumerator e = typedefs.GetEnumerator(); ! while (e.MoveNext()) { ! tList.Add( (string)e.Current, (string)e.Current ); ! } } Index: function.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/function.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** function.cs 5 Aug 2004 13:09:15 -0000 1.2 --- function.cs 5 Aug 2004 15:50:48 -0000 1.3 *************** *** 39,42 **** --- 39,44 ---- protected ArrayList baseTypes; + protected ArrayList ignoreFunctions; + /** \brief Constructor *************** *** 47,51 **** * @param l the name of the library to be wrapped */ ! public Function( StreamWriter w, TypeDef t, string l ) { Debug.Indent(); Debug.WriteLine( "Entering Function.Function(StreamWriter)" ); --- 49,53 ---- * @param l the name of the library to be wrapped */ ! public Function( StreamWriter w, TypeDef t, string l, ArrayList _ignoreFunctions ) { Debug.Indent(); Debug.WriteLine( "Entering Function.Function(StreamWriter)" ); *************** *** 54,57 **** --- 56,60 ---- typedef = t; lib = l; + ignoreFunctions = _ignoreFunctions; list = new ArrayList(); *************** *** 69,73 **** baseTypes.Add( "uint" ); baseTypes.Add( "ulong" ); - baseTypes.Add( "string" ); Debug.WriteLine( "Exiting Function.Function(StreamWriter)" ); --- 72,75 ---- *************** *** 169,181 **** p.Add( ap.Trim() ); ! list.Add( new FunctionSet( t, n, p ) ); // add function declaration ! ! Console.Write( "Function: " ); Console.WriteLine( n ); ! Debug.WriteLine( "Exiting Function.add(string)" ); Debug.Unindent(); } /** \build process scanned function declarations * --- 171,197 ---- p.Add( ap.Trim() ); ! if (valid(n)) { ! list.Add( new FunctionSet( t, n, p ) ); // add function declaration ! Console.Write( "Function: " ); ! } else { ! Console.Write( "Ignored function: " ); ! } Console.WriteLine( n ); ! Debug.WriteLine( "Exiting Function.add(string)" ); Debug.Unindent(); } + protected bool valid( string function ) { + IEnumerator e = ignoreFunctions.GetEnumerator(); + bool res = true; + + while ( res && (e.MoveNext()) ) { + res = !(function==((string)e.Current)); + } + + return res; + } + /** \build process scanned function declarations * Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** generator.cs 5 Aug 2004 15:05:28 -0000 1.3 --- generator.cs 5 Aug 2004 15:50:48 -0000 1.4 *************** *** 81,86 **** writer = new StreamWriter( fs ); // bind stream to file define = new Define( writer ); // initialize define compiler ! typedef = new TypeDef( writer ); // initialize typedef compiler ! function = new Function( writer, typedef, config.linkLibrary ); // initiaize function compiler writeHeader(); // write file header --- 81,86 ---- writer = new StreamWriter( fs ); // bind stream to file define = new Define( writer ); // initialize define compiler ! typedef = new TypeDef( writer, config.baseTypes ); // initialize typedef compiler ! function = new Function( writer, typedef, config.linkLibrary, config.ignoreFunctions ); // initiaize function compiler writeHeader(); // write file header |
From: Tim R. <ti...@us...> - 2004-08-05 15:27:17
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22918 Modified Files: glut.xml Log Message: GLUT was linked agains wrong library Index: glut.xml =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/glut.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glut.xml 5 Aug 2004 15:21:24 -0000 1.1 --- glut.xml 5 Aug 2004 15:27:02 -0000 1.2 *************** *** 1,5 **** <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>glut_8h.xml</xmlInput> ! <linkLibrary>libGLUT.so</linkLibrary> <className>csdGLUTBase</className> <upperClass>csdGLUBase</upperClass> --- 1,5 ---- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>glut_8h.xml</xmlInput> ! <linkLibrary>libcsdGL.so</linkLibrary> <className>csdGLUTBase</className> <upperClass>csdGLUBase</upperClass> |
From: Tim R. <ti...@us...> - 2004-08-05 15:21:35
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21794 Modified Files: Makefile Added Files: gl.xml glu.xml glut.xml glxtokens.xml Log Message: GL is now made by using the new generator XML configuration file --- NEW FILE: glu.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>glu_8h.xml</xmlInput> <linkLibrary>libGLU.so</linkLibrary> <className>csdGLUBase</className> <upperClass>csdGLBase</upperClass> <outputFile>csdGLUBase.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>true</writeDelegates> <writeDefines>true</writeDefines> <BaseTypes> </BaseTypes> <TypeDefs> <File>gl_8h.xml</File> </TypeDefs> </Configuration> --- NEW FILE: gl.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>gl_8h.xml</xmlInput> <linkLibrary>libGL.so</linkLibrary> <className>csdGLBase</className> <upperClass>System.Object</upperClass> <outputFile>csdGLBase.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>true</writeDelegates> <writeDefines>true</writeDefines> <BaseTypes> </BaseTypes> <TypeDefs> </TypeDefs> </Configuration> Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 5 Aug 2004 13:09:14 -0000 1.1 --- Makefile 5 Aug 2004 15:21:23 -0000 1.2 *************** *** 21,35 **** $(MCS) -target:library $(GTKLIBOPTS) $^ -out:$@ ! csdGLXTokens.cs: glxtokens_8h.xml ! $(GEN) glxtokens_8h.xml libcsdGL.so csdGLXTokens System.Object csdGLXTokens.cs ! csdGLBase.cs: gl_8h.xml glut_8h.xml ! $(GEN) gl_8h.xml libcsdGL.so csdGLBase System.Object csdGLBase.cs ! csdGLUBase.cs: gl_8h.xml glu_8h.xml ! $(GEN) glu_8h.xml libcsdGL.so csdGLUBase csdGLBase csdGLUBase.cs gl_8h.xml ! csdGLUTBase.cs: gl_8h.xml glut_8h.xml ! $(GEN) glut_8h.xml libcsdGL.so csdGLUTBase csdGLUBase csdGLUTBase.cs gl_8h.xml --- 21,35 ---- $(MCS) -target:library $(GTKLIBOPTS) $^ -out:$@ ! csdGLXTokens.cs: glxtokens_8h.xml glxtokens.xml ! $(GEN) glxtokens.xml ! csdGLBase.cs: gl_8h.xml gl.xml ! $(GEN) gl.xml ! csdGLUBase.cs: gl_8h.xml glu_8h.xml glu.xml ! $(GEN) glu.xml ! csdGLUTBase.cs: gl_8h.xml glut_8h.xml glut.xml ! $(GEN) glut.xml *************** *** 66,69 **** --- 66,70 ---- rm -f csdGLUTBase.cs rm -f csdGLXTokens.cs + rm -f *_8h.xml .IGNORE: --- NEW FILE: glxtokens.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>glxtokens_8h.xml</xmlInput> <linkLibrary>libcsdGL.so</linkLibrary> <className>csdGLXTokens</className> <upperClass>System.Object</upperClass> <outputFile>csdGLXTokens.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>true</writeDelegates> <writeDefines>true</writeDefines> <BaseTypes> </BaseTypes> <TypeDefs> </TypeDefs> </Configuration> --- NEW FILE: glut.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>glut_8h.xml</xmlInput> <linkLibrary>libGLUT.so</linkLibrary> <className>csdGLUTBase</className> <upperClass>csdGLUBase</upperClass> <outputFile>csdGLUTBase.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>true</writeDelegates> <writeDefines>true</writeDefines> <BaseTypes> </BaseTypes> <TypeDefs> <File>gl_8h.xml</File> </TypeDefs> </Configuration> |
From: Tim R. <ti...@us...> - 2004-08-05 15:05:38
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7767 Modified Files: Makefile generator.cs Added Files: config.cs Log Message: The generator is now configured by an XML file. This is more flexible and easier than by command line Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** generator.cs 5 Aug 2004 13:09:15 -0000 1.2 --- generator.cs 5 Aug 2004 15:05:28 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- using System.IO; using System.Xml; + using System.Xml.Serialization; namespace csDragons { *************** *** 14,40 **** */ public class Generator { - - /** \brief library to be wrapped - * - * The attribute linkLibrary holds the name of the library which should be wrapped. - * All external calls are linked to this library. - */ - protected string linkLibrary = ""; - /** \brief name of created class. - * - * The attribute className holds the name of the new class. - */ - protected string className = ""; - /** \brief name of upper class. - * - * The attribute upperClase is the class from which the new class heirs. - */ - protected string upperClass = ""; - /** \brief name XML source file - * - * The attribute xmlInput holds the name of the input file. - * This files must be an XML-file created with Doygen. - */ - protected string xmlInput = ""; /** \brief reader for parsing xml file * --- 15,18 ---- *************** *** 42,50 **** */ protected XmlTextReader reader; - /** \brief target file - * - * The attribute outputFile holds the name of the target file. - */ - protected string outputFile; /** \brief Define-Compiler. * --- 20,23 ---- *************** *** 67,78 **** */ protected StreamWriter writer; - /** \brief XML input files for additional typedefs. - * - * This attrbute holds the names of input files for additional typedef statements. - * This files must be an XML-file created with Doygen. - */ - protected ArrayList typedefFiles; ! protected bool onlyFunctions = false; /** \brief The constructor Generator is the main entry point. --- 40,47 ---- */ protected StreamWriter writer; ! protected Configuration config; ! ! /** \brief The constructor Generator is the main entry point. *************** *** 85,109 **** Debug.WriteLine( "Entering Generator.Generator(string[])" ); ! if (args.Length>=5) { ! ! xmlInput = args[0]; ! linkLibrary = args[1]; ! className = args[2]; ! upperClass = args[3]; ! outputFile = args[4]; ! typedefFiles = new ArrayList(); ! for ( int i=5; i<args.Length; i++ ) { ! typedefFiles.Add( args[i] ); } ! createClass(); ! } else { ! Console.WriteLine( "Illegale parameter count!" ); ! Console.WriteLine( "Usage: csdGenerator.exe xmlInput linkLibrary className outputFile" ); ! Console.WriteLine(); ! Console.WriteLine( " xmlInput: XML-representation of header file generated by Doxygen" ); ! Console.WriteLine( " linkLibrary: library which shall be target of PInvoke" ); ! Console.WriteLine( " className: name of the generated C# wrapper class" ); ! Console.WriteLine( " outputFile: name of output file" ); ! } Debug.WriteLine( "Exiting Generator.Generator(string[])" ); --- 54,68 ---- Debug.WriteLine( "Entering Generator.Generator(string[])" ); ! if (args.Length==1) { ! if (args[0] == "--createConfig") { ! Debug.WriteLine( "Writing sample configuration" ); ! config = new Configuration(); ! saveConfig( "generator.xml" ); ! } else { ! Debug.WriteLine( "Loading Configuration" ); ! loadConfig( args[0] ); ! createClass(); } ! } Debug.WriteLine( "Exiting Generator.Generator(string[])" ); *************** *** 119,127 **** Debug.WriteLine( "Entering Generator.createClass()" ); ! FileStream fs = new FileStream( outputFile, FileMode.Create, FileAccess.Write ); // Open or create file with write access writer = new StreamWriter( fs ); // bind stream to file define = new Define( writer ); // initialize define compiler typedef = new TypeDef( writer ); // initialize typedef compiler ! function = new Function( writer, typedef, linkLibrary ); // initiaize function compiler writeHeader(); // write file header --- 78,86 ---- Debug.WriteLine( "Entering Generator.createClass()" ); ! FileStream fs = new FileStream( config.outputFile, FileMode.Create, FileAccess.Write ); // Open or create file with write access writer = new StreamWriter( fs ); // bind stream to file define = new Define( writer ); // initialize define compiler typedef = new TypeDef( writer ); // initialize typedef compiler ! function = new Function( writer, typedef, config.linkLibrary ); // initiaize function compiler writeHeader(); // write file header *************** *** 131,138 **** try { Debug.WriteLine( "Initializing XmlTestReader" ); ! reader = new XmlTextReader( xmlInput ); } catch (Exception e) { Debug.WriteLine( "***** " + e.ToString() ); ! Console.WriteLine( "Error Opening inputfile '"+xmlInput+"'" ); } --- 90,97 ---- try { Debug.WriteLine( "Initializing XmlTestReader" ); ! reader = new XmlTextReader( config.xmlInput ); } catch (Exception e) { Debug.WriteLine( "***** " + e.ToString() ); ! Console.WriteLine( "Error Opening inputfile '"+config.xmlInput+"'" ); } *************** *** 150,160 **** protected void loadTypeDefs() { ! for ( int i=0; i<typedefFiles.Count; i++ ) { try { Debug.WriteLine( "Initializing XmlTestReader" ); ! reader = new XmlTextReader( (string)typedefFiles[i] ); } catch (Exception e) { Debug.WriteLine( "***** " + e.ToString() ); ! Console.WriteLine( "Error Opening inputfile '"+(string)typedefFiles[i]+"'" ); } --- 109,119 ---- protected void loadTypeDefs() { ! for ( int i=0; i<config.typedefFiles.Count; i++ ) { try { Debug.WriteLine( "Initializing XmlTestReader" ); ! reader = new XmlTextReader( (string)config.typedefFiles[i] ); } catch (Exception e) { Debug.WriteLine( "***** " + e.ToString() ); ! Console.WriteLine( "Error Opening inputfile '"+(string)config.typedefFiles[i]+"'" ); } *************** *** 163,167 **** Console.Write( "Laoding typedef statements in " ); ! Console.WriteLine( (string)typedefFiles[i] ); while (!reader.EOF) { // read hole xml file reader.Read(); --- 122,126 ---- Console.Write( "Laoding typedef statements in " ); ! Console.WriteLine( (string)config.typedefFiles[i] ); while (!reader.EOF) { // read hole xml file reader.Read(); *************** *** 219,231 **** function.process(); // pre-processing ! if (!onlyFunctions) { writer.WriteLine( "\n // constant definitions" ); define.write(); // write defines writer.WriteLine( "\n // delegates" ); typedef.write(); } ! ! writer.WriteLine( "\n // functions" ); ! function.write(); // write functions Debug.WriteLine( "Exiting Generater.compile()" ); --- 178,193 ---- function.process(); // pre-processing ! if (config.writeDefines) { writer.WriteLine( "\n // constant definitions" ); define.write(); // write defines + } + if (config.writeDelegates) { writer.WriteLine( "\n // delegates" ); typedef.write(); } ! if (config.writeFunctions) { ! writer.WriteLine( "\n // functions" ); ! function.write(); // write functions ! } Debug.WriteLine( "Exiting Generater.compile()" ); *************** *** 248,254 **** // class header writer.Write( "public class " ); ! writer.Write( className ); writer.Write( " : " ); ! writer.Write( upperClass ); writer.WriteLine( " {" ); --- 210,216 ---- // class header writer.Write( "public class " ); ! writer.Write( config.className ); writer.Write( " : " ); ! writer.Write( config.upperClass ); writer.WriteLine( " {" ); *************** *** 271,275 **** --- 233,271 ---- Debug.Unindent(); } + + protected void saveConfig( string file ) { + Debug.Indent(); + Debug.WriteLine( "Entering Generator.saveConfig()" ); + + try { // try, because of I/O-failure. + XmlSerializer serializer = new XmlSerializer( typeof(Configuration) ); // initializing serializer object + StreamWriter writer = new StreamWriter( file ); // initalizing stream + serializer.Serialize( writer, config ); // save configuration + writer.Close(); + } catch (Exception e) { + Debug.WriteLine( e.Message ); + } + + Debug.WriteLine( "Exiting Generator.saveConfig()" ); + Debug.Unindent(); + } + protected void loadConfig( string fileName ) { + Debug.Indent(); + Debug.WriteLine( "Entering Configuration.loadConfig()" ); + + try { // try, because of I/O-failure + XmlSerializer serializer = new XmlSerializer( typeof(Configuration) ); // initialize seriaizer object + FileStream stream = new FileStream( fileName, FileMode.Open ); // create file stream + config = (Configuration) serializer.Deserialize( stream ); // load configuration + stream.Close(); + } catch (Exception e) { + Debug.WriteLine( e.Message ); + } + + Debug.WriteLine( "Exiting Configuration.loadConfig()" ); + Debug.Unindent(); + } + /** \brief entry point * --- NEW FILE: config.cs --- using System.Collections; namespace csDragons { namespace OpenGL { namespace WrapperGenerator { public class Configuration { /** \brief name XML source file * * The attribute xmlInput holds the name of the input file. * This files must be an XML-file created with Doygen. */ public string xmlInput; /** \brief library to be wrapped * * The attribute linkLibrary holds the name of the library which should be wrapped. * All external calls are linked to this library. */ public string linkLibrary; /** \brief name of created class. * * The attribute className holds the name of the new class. */ public string className; /** \brief name of upper class. * * The attribute upperClase is the class from which the new class heirs. */ public string upperClass; /** \brief target file * * The attribute outputFile holds the name of the target file. */ public string outputFile; public bool writeFunctions; public bool writeDelegates; public bool writeDefines; /** \brief basetypes which should not be replaced */ [System.Xml.Serialization.XmlArray("BaseTypes")] [System.Xml.Serialization.XmlArrayItem("Type",typeof(string))] public ArrayList baseTypes; /** \brief XML input files for additional typedefs. * * This attrbute holds the names of input files for additional typedef statements. * This files must be an XML-file created with Doygen. */ [System.Xml.Serialization.XmlArray("TypeDefs")] [System.Xml.Serialization.XmlArrayItem("File",typeof(string))] public ArrayList typedefFiles; public Configuration() { xmlInput = "XML"; linkLibrary = "library"; className = "Class"; upperClass = "Super"; outputFile = "target"; baseTypes = new ArrayList(); baseTypes.Add( "Typ" ); typedefFiles = new ArrayList(); typedefFiles.Add( "File" ); } } } } } Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile 5 Aug 2004 13:09:15 -0000 1.9 --- Makefile 5 Aug 2004 15:05:28 -0000 1.10 *************** *** 1,3 **** ! FILES=generator.cs AssemblyInfo.cs define.cs typedef.cs function.cs CC=mcs --- 1,3 ---- ! FILES=generator.cs AssemblyInfo.cs define.cs typedef.cs function.cs config.cs CC=mcs |
From: Tim R. <ti...@us...> - 2004-08-05 13:09:26
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21768/generator Modified Files: Makefile function.cs generator.cs typedef.cs Removed Files: AssemblyInfo_csdGL.cs AssemblyInfo_csdGLGtk.cs csdGL.cs gtkArea.cs gtkContext.cs Log Message: Cg binding Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** generator.cs 12 Jul 2004 17:17:52 -0000 1.1.1.1 --- generator.cs 5 Aug 2004 13:09:15 -0000 1.2 *************** *** 73,76 **** --- 73,79 ---- */ protected ArrayList typedefFiles; + + protected bool onlyFunctions = false; + /** \brief The constructor Generator is the main entry point. * *************** *** 216,223 **** function.process(); // pre-processing ! writer.WriteLine( "\n // constant definitions" ); ! define.write(); // write defines ! writer.WriteLine( "\n // delegates" ); ! typedef.write(); writer.WriteLine( "\n // functions" ); function.write(); // write functions --- 219,229 ---- function.process(); // pre-processing ! if (!onlyFunctions) { ! writer.WriteLine( "\n // constant definitions" ); ! define.write(); // write defines ! writer.WriteLine( "\n // delegates" ); ! typedef.write(); ! } ! writer.WriteLine( "\n // functions" ); function.write(); // write functions --- gtkArea.cs DELETED --- Index: typedef.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/typedef.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** typedef.cs 1 Aug 2004 13:42:01 -0000 1.2 --- typedef.cs 5 Aug 2004 13:09:15 -0000 1.3 *************** *** 55,58 **** --- 55,64 ---- } + public TypeDef( StreamWriter w, string addTypes ) : this ( w ) { + tList.Add( "CGcontext", "CGcontext" ); + tList.Add( "CGprogram", "CGprogram" ); + tList.Add( "CGparameter", "CGparameter" ); + } + /** \brief resolve type aliases * *************** *** 149,154 **** } ! tList.Add( n, n ); ! dList.Add( n, ret+" "+n+"( " + par + ")" ); } --- 155,169 ---- } ! try { ! tList.Add( n, n ); ! } catch (Exception e ) { ! Debug.WriteLine( e.ToString() ); ! } ! ! try { ! dList.Add( n, ret+" "+n+"( " + par + ")" ); ! } catch (Exception e ) { ! Debug.WriteLine( e.ToString() ); ! } } *************** *** 242,246 **** Console.WriteLine( t ); ! tList.Add( n, t ); // add typedef to list } --- 257,265 ---- Console.WriteLine( t ); ! try { ! tList.Add( n, t ); // add typedef to list ! } catch (Exception e) { ! Debug.WriteLine( e.ToString() ); ! } } *************** *** 282,286 **** j = q.IndexOf( '>' ); } - // split type string into components string[] s = q.Split( ' ' ); --- 301,304 ---- --- gtkContext.cs DELETED --- Index: function.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/function.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** function.cs 12 Jul 2004 17:17:50 -0000 1.1.1.1 --- function.cs 5 Aug 2004 13:09:15 -0000 1.2 *************** *** 36,40 **** */ protected string lib; ! protected ArrayList baseTypes; --- 36,40 ---- */ protected string lib; ! protected ArrayList baseTypes; *************** *** 46,50 **** * @param t the TypeDef compiler which is used for resolving types * @param l the name of the library to be wrapped ! */ public Function( StreamWriter w, TypeDef t, string l ) { Debug.Indent(); --- 46,50 ---- * @param t the TypeDef compiler which is used for resolving types * @param l the name of the library to be wrapped ! */ public Function( StreamWriter w, TypeDef t, string l ) { Debug.Indent(); *************** *** 69,72 **** --- 69,73 ---- baseTypes.Add( "uint" ); baseTypes.Add( "ulong" ); + baseTypes.Add( "string" ); Debug.WriteLine( "Exiting Function.Function(StreamWriter)" ); *************** *** 149,153 **** xl=doc.DocumentElement.GetElementsByTagName( "type" ); t=xl[0].InnerXml; ! // retrieve original parameter string string par = doc.DocumentElement.GetElementsByTagName( "argsstring" )[0].InnerXml; --- 150,154 ---- xl=doc.DocumentElement.GetElementsByTagName( "type" ); t=xl[0].InnerXml; ! // retrieve original parameter string string par = doc.DocumentElement.GetElementsByTagName( "argsstring" )[0].InnerXml; Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 1 Aug 2004 13:26:42 -0000 1.8 --- Makefile 5 Aug 2004 13:09:15 -0000 1.9 *************** *** 1,4 **** FILES=generator.cs AssemblyInfo.cs define.cs typedef.cs function.cs - GLFILES=csdGLBase.cs csdGL.cs csdGLUBase.cs csdGLUTBase.cs Exceptions.cs CC=mcs --- 1,3 ---- *************** *** 10,73 **** GAC=gacutil $(GACUTIL_FLAGS) ! all: csdGenerator.exe csdGL.dll csdGL_Gtk.dll csdGenerator.exe: $(FILES) $(CC) $(OPTS) $(LIBOPTS) $(FILES) -out:$@ - csdGL.dll: libcsdGL.so AssemblyInfo_csdGL.cs $(GLFILES) - $(MCS) -target:library AssemblyInfo_csdGL.cs $(GLFILES) -out:$@ - - csdGL_Gtk.dll: libcsdGL.so gtkContext.cs csdGLXTokens.cs gtkArea.cs AssemblyInfo_csdGLGtk.cs $(GLFILES) - $(MCS) -target:library -r:glib-sharp.dll -r:gtk-sharp.dll -r:gdk-sharp.dll gtkContext.cs csdGLXTokens.cs gtkArea.cs AssemblyInfo_csdGLGtk.cs $(GLFILES) -out:$@ - - csdGLXTokens.cs: csdGenerator.exe glxtokens_8h.xml - mono ./csdGenerator.exe glxtokens_8h.xml libcsdGL.so csdGLXTokens System.Object csdGLXTokens.cs - - csdGLBase.cs: csdGenerator.exe gl_8h.xml glut_8h.xml - mono ./csdGenerator.exe gl_8h.xml libcsdGL.so csdGLBase System.Object csdGLBase.cs - - csdGLUBase.cs: csdGenerator.exe gl_8h.xml glu_8h.xml - mono ./csdGenerator.exe glu_8h.xml libcsdGL.so csdGLUBase csdGLBase csdGLUBase.cs gl_8h.xml - - csdGLUTBase.cs: csdGenerator.exe gl_8h.xml glut_8h.xml - mono ./csdGenerator.exe glut_8h.xml libcsdGL.so csdGLUTBase csdGLUBase csdGLUTBase.cs gl_8h.xml - - - gl_8h.xml: - ln -sf ../doxygen/xml/gl_8h.xml . - - glu_8h.xml: - ln -sf ../doxygen/xml/glu_8h.xml . - - glut_8h.xml: - ln -sf ../doxygen/xml/glut_8h.xml . - - glxtokens_8h.xml: - ln -sf ../doxygen/xml/glxtokens_8h.xml . - - libcsdGL.so: - ln -sf ../cbonding/libcsdGL.so . - - install: install-gac - - - install-gac: csdGL.dll csdGL_Gtk.dll - $(GAC) /i csdGL.dll /f /package $(PACKAGE) - $(GAC) /i csdGL_Gtk.dll /f /package $(PACKAGE) - - uninstall: uninstall-gac - - uninstall-gac: - $(GAC) /u csdGL - $(GAC) /u csdGL_Gtk - clean: ! rm -f *.exe ! rm -f *.dll ! rm -f csdGLBase.cs ! rm -f csdGLUBase.cs ! rm -f csdGLUTBase.cs ! rm -f csdGLXTokens.cs ! .IGNORE: clean --- 9,20 ---- GAC=gacutil $(GACUTIL_FLAGS) ! all: csdGenerator.exe csdGenerator.exe: $(FILES) $(CC) $(OPTS) $(LIBOPTS) $(FILES) -out:$@ clean: ! rm -f csdGenerator.exe ! .IGNORE: clean --- csdGL.cs DELETED --- --- AssemblyInfo_csdGLGtk.cs DELETED --- --- AssemblyInfo_csdGL.cs DELETED --- |
From: Tim R. <ti...@us...> - 2004-08-05 13:09:25
|
Update of /cvsroot/csdopenglnet/csdOpenGL/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21768/samples Modified Files: Makefile Makefile.gtk Log Message: Cg binding Index: Makefile.gtk =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/Makefile.gtk,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.gtk 31 Jul 2004 16:01:01 -0000 1.4 --- Makefile.gtk 5 Aug 2004 13:09:16 -0000 1.5 *************** *** 12,16 **** csdGL_Gtk.dll: libcsdGL.so ! ln -sf ../generator/csdGL_Gtk.dll . csdMath.dll: --- 12,16 ---- csdGL_Gtk.dll: libcsdGL.so ! ln -sf ../GL/csdGL_Gtk.dll . csdMath.dll: Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 28 Jul 2004 16:30:50 -0000 1.5 --- Makefile 5 Aug 2004 13:09:15 -0000 1.6 *************** *** 13,17 **** csdGL.dll: libcsdGL.so ! ln -sf ../generator/csdGL.dll . csdMath.dll: --- 13,17 ---- csdGL.dll: libcsdGL.so ! ln -sf ../GL/csdGL.dll . csdMath.dll: |
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21768/GL Added Files: AssemblyInfo_csdGL.cs AssemblyInfo_csdGLGtk.cs Exceptions.cs Makefile PublicKeyFile.snk csdGL.cs gtkArea.cs gtkContext.cs Log Message: Cg binding --- NEW FILE: gtkArea.cs --- namespace csDragons { namespace OpenGL { using Gdk; using Gtk; using System; using System.Diagnostics; /** \brief OpenGL-widget * * This class is an OpenGL-widget for Gtk#. */ public class GtkGLArea : DrawingArea { /** \brief each widget must have a type */ static GLib.GType type = RegisterGType (typeof (GtkGLArea)); /** \brief OpenGL context*/ protected GdkGLContext context; /** \brief default constructor * * This constructor uses default settings for createn a GLX context */ public GtkGLArea() : base(type) { Debug.Indent(); Debug.WriteLine( "Entering GtkGLArea()" ); DoubleBuffered = false; Debug.WriteLine( "Init context" ); context = new GdkGLContext(); Debug.WriteLine( "Exiting GtkGLArea()" ); Debug.Unindent(); } /** * This constructor creates the GLX context with the specified parameters * @param attr GLX parameter list */ public GtkGLArea( uint[] attr) : base(type) { Debug.Indent(); Debug.WriteLine( "Entering GtkGLArea(uint[])" ); DoubleBuffered = false; Debug.WriteLine( "Init context" ); context = new GdkGLContext( attr ); Debug.WriteLine( "Entering GtkGLArea(uint[])" ); Debug.Unindent(); } /** \brief activate OpenGL context * * This method marks the associated GL context as active, so that * all following OpenGL statements will alter it. */ public bool MakeCurrent() { Debug.Indent(); Debug.WriteLine( "Entering GtkGLArea.MakeCurrent()" ); bool result = context.MakeCurrent( GdkWindow ); Debug.WriteLine( "Entering GtkGLArea.MakeCurrent()*" ); Debug.Unindent(); return result; } /** \brief OpenGL swapBuffers() * * This method causes OpenGL to swap buffers if possible, */ public void SwapBuffers() { Debug.Indent(); Debug.WriteLine( "Entering GtkGLArea.SwapBuffers()" ); context.SwapBuffers( GdkWindow ); Debug.WriteLine( "Entering GtkGLArea.SwapBuffers()" ); Debug.Unindent(); } } } } --- NEW FILE: AssemblyInfo_csdGL.cs --- using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following // attributes. // // change them to the information which is associated with the assembly // you compile. [assembly: AssemblyTitle("csDragons.OpenGL")] [assembly: AssemblyDescription("Wrapper-Library for OpenGL")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("csDragons")] [assembly: AssemblyProduct("csDragons OpenGL.NET")] [assembly: AssemblyCopyright("(C)Copyright 2004 by Tim Rädisch & Kai Reichert")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has following format : // // Major.Minor.Build.Revision // // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): [assembly: AssemblyVersion("0.1.*")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. // This is not required, if you don't want signing let these attributes like they're. [assembly: AssemblyDelaySign(true)] [assembly: AssemblyKeyFile("PublicKeyFile.snk")] --- NEW FILE: gtkContext.cs --- namespace csDragons { namespace OpenGL { using Gdk; using System; using System.Diagnostics; using System.Runtime.InteropServices; public class GdkGLContext : csdGLXTokens { IntPtr xdisplay; // the Xlib Display used IntPtr glxcontext; // the Xlib GLXContext used [ DllImport( "X11" ) ] static extern void XFree( IntPtr reference ); [ DllImport( "GL" ) ] static extern IntPtr glXCreateContext( IntPtr display, IntPtr visualInfo, IntPtr shareList, bool direct ); [ DllImport( "GL" ) ] static extern IntPtr glXChooseVisual( IntPtr display, int screen, uint[] attribList ); [ DllImport( "gdk-x11-2.0" ) ] static extern IntPtr gdk_x11_get_default_xdisplay(); [ DllImport( "gdk-x11-2.0" ) ] static extern int gdk_x11_get_default_screen(); [ DllImport( "GL" ) ] public static extern IntPtr glXGetCurrentContext(); [ DllImport( "GL" ) ] public static extern void glXDestroyContext( IntPtr display, IntPtr context ); [ DllImport( "gdk-x11-2.0" ) ] static extern int gdk_x11_drawable_get_xid( IntPtr drawable ); [ DllImport( "GL" ) ] static extern bool glXMakeCurrent ( IntPtr display, int drawableID, IntPtr glxcontext ); [ DllImport( "GL" ) ] static extern void glXSwapBuffers ( IntPtr display, int drawableID ); protected static uint[] stdInitializerOrig = { GLX_RGBA, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, GLX_DOUBLEBUFFER, 0 }; protected static uint[] stdInitializer = { GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, 0 }; public GdkGLContext() : this ( stdInitializer ) { Debug.Indent(); Debug.WriteLine( "Entering GdkGLContext()" ); Debug.WriteLine( "Exiting GdkGLContext()" ); Debug.Unindent(); } public GdkGLContext( uint[] attributeList ) { Debug.Indent(); Debug.WriteLine( "Entering GdkGLContext(uint[])" ); // choose the visual based on attribute list Debug.WriteLine( "gdk_x11_get_default_xdisplay" ); Debug.Write( "preX11get: " ); Debug.WriteLine( xdisplay.ToString() ); xdisplay = gdk_x11_get_default_xdisplay(); if (xdisplay==IntPtr.Zero) throw new NoXDisplayException(); Debug.Write( "postX11get: " ); Debug.WriteLine( xdisplay.ToString() ); Debug.WriteLine( "glXChooseVisual" ); IntPtr visualInfo = glXChooseVisual( xdisplay, gdk_x11_get_default_screen(), attributeList ); if (visualInfo==IntPtr.Zero) throw new NoGLContextException(); try { Debug.WriteLine( "glXCreateContext" ); Debug.Write( "preCreate: " ); Debug.WriteLine( glxcontext.ToString() ); glxcontext = glXCreateContext( xdisplay, visualInfo, IntPtr.Zero, true ); Debug.Write( "postCreate: " ); Debug.WriteLine( glxcontext.ToString() ); } catch (Exception e) { Debug.Write( "==> " ); Debug.WriteLine( e.ToString() ); } finally { Debug.WriteLine( "XFree" ); XFree( visualInfo ); } Debug.WriteLine( "Exiting GdkGLContext(uint[])" ); Debug.Unindent(); } ~GdkGLContext() { Debug.Indent(); Debug.WriteLine( "Entering ~GdkGLContext(uint[])" ); if (glxcontext==glXGetCurrentContext()) { Debug.WriteLine( "glXMakeCurrent" ); glXMakeCurrent( xdisplay, 0, IntPtr.Zero ); } Debug.WriteLine( "glXDestroyContext" ); glXDestroyContext( xdisplay, glxcontext ); Debug.WriteLine( "Exiting ~GdkGLContext()" ); Debug.Unindent(); } public bool MakeCurrent( Window window ) { Debug.Indent(); Debug.WriteLine( "Entering GdkGLContext.MakeCurrent(Window)" ); bool result = false; if (window==null) { Debug.WriteLine( "window not initialized" ); result = false; } else { Debug.WriteLine( "gdk_x11_drawable_get_xid" ); int id = gdk_x11_drawable_get_xid( window.Handle ); Debug.WriteLine( "glXMakeCurrent" ); result = glXMakeCurrent( xdisplay, id, glxcontext ); Debug.WriteLine( "Exiting GdkGLContext.MakeCurrent(Window)*" ); Debug.Indent(); } return result; } public void SwapBuffers( Window window ) { Debug.Indent(); Debug.WriteLine( "Entering GdkGLContext.SwapBuffers(Window)" ); if (window==null) { Debug.WriteLine( "window not initialized" ); } else { Debug.WriteLine( "gdk_x11_drawable_get_xid" ); int id = gdk_x11_drawable_get_xid( window.Handle ); Debug.WriteLine( "glXSwapBuffers" ); glXSwapBuffers( xdisplay, id ); } Debug.WriteLine( "Exiting GdkGLContext.SwapBuffers(Window)" ); Debug.Unindent(); } } } } --- NEW FILE: PublicKeyFile.snk --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Makefile --- FILES=csdGLBase.cs csdGL.cs csdGLUBase.cs csdGLUTBase.cs Exceptions.cs GTKLIBS=glib-sharp.dll gtk-sharp.dll gdk-sharp.dll GTKLIBOPTS=$(foreach lib,$(GTKLIBS),-r $(lib)) GEN=mono ../generator/csdGenerator.exe CC=mcs DEBUG=/d:DEBUG DEBUG= OPTS=$(DEBUG) -lib:/usr/lib/mono/gtk-sharp MCS=$(CC) $(OPTS) PACKAGE=csDragons GAC=gacutil $(GACUTIL_FLAGS) all: csdGL.dll csdGL_Gtk.dll csdGL.dll: AssemblyInfo_csdGL.cs $(FILES) $(MCS) -target:library $^ -out:$@ csdGL_Gtk.dll: gtkContext.cs csdGLXTokens.cs gtkArea.cs AssemblyInfo_csdGLGtk.cs $(FILES) $(MCS) -target:library $(GTKLIBOPTS) $^ -out:$@ csdGLXTokens.cs: glxtokens_8h.xml $(GEN) glxtokens_8h.xml libcsdGL.so csdGLXTokens System.Object csdGLXTokens.cs csdGLBase.cs: gl_8h.xml glut_8h.xml $(GEN) gl_8h.xml libcsdGL.so csdGLBase System.Object csdGLBase.cs csdGLUBase.cs: gl_8h.xml glu_8h.xml $(GEN) glu_8h.xml libcsdGL.so csdGLUBase csdGLBase csdGLUBase.cs gl_8h.xml csdGLUTBase.cs: gl_8h.xml glut_8h.xml $(GEN) glut_8h.xml libcsdGL.so csdGLUTBase csdGLUBase csdGLUTBase.cs gl_8h.xml gl_8h.xml: ln -sf ../doxygen/xml/gl_8h.xml . glu_8h.xml: ln -sf ../doxygen/xml/glu_8h.xml . glut_8h.xml: ln -sf ../doxygen/xml/glut_8h.xml . glxtokens_8h.xml: ln -sf ../doxygen/xml/glxtokens_8h.xml . install: install-gac install-gac: csdGL.dll csdGL_Gtk.dll $(GAC) /i csdGL.dll /f /package $(PACKAGE) $(GAC) /i csdGL_Gtk.dll /f /package $(PACKAGE) uninstall: uninstall-gac uninstall-gac: $(GAC) /u csdGL $(GAC) /u csdGL_Gtk clean: rm -f *.exe rm -f *.dll rm -f csdGLBase.cs rm -f csdGLUBase.cs rm -f csdGLUTBase.cs rm -f csdGLXTokens.cs .IGNORE: clean .EXPORT_ALL_VARIABLES: .PHONY: clean --- NEW FILE: csdGL.cs --- using System; using System.Diagnostics; namespace csDragons { namespace OpenGL { /** \brief Main class for csdGL * * This class combines all OpenGL functionality. */ public class csdGL : csdGLUTBase { /** \brief control flag for type of error handling * * If this attribute is set to true then the extended * OpenGL methods will automatically check for errors and * raise Exceptions. */ public bool raiseExceptions = true; /** \brief check OpenGL-Error flag * * This method checks the OpenGL error flag and raises the corresponding * Exception if an error is available. */ public void checkErrors() { Debug.Indent(); Debug.WriteLine( "Entering csdGL.checkErros()" ); uint error = glGetError(); if (error==GL_INVALID_ENUM) { Debug.WriteLine( "OpenGL-Error: GL_INVALID_ENUM" ); throw new GLInvalidEnumException(); } else if (error==GL_INVALID_VALUE) { Debug.WriteLine( "OpenGL-Error: GL_INVALID_VALUE" ); throw new GLInvalidValue(); } else if (error==GL_INVALID_OPERATION) { Debug.WriteLine( "OpenGL-Error: GL_INVALID_OPERATION" ); throw new GLInvalidOperation(); } else if (error==GL_STACK_OVERFLOW) { Debug.WriteLine( "OpenGL-Error: GL_STACK_OVERFLOW" ); throw new GLStackOverflow(); } else if (error==GL_STACK_UNDERFLOW) { Debug.WriteLine( "OpenGL-Error: GL_STACK_UNDERFLOW" ); throw new GLStackUnderflow(); } else if (error==GL_OUT_OF_MEMORY) { Debug.WriteLine( "OpenGL-Error: GL_OUT_OF_MEMORY" ); throw new GLOutOfMemory(); } Debug.WriteLine( "Exiting csdGL.checkErros()" ); Debug.Unindent(); } /** \brief retrieve errors and ignore them * * This method resets the OpenGL error flag and ignores * the error. */ public void ignoreErrors() { Debug.Indent(); Debug.WriteLine( "Entering csdGL.ignoreErros()" ); try { checkErrors(); } catch ( GLException e ) { Debug.WriteLine( e.ToString() ); } Debug.WriteLine( "Exiting csdGL.ignoreErrors()" ); Debug.Unindent(); } /** \brief get OpenGL flag * * This methode returns the value of a flag. It calls checkErrors() for * error handling * @param flag Specifies a symbolic constant indicating a GL capability */ protected bool getFlag( uint flag ) { Debug.Indent(); Debug.WriteLine( "Entering csdGL.getFlag( uint )" ); bool result = GL_TRUE==glIsEnabled( flag ); if (raiseExceptions) { checkErrors(); } Debug.WriteLine( "Exiting csdGL.getFlag( uint )*" ); Debug.Unindent(); return result; } /** \brieg set OpenGL flag * * This methode sets the state for a specific OpenGL flag. It calls * checkErrors() for error handling. * @param flag specifies a symbolic constant indicating a GL capability * @param state specifies whether the flag shall be turned on or off */ protected void setFlag( uint flag, bool state ) { Debug.Indent(); Debug.WriteLine( "Entering csdGL.setFlag( uint, bool )" ); if (state) { glEnable( flag ); } else { glDisable( flag ); } if (raiseExceptions) { checkErrors(); } Debug.WriteLine( "Exiting csdGL.setFlag( uint, bool )" ); Debug.Unindent(); } /** \brief If enabled, do alpha testing. */ public bool AlphaTest { get { return getFlag( GL_ALPHA_TEST ); } set { setFlag( GL_ALPHA_TEST, value ); } } /** \brief If enabled, compute surface normal vectors analytically when either GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 is used to generate vertices. */ public bool AutoNormal { get { return getFlag( GL_AUTO_NORMAL ); } set { setFlag( GL_AUTO_NORMAL, value ); } } /** \brief If enabled, blend the incoming RGBA color values with the values in the color buffers. */ public bool Blend { get { return getFlag( GL_BLEND ); } set { setFlag( GL_BLEND, value ); } } /** \brief If enabled, clip geometry against user-defined clipping plane 0. */ public bool ClipPlane0 { get { return getFlag( GL_CLIP_PLANE0 ); } set { setFlag( GL_CLIP_PLANE0, value ); } } /** \brief If enabled, clip geometry against user-defined clipping plane 1. */ public bool ClipPlane1 { get { return getFlag( GL_CLIP_PLANE1 ); } set { setFlag( GL_CLIP_PLANE1, value ); } } /** \brief If enabled, clip geometry against user-defined clipping plane 2. */ public bool ClipPlane2 { get { return getFlag( GL_CLIP_PLANE2 ); } set { setFlag( GL_CLIP_PLANE2, value ); } } /** \brief If enabled, clip geometry against user-defined clipping plane 3. */ public bool ClipPlane3 { get { return getFlag( GL_CLIP_PLANE3 ); } set { setFlag( GL_CLIP_PLANE3, value ); } } /** \brief If enabled, clip geometry against user-defined clipping plane 4. */ public bool ClipPlane4 { get { return getFlag( GL_CLIP_PLANE4 ); } set { setFlag( GL_CLIP_PLANE4, value ); } } /** \brief If enabled, clip geometry against user-defined clipping plane 5. */ public bool ClipPlane5 { get { return getFlag( GL_CLIP_PLANE5 ); } set { setFlag( GL_CLIP_PLANE5, value ); } } /** \brief If enabled, have one or more material parameters track the current color. */ public bool ColorMaterial { get { return getFlag( GL_COLOR_MATERIAL ); } set { setFlag( GL_COLOR_MATERIAL, value ); } } /** \brief If enabled, cull polygons based on their winding in window coordinates. */ public bool CullFace{ get { return getFlag( GL_CULL_FACE ); } set { setFlag( GL_CULL_FACE, value ); } } /** \brief If enabled, do depth comparisons and update the depth buffer. */ public bool DepthTest { get { return getFlag( GL_DEPTH_TEST ); } set { setFlag( GL_DEPTH_TEST, value ); } } /** \brief If enabled, dither color components or indices before they are written to the color buffer. */ public bool Dither { get { return getFlag( GL_DITHER ); } set { setFlag( GL_DITHER, value ); } } /** \brief If enabled, blend a fog color into the posttexturing color. */ public bool Fog { get { return getFlag( GL_FOG ); } set { setFlag( GL_FOG, value ); } } /** \brief If enabled, include light 0 in the evaluation of the lighting equation. */ public bool Light0 { get { return getFlag( GL_LIGHT0 ); } set { setFlag( GL_LIGHT0, value ); } } /** \brief If enabled, include light 1 in the evaluation of the lighting equation. */ public bool Light1 { get { return getFlag( GL_LIGHT1 ); } set { setFlag( GL_LIGHT1, value ); } } /** \brief If enabled, include light 2 in the evaluation of the lighting equation. */ public bool Light2 { get { return getFlag( GL_LIGHT2 ); } set { setFlag( GL_LIGHT2, value ); } } /** \brief If enabled, include light 3 in the evaluation of the lighting equation. */ public bool Light3 { get { return getFlag( GL_LIGHT3 ); } set { setFlag( GL_LIGHT3, value ); } } /** \brief If enabled, include light 4 in the evaluation of the lighting equation. */ public bool Light4 { get { return getFlag( GL_LIGHT4 ); } set { setFlag( GL_LIGHT4, value ); } } /** \brief If enabled, include light 5 in the evaluation of the lighting equation. */ public bool Light5 { get { return getFlag( GL_LIGHT5 ); } set { setFlag( GL_LIGHT5, value ); } } /** \brief If enabled, include light 6 in the evaluation of the lighting equation. */ public bool Light6 { get { return getFlag( GL_LIGHT6 ); } set { setFlag( GL_LIGHT6, value ); } } /** \brief If enabled, include light 7 in the evaluation of the lighting equation. */ public bool Light7 { get { return getFlag( GL_LIGHT7 ); } set { setFlag( GL_LIGHT7, value ); } } /** \brief If enabled, use the current lighting parameters to compute the vertex color or index. Otherwise, simply associate the current color or index with each vertex. */ public bool Lighting { get { return getFlag( GL_LIGHTING ); } set { setFlag( GL_LIGHTING, value ); } } /** \brief If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. */ public bool LineSmooth { get { return getFlag( GL_LINE_SMOOTH ); } set { setFlag( GL_LINE_SMOOTH, value ); } } /** \brief If enabled, use the current line stipple pattern when drawing lines. */ public bool LineStipple { get { return getFlag( GL_LINE_STIPPLE ); } set { setFlag( GL_LINE_STIPPLE, value ); } } /** \brief If enabled, apply the currently selected logical operation to the incoming and and color buffer indices. */ public bool LogicOp { get { return getFlag( GL_LOGIC_OP ); } set { setFlag( GL_LOGIC_OP, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate RGBA values. */ public bool Map1Color4 { get { return getFlag( GL_MAP1_COLOR_4 ); } set { setFlag( GL_MAP1_COLOR_4, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate color indices. */ public bool Map1Index { get { return getFlag( GL_MAP1_INDEX ); } set { setFlag( GL_MAP1_INDEX, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate normals. */ public bool Map1Normal { get { return getFlag( GL_MAP1_NORMAL ); } set { setFlag( GL_MAP1_NORMAL, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s texture coordinates. */ public bool Map1TectureCoord1 { get { return getFlag( GL_MAP1_TEXTURE_COORD_1 ); } set { setFlag( GL_MAP1_TEXTURE_COORD_1, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s and t texture coordinates. */ public bool Map1TectureCoord2 { get { return getFlag( GL_MAP1_TEXTURE_COORD_2 ); } set { setFlag( GL_MAP1_TEXTURE_COORD_2, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s, t and r texture coordinates. */ public bool Map1TectureCoord3 { get { return getFlag( GL_MAP1_TEXTURE_COORD_3 ); } set { setFlag( GL_MAP1_TEXTURE_COORD_3, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s, t, r and q texture coordinates. */ public bool Map1TectureCoord4 { get { return getFlag( GL_MAP1_TEXTURE_COORD_4 ); } set { setFlag( GL_MAP1_TEXTURE_COORD_4, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate x, y and z vertex coordinates. */ public bool Map1Vertex3 { get { return getFlag( GL_MAP1_VERTEX_3 ); } set { setFlag( GL_MAP1_VERTEX_3, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate homogeneous x, y, z and w vertex coordinates. */ public bool Map1Vertex4 { get { return getFlag( GL_MAP1_VERTEX_4 ); } set { setFlag( GL_MAP1_VERTEX_4, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate RGBA values. */ public bool Map2Color4 { get { return getFlag( GL_MAP2_COLOR_4 ); } set { setFlag( GL_MAP2_COLOR_4, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate color indices. */ public bool Map2Index { get { return getFlag( GL_MAP2_INDEX ); } set { setFlag( GL_MAP2_INDEX, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate normals. */ public bool Map2Normal { get { return getFlag( GL_MAP2_NORMAL ); } set { setFlag( GL_MAP2_NORMAL, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s texture coordinates. */ public bool Map2TectureCoord1 { get { return getFlag( GL_MAP2_TEXTURE_COORD_1 ); } set { setFlag( GL_MAP2_TEXTURE_COORD_1, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s and t texture coordinates. */ public bool Map2TectureCoord2 { get { return getFlag( GL_MAP2_TEXTURE_COORD_2 ); } set { setFlag( GL_MAP2_TEXTURE_COORD_2, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s, t and r texture coordinates. */ public bool Map2TectureCoord3 { get { return getFlag( GL_MAP2_TEXTURE_COORD_3 ); } set { setFlag( GL_MAP2_TEXTURE_COORD_3, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate s, t, r and q texture coordinates. */ public bool Map2TectureCoord4 { get { return getFlag( GL_MAP2_TEXTURE_COORD_4 ); } set { setFlag( GL_MAP2_TEXTURE_COORD_4, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate x, y and z vertex coordinates. */ public bool Map2Vertex3 { get { return getFlag( GL_MAP2_VERTEX_3 ); } set { setFlag( GL_MAP2_VERTEX_3, value ); } } /** \brief If enabled, calls to glEvalCoord1, glEvalMesh1 and glEvalPoint1 will generate homogeneous x, y, z and w vertex coordinates. */ public bool Map2Vertex4 { get { return getFlag( GL_MAP2_VERTEX_4 ); } set { setFlag( GL_MAP2_VERTEX_4, value ); } } /** \brief If enabled, normal vectors specified with glNormal are scaled to unit length after transformation. */ public bool Normalize { get { return getFlag( GL_NORMALIZE ); } set { setFlag( GL_NORMALIZE, value ); } } /** \brief If enabled, draw points with proper filtering. Otherwise, draw aliased points. */ public bool PointSmooth { get { return getFlag( GL_POINT_SMOOTH ); } set { setFlag( GL_POINT_SMOOTH, value ); } } /** \brief If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. */ public bool PolygonSmooth { get { return getFlag( GL_POLYGON_SMOOTH ); } set { setFlag( GL_POLYGON_SMOOTH, value ); } } /** \brief If enabled, use the current polygon stipple patttern when rendering polygons. */ public bool PolygonStipple { get { return getFlag( GL_POLYGON_STIPPLE ); } set { setFlag( GL_POLYGON_STIPPLE, value ); } } /** \brief If enabled, discard fragments that are outside the scissor rectangle. */ public bool ScissorTest { get { return getFlag( GL_SCISSOR_TEST ); } set { setFlag( GL_SCISSOR_TEST, value ); } } /** \brief If enabled, do stencil testing and update the stencil buffer. */ public bool StencilTest { get { return getFlag( GL_STENCIL_TEST ); } set { setFlag( GL_STENCIL_TEST, value ); } } /** \brief If enabled, one-dimensional texturing is performed (unless two-dimensional texturing is also enabled). */ public bool Texture1D { get { return getFlag( GL_TEXTURE_1D ); } set { setFlag( GL_TEXTURE_1D, value ); } } /** \brief If enabled, two-dimensional texturing is performed. */ public bool Texture2D { get { return getFlag( GL_TEXTURE_2D ); } set { setFlag( GL_TEXTURE_2D, value ); } } /** \brief If enabled, the q texture coordinate is computed using the texture generation function defined with glTexGen. Otherwise, the current q texture coordinate is used. */ public bool TextureGenQ { get { return getFlag( GL_TEXTURE_GEN_Q ); } set { setFlag( GL_TEXTURE_GEN_Q, value ); } } /** \brief If enabled, the r texture coordinate is computed using the texture generation function defined with glTexGen. Otherwise, the current r texture coordinate is used. */ public bool TextureGenR { get { return getFlag( GL_TEXTURE_GEN_R ); } set { setFlag( GL_TEXTURE_GEN_R, value ); } } /** \brief If enabled, the s texture coordinate is computed using the texture generation function defined with glTexGen. Otherwise, the current s texture coordinate is used. */ public bool TextureGenS { get { return getFlag( GL_TEXTURE_GEN_S ); } set { setFlag( GL_TEXTURE_GEN_S, value ); } } /** \brief If enabled, the t texture coordinate is computed using the texture generation function defined with glTexGen. Otherwise, the current t texture coordinate is used. */ public bool TextureGenT { get { return getFlag( GL_TEXTURE_GEN_T ); } set { setFlag( GL_TEXTURE_GEN_T, value ); } } } } } --- NEW FILE: AssemblyInfo_csdGLGtk.cs --- using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following // attributes. // // change them to the information which is associated with the assembly // you compile. [assembly: AssemblyTitle("csDragons.OpenGL")] [assembly: AssemblyDescription("Wrapper-Library for OpenGL with Gtk#-Widget")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("csDragons")] [assembly: AssemblyProduct("csDragons OpenGL.NET")] [assembly: AssemblyCopyright("(C)Copyright 2004 by Tim Rädisch & Kai Reichert")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has following format : // // Major.Minor.Build.Revision // // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): [assembly: AssemblyVersion("0.1.*")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. // This is not required, if you don't want signing let these attributes like they're. [assembly: AssemblyDelaySign(true)] [assembly: AssemblyKeyFile("PublicKeyFile.snk")] --- NEW FILE: Exceptions.cs --- using System; namespace csDragons { namespace OpenGL { /** \brief General OpenGL Error * * This class is the base class for all OpenGL Exceptions */ public class GLException : Exception {}; /** \brief Invalid OpenGL enumeration value * * An unacceptable value is specified for an enumerated argument. * The offending command is ignored, having no side effect other than to set the error flag. */ public class GLInvalidEnumException : GLException {}; /** \brief Invalid OpenGL argument value * * A numeric argument is out of range. The offending command is ignored, * having no side effect other than to set the error flag. */ public class GLInvalidValue : GLException {}; /** \brief Invalid OpenGL operation * * The specified operation is not allowed in the current state. * The offending command is ignored, having no side effect other than to set the error flag. */ public class GLInvalidOperation : GLException {}; /** \brief Stack Overflow * * This command would cause a stack overflow. The offending command is * ignored, having no side effect other than to set the error flag. */ public class GLStackOverflow : GLException {}; /** \brief Stack Underflow * * This command would cause a stack underflow. The offending command is * ignored, having no side effect other than to set the error flag. */ public class GLStackUnderflow : GLException {}; /** \brief Out of Memory * * There is not enough memory left to execute the command. The state of * the GL is undefined, except for the state of the error flags, after this error is recorded. */ public class GLOutOfMemory : GLException {}; /** \brief No GL Context available * * This Exception is raised if there is an fatal error * during obtaining the OpenGL context. */ public class NoGLContextException : GLException {} /** \brief No X Display available * * This Exception is raised if no XDisplay can be used. */ public class NoXDisplayException : GLException {} } } |
From: Tim R. <ti...@us...> - 2004-08-05 13:09:24
|
Update of /cvsroot/csdopenglnet/csdOpenGL/doxygen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21768/doxygen Modified Files: Makefile Added Files: cg.conf cgFX.conf Removed Files: freeglut.conf Log Message: Cg binding --- freeglut.conf DELETED --- Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/doxygen/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 2 Aug 2004 08:27:31 -0000 1.4 --- Makefile 5 Aug 2004 13:09:15 -0000 1.5 *************** *** 1,15 **** ! all: xml/gl_8h.xml ! xml/gl_8h.xml: /usr/include/GL/gl.h doxygen doxygen.conf clean: rm -rf html rm -rf xml .IGNORE: clean ! freeglut .EXPORT_ALL_VARIABLES: --- 1,29 ---- ! all: GL Cg CgFX ! ! GL: xml/index.xml + Cg: cg_xml/index.xml ! CgFX: cgFX_xml/index.xml ! ! xml/index.xml: /usr/include/GL/gl.h doxygen doxygen.conf + cg_xml/index.xml: + doxygen cg.conf + + cgFX_xml/index.xml: + doxygen cgFX.conf + clean: rm -rf html rm -rf xml + rm -rf cg_* + rm -rf cgFX_* .IGNORE: clean ! cg ! cgFX .EXPORT_ALL_VARIABLES: *************** *** 17,20 **** .PHONY: clean ! freeglut --- 31,35 ---- .PHONY: clean ! cg ! cgFX --- NEW FILE: cgFX.conf --- # Doxyfile 1.3.5 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. [...1059 lines suppressed...] # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO --- NEW FILE: cg.conf --- # Doxyfile 1.3.5 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. [...1059 lines suppressed...] # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO |