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-16 15:44:20
|
Update of /cvsroot/csdopenglnet/csdOpenGL/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv768/samples Modified Files: texture.cs Added Files: Flag.bmp Log Message: corrected ByteTexture2DCVS: ---------------------------------------------------------------------- Index: texture.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/texture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** texture.cs 6 Aug 2004 11:42:34 -0000 1.3 --- texture.cs 16 Aug 2004 15:44:10 -0000 1.4 *************** *** 37,41 **** glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); ! tex1 = new ByteTexture2D( "image1.png" ); uint[] i = new uint[1]; glGenTextures( 1, i ); --- 37,41 ---- glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); ! tex1 = new ByteTexture2D( "Flag.bmp" ); uint[] i = new uint[1]; glGenTextures( 1, i ); --- NEW FILE: Flag.bmp --- (This appears to be a binary file; contents omitted.) |
From: Tim R. <ti...@us...> - 2004-08-16 15:44:20
|
Update of /cvsroot/csdopenglnet/csdOpenGL/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv768/tools Modified Files: ByteTexture2D.cs Log Message: corrected ByteTexture2DCVS: ---------------------------------------------------------------------- Index: ByteTexture2D.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/tools/ByteTexture2D.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ByteTexture2D.cs 12 Jul 2004 17:17:29 -0000 1.1.1.1 --- ByteTexture2D.cs 16 Aug 2004 15:44:11 -0000 1.2 *************** *** 68,72 **** protected int lin( int x, int y, int z ) { ! return (Height-y-1)*(Height*Bits) + x*(Bits) + z; } --- 68,72 ---- protected int lin( int x, int y, int z ) { ! return (Height-y-1)*(Width*Bits) + x*(Bits) + z; } |
From: Tim R. <ti...@us...> - 2004-08-16 08:20:35
|
Update of /cvsroot/csdopenglnet/csdOpenGL/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24601/tools Modified Files: Makefile Added Files: gtkAdvanced.cs Log Message: include basic Gtk-Gl-Frame into Tools --- NEW FILE: gtkAdvanced.cs --- using csDragons.OpenGL; using GLib; using GdkSharp; using Gtk; using GtkSharp; using System; using System.Diagnostics; public class GtkAdvanced : GL { protected Gtk.Window window; protected GtkGLArea glarea; protected Entry rotX_entry; protected Entry rotY_entry; protected Entry rotZ_entry; protected Entry speedX_entry; protected Entry speedY_entry; protected Entry speedZ_entry; protected Button reset_btn; protected ToggleButton animate_tglbtn; protected Button update_btn; protected float propRotX, propRotY, propRotZ; protected float propSpeedX, propSpeedY, propSpeedZ; protected bool propAnimate; protected bool stop = true; protected double mouseX = 0.0; protected double mouseY = 0.0; public GtkAdvanced() { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvaned()" ); Debug.WriteLine( "Init Application" ); Application.Init(); Debug.WriteLine( "Init Window" ); window = new Gtk.Window( "Gtk Frame" ); window.ReallocateRedraws = true; window.DeleteEvent += new DeleteEventHandler( OnDeleteEvent ); window.Resize( 640, 480 ); Debug.WriteLine( "Init GtkGLArea" ); glarea = new GtkGLArea(); glarea.Events = Gdk.EventMask.PointerMotionMask | Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask; glarea.Realized += new EventHandler( OnRealized ); glarea.ConfigureEvent += new ConfigureEventHandler( OnConfigure ); glarea.ExposeEvent += new ExposeEventHandler( OnExpose ); glarea.MapEvent += new MapEventHandler( OnMap ); glarea.UnmapEvent += new UnmapEventHandler( OnUnmap ); glarea.MotionNotifyEvent += new MotionNotifyEventHandler( OnMotionNotify ); glarea.ButtonReleaseEvent += new ButtonReleaseEventHandler( OnButtonRelease ); glarea.ButtonPressEvent += new ButtonPressEventHandler( OnButtonPress ); Debug.WriteLine( "Init rotation entry fields" ); rotX_entry = new Entry(); rotX_entry.ActivatesDefault = true; rotY_entry = new Entry(); rotY_entry.ActivatesDefault = true; rotZ_entry = new Entry(); rotZ_entry.ActivatesDefault = true; Debug.WriteLine( "Init speed entry fields" ); speedX_entry = new Entry(); speedX_entry.ActivatesDefault = true; speedY_entry = new Entry(); speedY_entry.ActivatesDefault = true; speedZ_entry = new Entry(); speedZ_entry.ActivatesDefault = true; Debug.WriteLine( "Init Table-Layout rotTable" ); Table rotTable = new Table( 2, 3, false ); rotTable.Attach( new Label( "x-rotation: " ), 0, 1, 0, 1 ); rotTable.Attach( rotX_entry, 1, 2, 0, 1 ); rotTable.Attach( new Label( "y-rotation: " ), 0, 1, 1, 2 ); rotTable.Attach( rotY_entry, 1, 2, 1, 2 ); rotTable.Attach( new Label( "z-rotation: " ), 0, 1, 2, 3 ); rotTable.Attach( rotZ_entry, 1, 2, 2, 3 ); Debug.WriteLine( "Init Table-Layout speedTable" ); Table speedTable = new Table( 2, 3, false ); speedTable.Attach( new Label( "x-speed: " ), 0, 1, 0, 1 ); speedTable.Attach( speedX_entry, 1, 2, 0, 1 ); speedTable.Attach( new Label( "y-speed: " ), 0, 1, 1, 2 ); speedTable.Attach( speedY_entry, 1, 2, 1, 2 ); speedTable.Attach( new Label( "z-speed: " ), 0, 1, 2, 3 ); speedTable.Attach( speedZ_entry, 1, 2, 2, 3 ); Debug.WriteLine( "Init buttons" ); animate_tglbtn = new ToggleButton( "Animate" ); animate_tglbtn.Toggled += new EventHandler( OnButton ); reset_btn = new Button( "Reset" ); reset_btn.Clicked += new EventHandler( OnButton ); update_btn = new Button( "Update" ); update_btn.Clicked += new EventHandler( OnButton ); update_btn.CanFocus = true; update_btn.CanDefault = true; window.Default = update_btn; Debug.WriteLine( "Init Table-Layout buttonTable" ); Table buttonTable = new Table( 3, 1, true ); buttonTable.Attach( animate_tglbtn, 0, 1, 0, 1 ); buttonTable.Attach( reset_btn, 0, 1, 1, 2 ); buttonTable.Attach( update_btn, 0, 1, 2, 3 ); Debug.WriteLine( "Init HBox-Layout hbox" ); HBox hbox = new HBox( false, 4 ); hbox.PackStart( rotTable, false, true, 5 ); hbox.PackStart( speedTable, false, true, 5 ); hbox.PackEnd( buttonTable, false, true, 5 ); Debug.WriteLine( "Init VBox-Layout vbox" ); VBox vbox = new VBox( false, 2 ); vbox.PackStart( glarea, true, true, 5 ); vbox.PackEnd( hbox, false, true, 5 ); Debug.WriteLine( "Display Window" ); window.Add( vbox ); window.ShowAll(); setDefaults(); Debug.WriteLine( "MainLoop" ); Application.Run (); Debug.WriteLine( "Exiting GtkAdvaned()" ); Debug.Unindent(); } protected void updateValues() { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.updateValues()" ); bool p = animate; animate = false; Debug.WriteLine( "Setting speed" ); try { speedX = System.Convert.ToSingle( speedX_entry.Text ); } catch { speedX_entry.Text = speedX.ToString(); } try { speedY = System.Convert.ToSingle( speedY_entry.Text ); } catch { speedY_entry.Text = speedY.ToString(); } try { speedZ = System.Convert.ToSingle( speedZ_entry.Text ); } catch { speedZ_entry.Text = speedZ.ToString(); } Debug.WriteLine( "Setting angle" ); try { rotX = System.Convert.ToSingle( rotX_entry.Text ); } catch { rotX_entry.Text = rotX.ToString(); } try { rotY = System.Convert.ToSingle( rotY_entry.Text ); } catch { rotY_entry.Text = rotY.ToString(); } try { rotZ = System.Convert.ToSingle( rotZ_entry.Text ); } catch { rotZ_entry.Text = rotZ.ToString(); } animate = p; Debug.WriteLine( "Exiting GtkAdvanced.updateValues()" ); Debug.Unindent(); } protected void setDefaults() { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.setDefaults()" ); animate = false; rotX = 0.0f; rotY = 0.0f; rotZ = 0.0f; speedX = 0.1f; speedY = 0.2f; speedZ = 0.5f; Debug.WriteLine( "Exiting GtkAdvanced.setDefaults()" ); Debug.Unindent(); } protected virtual bool Animate () { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.Animate()" ); rotX += speedX; rotY += speedY; rotZ += speedZ; if ( (glarea!=null) && (!stop) ) glarea.QueueDraw (); Debug.WriteLine( "Entering GtkAdvanced.Animate() *" ); Debug.Unindent(); return animate; } protected void OnMap (object obj, MapEventArgs args) { Debug.Indent(); Debug.WriteLine( "Enering GtkAdvanced.OnMap( object, MapEventArgs )" ); stop = false; Debug.WriteLine( "Exiting GtkAdvanced.OnMap( object, MapEventArgs )" ); Debug.Unindent(); } protected void OnUnmap (object obj, UnmapEventArgs args) { Debug.Indent(); Debug.WriteLine( "Enering GtkAdvanced.OnUnmap( object, UnapEventArgs )" ); stop = true; Debug.WriteLine( "Exiting GtkAdvanced.OnUnmap( object, UnapEventArgs )" ); Debug.Unindent(); } protected void OnExpose (object obj, ExposeEventArgs args) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnExpose( object, ExposeEventArgs )" ); if (glarea.MakeCurrent()) { glClearColor( 0, 0, 0, 0 ); glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glPushMatrix(); glRotatef( rotX, 1.0f, 0.0f, 0.0f ); glRotatef( rotY, 0.0f, 1.0f, 0.0f ); glRotatef( rotZ, 0.0f, 0.0f, 1.0f ); draw(); glPopMatrix(); glarea.WaitGL(); glarea.WaitX(); glarea.SwapBuffers(); } else Debug.WriteLine( "MakeCurrent() failed" ); Debug.WriteLine( "Exiting GtkAdvanced.OnExpose( object, ExposeEventArgs )" ); Debug.Unindent(); } protected void OnMotionNotify( object obj, MotionNotifyEventArgs args) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnMotionNotify( object, MotionNotifyEventArgs )" ); if ( (args.Event.State==Gdk.ModifierType.Button1Mask) || (args.Event.State==Gdk.ModifierType.Button3Mask) ) { int w = 0; int h = 0; glarea.GdkWindow.GetSize( out w, out h ); if ( args.Event.State==Gdk.ModifierType.Button1Mask ) { if ( mouseX>=0.0 ) { Debug.WriteLine( "y-rotation" ); rotY += ((float)(args.Event.X-mouseX)) * 360.0f / w; } else mouseX = args.Event.X; if ( mouseY>=0.0 ) { Debug.WriteLine( "x-rotation" ); rotX += ((float)(args.Event.Y-mouseY)) * 360.0f / h; mouseY = args.Event.Y; } else mouseY = args.Event.Y; } if ( args.Event.State==Gdk.ModifierType.Button3Mask ) { if ( mouseX>=0.0 ) { Debug.WriteLine( "y-rotation" ); rotZ += ((float)(args.Event.X-mouseX)) * 360.0f / w; } else mouseX = args.Event.X; } mouseX = args.Event.X; } Debug.WriteLine( "Exiting GtkAdvanced.OnMotionNotify( object, MotionNotifyEventArgs )" ); Debug.Unindent(); } protected void OnButtonPress( object obj, ButtonPressEventArgs args ) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnButtonPress( object, ButtonPressEventArgs )" ); mouseX = args.Event.X; mouseY = args.Event.Y; Debug.WriteLine( "Exiting GtkAdvanced.OnButtonPress( object, ButtonPressEventArgs )" ); Debug.Unindent(); } protected void OnButtonRelease( object obj, ButtonReleaseEventArgs args ) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnButtonRelease( object, ButtonReleaseEventArgs )" ); mouseX = -1.0; mouseY = -1.0; Debug.WriteLine( "Exiting GtkAdvanced.OnButtonRelease( object, ButtonReleaseEventArgs )" ); Debug.Unindent(); } protected virtual void draw() { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.draw()" ); Debug.WriteLine( "Exiting GtkAdvanced.draw()" ); Debug.Unindent(); } protected virtual void makeCamera() { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.makeCamera()" ); glViewport(0, 0, glarea.Allocation.Width, glarea.Allocation.Height); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); double h = (double) glarea.Allocation.Height / (double) (glarea.Allocation.Width); glFrustum( -.0, 1.0, -h, h, 5.0f, 5.0 ); Console.WriteLine( glGetError() ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); Debug.WriteLine( "Exiting GtkAdvanced.makeCamera()" ); Debug.Unindent(); } protected void OnConfigure (object obj, ConfigureEventArgs args) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnConfigure( object, ConfigureEventArgs )" ); if (glarea.MakeCurrent()) { makeCamera(); } else Debug.WriteLine( "MakeCurrent() failed" ); Debug.WriteLine( "Exiting GtkAdvanced.OnConfigure( object, ConfigureEventArgs )" ); Debug.Unindent(); } protected virtual void createEnvironment() { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.createEnvironment()" ); glShadeModel( GL_SMOOTH ); glClearColor( 0.0f, 0.0f, 0.0f, 0.5f ); glClearDepth( 1.0f ); glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); Debug.WriteLine( "Exiting GtkAdvanced.createEnvironment()" ); Debug.Unindent(); } protected void OnRealized (object obj, EventArgs args) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnRealized( object, EventArgs )" ); if (glarea.MakeCurrent()) { createEnvironment(); } else Debug.WriteLine( "MakeCurrent() failed" ); Debug.WriteLine( "Exiting GtkAdvanced.OnRealized( object, EventArgs )" ); Debug.Unindent(); } protected void OnButton( object obj, EventArgs args ) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnButton( objec, EventArgs )" ); if (obj==reset_btn) { setDefaults(); } else if (obj==animate_tglbtn) { animate = animate_tglbtn.Active; } else if (obj==update_btn) { updateValues(); } Debug.WriteLine( "Exiting GtkAdvanced.OnButton( objec, EventArgs )" ); Debug.Unindent(); } protected void OnDeleteEvent (object obj, DeleteEventArgs args) { Debug.Indent(); Debug.WriteLine( "Entering GtkAdvanced.OnDeleteEvent( object, DeleteEventArgs )" ); Application.Quit (); Debug.WriteLine( "Exiting GtkAdvanced.OnDeleteEvent( object, DeleteEventArgs )" ); Debug.Unindent(); } protected float rotX { get { Debug.WriteLine( "rotX->get" ); return propRotX; } set { Debug.WriteLine( "rotX->set" ); propRotX = value; while (propRotX<0) propRotX += 360.0f; while (propRotX>=360.0f) propRotX -= 360.0f; rotX_entry.Text = propRotX.ToString(); if ( (glarea!=null) && (!stop) ) glarea.QueueDraw (); } } protected float rotY { get { Debug.WriteLine( "rotY->get" ); return propRotY; } set { Debug.WriteLine( "rotY->set" ); propRotY = value; while (propRotY<0) propRotY += 360.0f; while (propRotY>=360.0f) propRotY -= 360.0f; rotY_entry.Text = propRotY.ToString(); if ( (glarea!=null) && (!stop) ) glarea.QueueDraw (); } } protected float rotZ { get { Debug.WriteLine( "rotZ->get" ); return propRotZ; } set { Debug.WriteLine( "rotZ->set" ); propRotZ = value; while (propRotZ<0) propRotZ += 360.0f; while (propRotZ>=360.0f) propRotZ -= 360.0f; rotZ_entry.Text = propRotZ.ToString(); if ( (glarea!=null) && (!stop) ) glarea.QueueDraw (); } } protected float speedX { get { Debug.WriteLine( "speedX->get" ); return propSpeedX; } set { Debug.WriteLine( "speedX->set" ); propSpeedX = value; while (propSpeedX<=-360.0f) propSpeedX += 360.0f; while (propSpeedX>=360.0f) propSpeedX -= 360.0f; speedX_entry.Text = propSpeedX.ToString(); } } protected float speedY { get { Debug.WriteLine( "speedY->get" ); return propSpeedY; } set { Debug.WriteLine( "speedY->set" ); propSpeedY = value; while (propSpeedY<=-360.0f) propSpeedY += 360.0f; while (propSpeedY>=360.0f) propSpeedY -= 360.0f; speedY_entry.Text = propSpeedY.ToString(); } } protected float speedZ { get { Debug.WriteLine( "speedZ->get" ); return propSpeedZ; } set { Debug.WriteLine( "speedZ->set" ); propSpeedZ = value; while (propSpeedZ<=-360.0f) propSpeedZ += 360.0f; while (propSpeedZ>=360.0f) propSpeedZ -= 360.0f; speedZ_entry.Text = propSpeedZ.ToString(); } } protected bool animate { get { Debug.WriteLine( "animate->get" ); return propAnimate; } set { Debug.WriteLine( "animate->set" ); if ( value && !propAnimate ) GLib.Idle.Add (new IdleHandler (Animate)); propAnimate = value; animate_tglbtn.Active = value; } } } Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/tools/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 17 Jul 2004 17:21:20 -0000 1.4 --- Makefile 16 Aug 2004 08:20:26 -0000 1.5 *************** *** 1,8 **** ! FILES=ByteTexture2D.cs AssemblyInfo.cs CC=mcs DEBUG=/d:DEBUG DEBUG= ! OPTS=$(DEBUG) -lib:/usr/lib/mono/gtk-sharp ! MCS=$(CC) $(OPTS) PACKAGE=csDragons GAC=gacutil $(GACUTIL_FLAGS) --- 1,10 ---- ! FILES=ByteTexture2D.cs AssemblyInfo.cs gtkAdvanced.cs CC=mcs DEBUG=/d:DEBUG DEBUG= ! OPTS=$(DEBUG) -lib:/usr/lib/mono/gtk-sharp -lib:/usr/lib/mono/csDragons ! LIBS=csdCg.dll csdGL_Gtk.dll csdGLtools.dll glib-sharp.dll gtk-sharp.dll gdk-sharp.dll ! LIBOPTS=$(foreach lib,$(LIBS),-r $(lib)) ! MCS=$(CC) $(OPTS) $(LIBOPTS) PACKAGE=csDragons GAC=gacutil $(GACUTIL_FLAGS) |
From: Tim R. <ti...@us...> - 2004-08-13 12:27:14
|
Update of /cvsroot/csdopenglnet/csdOpenGL/doxygen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14040/doxygen Modified Files: Makefile Log Message: the xml source files are now included Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/doxygen/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 5 Aug 2004 13:09:15 -0000 1.5 --- Makefile 13 Aug 2004 12:27:05 -0000 1.6 *************** *** 16,19 **** --- 16,23 ---- doxygen cgFX.conf + install: + cp xml/gl_8h.xml xml/glu_8h.xml xml/glut_8h.xml xml/glxtokens_8h.xml ../GL + cp cg_xml/cgGL_8h.xml cg_xml/cg_8h.xml ../Cg + clean: rm -rf html |
From: Tim R. <ti...@us...> - 2004-08-13 12:27:14
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14040/Cg Modified Files: Makefile Added Files: cgGL_8h.xml cg_8h.xml gl_8h.xml Log Message: the xml source files are now included --- NEW FILE: gl_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="gl_8h" kind="file"> <compoundname>gl.h</compoundname> <includes refid="glext_8h" local="no">GL/glext.h</includes> <includedby refid="glut_8h" local="no">glut.h</includedby> <includedby refid="glu_8h" local="no">glu.h</includedby> <incdepgraph> <node id="27"> <label>GL/glext.h</label> <link refid="glext_8h"/> <childnode refid="28" relation="include"> </childnode> </node> <node id="26"> <label>gl.h</label> <link refid="gl.h"/> <childnode refid="27" relation="include"> </childnode> [...16199 lines suppressed...] <param> <type><ref refid="gl_8h_1a774" kindref="member">GLsizei</ref></type> <declname>height</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/GL/gl.h" line="1627"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/GL/gl.h"/> </compounddef> </doxygen> --- NEW FILE: cg_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="cg_8h" kind="file"> <compoundname>cg.h</compoundname> <includes refid="cg__datatypes_8h" local="no">Cg/cg_datatypes.h</includes> <includes refid="cg__bindlocations_8h" local="no">Cg/cg_bindlocations.h</includes> <includes refid="cg__profiles_8h" local="no">Cg/cg_profiles.h</includes> <includes refid="cg__errors_8h" local="no">Cg/cg_errors.h</includes> <includes refid="cg__enums_8h" local="no">Cg/cg_enums.h</includes> <includes local="no">stdarg.h</includes> <includedby refid="cgGL_8h" local="no">cgGL.h</includedby> <incdepgraph> <node id="61"> <label>stdarg.h</label> </node> <node id="56"> <label>Cg/cg_bindlocations.h</label> <link refid="cg__bindlocations_8h"/> </node> [...2519 lines suppressed...] <param> <type><ref refid="cg_8h_1a13" kindref="member">CGparameter</ref></type> <declname>current</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/Cg/cg.h" line="353"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/Cg/cg.h"/> </compounddef> </doxygen> Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile 13 Aug 2004 09:24:19 -0000 1.10 --- Makefile 13 Aug 2004 12:27:05 -0000 1.11 *************** *** 25,36 **** ln -sf ../cbonding/libcsdGL.so - cg_8h.xml: - ln -sf ../doxygen/cg_xml/cg_8h.xml . - - cgGL_8h.xml: - ln -sf ../doxygen/cg_xml/cgGL_8h.xml . - gl_8h.xml: ! ln -sf ../doxygen/xml/gl_8h.xml . csdCgBase.cs: cg_8h.xml cg.xml --- 25,30 ---- ln -sf ../cbonding/libcsdGL.so gl_8h.xml: ! ln -sf ../GL/gl_8h.xml . csdCgBase.cs: cg_8h.xml cg.xml --- NEW FILE: cgGL_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="cgGL_8h" kind="file"> <compoundname>cgGL.h</compoundname> <includes refid="cg_8h" local="no">Cg/cg.h</includes> <includes local="no">GL/gl.h</includes> <incdepgraph> <node id="95"> <label>stdarg.h</label> </node> <node id="90"> <label>Cg/cg_bindlocations.h</label> <link refid="cg__bindlocations_8h"/> </node> <node id="93"> <label>Cg/cg_errors.h</label> <link refid="cg__errors_8h"/> </node> <node id="94"> [...1925 lines suppressed...] <param> <type><ref refid="cg_8h_1a11" kindref="member">CGcontext</ref></type> <declname>ctx</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/Cg/cgGL.h" line="366"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/Cg/cgGL.h"/> </compounddef> </doxygen> |
From: Tim R. <ti...@us...> - 2004-08-13 12:27:14
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14040/GL Modified Files: Makefile Added Files: gl_8h.xml glext.xml glu_8h.xml glut_8h.xml glxtokens_8h.xml Log Message: the xml source files are now included --- NEW FILE: gl_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="gl_8h" kind="file"> <compoundname>gl.h</compoundname> <includes refid="glext_8h" local="no">GL/glext.h</includes> <includedby refid="glut_8h" local="no">glut.h</includedby> <includedby refid="glu_8h" local="no">glu.h</includedby> <incdepgraph> <node id="27"> <label>GL/glext.h</label> <link refid="glext_8h"/> <childnode refid="28" relation="include"> </childnode> </node> <node id="26"> <label>gl.h</label> <link refid="gl.h"/> <childnode refid="27" relation="include"> </childnode> [...16199 lines suppressed...] <param> <type><ref refid="gl_8h_1a774" kindref="member">GLsizei</ref></type> <declname>height</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/GL/gl.h" line="1627"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/GL/gl.h"/> </compounddef> </doxygen> --- NEW FILE: glext.xml --- <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xmlInput>glext_8h.xml</xmlInput> <linkLibrary>libGL.so</linkLibrary> <className>csdGLExtBase</className> <upperClass>csdGLUBase</upperClass> <outputFile>csdGLExtBase.cs</outputFile> <writeFunctions>true</writeFunctions> <writeDelegates>true</writeDelegates> <writeDefines>true</writeDefines> <BaseTypes> </BaseTypes> <TypeDefs> </TypeDefs> <Namespace>csDragons.OpenGL</Namespace> </Configuration> --- NEW FILE: glxtokens_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="glxtokens_8h" kind="file"> <compoundname>glxtokens.h</compoundname> <sectiondef kind="define"> <memberdef kind="define" id="glxtokens_8h_1a0" prot="public" static="no"> <name>GLX_VERSION_1_1</name> <initializer>1</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/GL/glxtokens.h" line="27" bodystart="27" bodyend="-1"/> </memberdef> <memberdef kind="define" id="glxtokens_8h_1a1" prot="public" static="no"> <name>GLX_VERSION_1_2</name> <initializer>1</initializer> [...1646 lines suppressed...] </memberdef> <memberdef kind="define" id="glxtokens_8h_1a151" prot="public" static="no"> <name>GLX_FLOAT_COMPONENTS_NV</name> <initializer>0x20B0</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/GL/glxtokens.h" line="254" bodystart="291" bodyend="-1"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/GL/glxtokens.h"/> </compounddef> </doxygen> --- NEW FILE: glu_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="glu_8h" kind="file"> <compoundname>glu.h</compoundname> <includes refid="gl_8h" local="no">GL/gl.h</includes> <includedby refid="glut_8h" local="no">glut.h</includedby> <incdepgraph> <node id="40"> <label>GL/glext.h</label> <link refid="glext_8h"/> <childnode refid="41" relation="include"> </childnode> </node> <node id="38"> <label>glu.h</label> <link refid="glu.h"/> <childnode refid="39" relation="include"> </childnode> </node> [...3485 lines suppressed...] <param> <type><ref refid="gl_8h_1a780" kindref="member">GLdouble</ref> *</type> <declname>objW</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/GL/glu.h" line="323"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/GL/glu.h"/> </compounddef> </doxygen> --- NEW FILE: glut_8h.xml --- <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.3.6"> <compounddef id="glut_8h" kind="file"> <compoundname>glut.h</compoundname> <includes refid="gl_8h" local="no">GL/gl.h</includes> <includes refid="glu_8h" local="no">GL/glu.h</includes> <incdepgraph> <node id="46"> <label>GL/glext.h</label> <link refid="glext_8h"/> <childnode refid="47" relation="include"> </childnode> </node> <node id="48"> <label>GL/glu.h</label> <link refid="glu_8h"/> <childnode refid="45" relation="include"> </childnode> </node> [...4205 lines suppressed...] <type>GLUTAPI void *</type> <definition>GLUTAPI void* glutBitmapHelvetica18</definition> <argsstring></argsstring> <name>glutBitmapHelvetica18</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/include/GL/glut.h" line="384" bodystart="384" bodyend="-1"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <location file="/usr/include/GL/glut.h"/> </compounddef> </doxygen> Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 13 Aug 2004 08:26:43 -0000 1.3 --- Makefile 13 Aug 2004 12:27:05 -0000 1.4 *************** *** 36,55 **** $(GEN) glut.xml - - gl_8h.xml: - ln -sf ../doxygen/xml/gl_8h.xml . - - glext_8h.xml: - ln -sf ../doxygen/xml/glext_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 --- 36,39 ---- *************** *** 72,76 **** rm -f csdGLUTBase.cs rm -f csdGLXTokens.cs - rm -f *_8h.xml .IGNORE: --- 56,59 ---- |
From: Tim R. <ti...@us...> - 2004-08-13 12:27:14
|
Update of /cvsroot/csdopenglnet/csdOpenGL/math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14040/math Modified Files: Makefile Added Files: PublicKeyFile.snk Log Message: the xml source files are now included Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/math/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 13 Aug 2004 09:24:19 -0000 1.2 --- Makefile 13 Aug 2004 12:27:06 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- CC=mcs DEBUG=/d:DEBUG + DEBUG= OPTS=$(DEBUG) LIBS= --- NEW FILE: PublicKeyFile.snk --- (This appears to be a binary file; contents omitted.) |
From: Tim R. <ti...@us...> - 2004-08-13 12:27:13
|
Update of /cvsroot/csdopenglnet/csdOpenGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14040 Modified Files: Makefile Log Message: the xml source files are now included Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 5 Aug 2004 16:10:51 -0000 1.6 --- Makefile 13 Aug 2004 12:27:05 -0000 1.7 *************** *** 1,4 **** all: - $(MAKE) -C doxygen $(MAKE) -C cbonding $(MAKE) -C generator --- 1,3 ---- *************** *** 11,14 **** --- 10,17 ---- $(MAKE) -C doc + rebuildxml: + $(MAKE) -C doxygen + $(MAKE) -C doxygen install + test: $(MAKE) -C samples *************** *** 18,21 **** --- 21,25 ---- $(MAKE) -C Cg install $(MAKE) -C tools install + $(MAKE) -C math install $(MAKE) -C cbonding install *************** *** 27,31 **** clean: - $(MAKE) -C doxygen clean $(MAKE) -C cbonding clean $(MAKE) -C generator clean --- 31,34 ---- |
From: Tim R. <ti...@us...> - 2004-08-13 09:25:00
|
Update of /cvsroot/csdopenglnet/csdOpenGL/math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19854 Added Files: AssemblyInfo.cs Bezier.cs Log Message: additional math tools --- NEW FILE: Bezier.cs --- using System; using System.Globalization; namespace csDragons { namespace OpenGL { namespace Math { public class Bezier { public static float Bernstein( int n, int i, float x ) { return (float)(BinKoef( n, i ) * System.Math.Pow( x, i ) * System.Math.Pow( 1-x, n-i )); } public static int Fakultaet( int n ) { return Fakultaet( n, 1); } public static int Fakultaet( int n, int res ) { if (n<=0) { return res; } else { return Fakultaet( n-1, n*res ); } } public static int BinKoef( int n, int i ) { if (n>=i) { return Fakultaet(n) / ( Fakultaet(i) * Fakultaet( n-i ) ); } else return 1; } } } // csDragons end of namespace } // OpenGL end of namespace } // Math end of namespace --- 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.OpenGL - Math")] [assembly: AssemblyDescription("mathemtaical Utility classes")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("csDragons")] [assembly: AssemblyProduct("csDragons OpenGL Tools")] [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")] |
From: Tim R. <ti...@us...> - 2004-08-13 09:24:29
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/Cg Modified Files: Makefile Log Message: inserting install Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile 9 Aug 2004 05:14:49 -0000 1.9 --- Makefile 13 Aug 2004 09:24:19 -0000 1.10 *************** *** 53,57 **** ! install-gac: csdGL.dll csdGL_Gtk.dll $(GAC) /i csdCg.dll /f /package $(PACKAGE) --- 53,57 ---- ! install-gac: csdCg.dll $(GAC) /i csdCg.dll /f /package $(PACKAGE) |
From: Tim R. <ti...@us...> - 2004-08-13 09:24:29
|
Update of /cvsroot/csdopenglnet/csdOpenGL/math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/math Modified Files: Makefile Log Message: inserting install Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/math/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 12 Jul 2004 17:17:21 -0000 1.1.1.1 --- Makefile 13 Aug 2004 09:24:19 -0000 1.2 *************** *** 1,9 **** destAPPS=MathTest.exe destLIBS=csdMath.dll ! LIBFILES=FVector.cs F4Vector.cs F3Vector.cs FMatrix.cs F4Matrix.cs F3Matrix.cs CC=mcs DEBUG=/d:DEBUG OPTS=$(DEBUG) LIBS= all: $(LIBS) MathTest.exe --- 1,11 ---- destAPPS=MathTest.exe destLIBS=csdMath.dll ! LIBFILES=FVector.cs F4Vector.cs F3Vector.cs FMatrix.cs F4Matrix.cs F3Matrix.cs AssemblyInfo.cs Bezier.cs CC=mcs DEBUG=/d:DEBUG OPTS=$(DEBUG) LIBS= + PACKAGE=csDragons + GAC=gacutil $(GACUTIL_FLAGS) all: $(LIBS) MathTest.exe *************** *** 14,17 **** --- 16,30 ---- MathTest.exe: MathTest.cs csdMath.dll $(CC) $(OPTS) -r:csdMath.dll MathTest.cs -out:$@ + + install: install-gac + + install-gac: csdMath.dll + $(GAC) /i csdMath.dll /f /package $(PACKAGE) + + uninstall: uninstall-gac + + uninstall-gac: + $(GAC) /u csdMath + clean: *************** *** 26,27 **** --- 39,42 ---- .PHONY: clean + + |
From: Tim R. <ti...@us...> - 2004-08-13 08:30:26
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10308 Modified Files: demo.cs Log Message: now the demo works correct Index: demo.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** demo.cs 13 Aug 2004 08:26:43 -0000 1.5 --- demo.cs 13 Aug 2004 08:30:09 -0000 1.6 *************** *** 153,157 **** for ( v=0; v<nv; ++v ) { float fv = ((float)v)/((float)(nv-1)); - Console.WriteLine( fv ); for (u=0; u<nu; ++u ) { float fu= ((float)u) /((float)(nu-1)); --- 153,156 ---- *************** *** 246,267 **** } - protected void drawTriangles( uint[] indices ) { - Debug.Indent(); - Debug.WriteLine( "Entering Demo.drawTriangls(uint[])" ); - - int i = 0; - while ( i+8<indices.Length ) { - glBegin( GL_TRIANGLES ); - glVertex3f( indices[i], indices[i+1], indices[i+2] ); - glVertex3f( indices[i+3], indices[i+4], indices[i+5] ); - glVertex3f( indices[i+6], indices[i+7], indices[i+8] ); - glEnd(); - i+=9; - } - - Debug.WriteLine( "Exiting Demo.drawTriangles(uint[])" ); - Debug.Unindent(); - } - protected void ChooseProfiles() { Debug.Indent(); --- 245,248 ---- *************** *** 320,323 **** --- 301,305 ---- uint handle ; uint[] h = new uint[1]; + int dp=0; glGenTextures( 1, h ); handle = h[0]; *************** *** 335,348 **** for ( int j=0; j<res; j++ ) { if ( (i/32+j/32)%2==0 ) { ! data[i*res+j*4] = 0.7f; ! data[i*res+j*4+1] = 0.7f; ! data[i*res+j*4+2] = 0.7f; ! data[i*res+j*4+3] = 0.7f; } else { ! data[i*res+j*4] = 0.1f; ! data[i*res+j*4+1] = 0.1f; ! data[i*res+j*4+2] = 0.1f; ! data[i*res+j*4+3] = 0.1f; } } } --- 317,329 ---- for ( int j=0; j<res; j++ ) { if ( (i/32+j/32)%2==0 ) { ! data[dp++] = 0.7f; ! data[dp++] = 0.7f; ! data[dp++] = 0.7f; } else { ! data[dp++] = 0.1f; ! data[dp++] = 0.1f; ! data[dp++] = 0.1f; } + data[dp++] = 0.1f; } } |
From: Tim R. <ti...@us...> - 2004-08-13 08:26:53
|
Update of /cvsroot/csdopenglnet/csdOpenGL/doxygen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/doxygen Modified Files: doxygen.conf Log Message: first Cg example is running Index: doxygen.conf =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/doxygen/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:17:47 -0000 1.1.1.1 --- doxygen.conf 13 Aug 2004 08:26:44 -0000 1.2 *************** *** 373,377 **** # with spaces. ! INPUT = /usr/include/GL/gl.h /usr/include/GL/glut.h /usr/include/GL/glu.h /usr/include/GL/glxtokens.h # If the value of the INPUT tag contains directories, you can use the --- 373,377 ---- # with spaces. ! INPUT = /usr/include/GL/glext.h /usr/include/GL/gl.h /usr/include/GL/glut.h /usr/include/GL/glu.h /usr/include/GL/glxtokens.h # If the value of the INPUT tag contains directories, you can use the |
From: Tim R. <ti...@us...> - 2004-08-13 08:26:53
|
Update of /cvsroot/csdopenglnet/csdOpenGL/cbonding In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/cbonding Modified Files: Makefile Log Message: first Cg example is running Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/cbonding/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 5 Aug 2004 16:08:27 -0000 1.6 --- Makefile 13 Aug 2004 08:26:44 -0000 1.7 *************** *** 6,13 **** 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 --- 6,13 ---- libcsdGL.so: csdGL.o ! gcc -shared -Wl,-soname,libcsdGL.so.1 $(LIBPATH) -lglut -lGLU -lGL -o libcsdGL.so -lpthread csdGL.o libcsdCg.so: csdCg.o ! gcc -shared -Wl,-soname,libcsdCg.so.1 $(LIBPATH) -lCgGL -lCg -lGL -lGLU -o libcsdCg.so csdCg.o %.o:%.c |
From: Tim R. <ti...@us...> - 2004-08-13 08:26:52
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/GL Modified Files: Makefile Log Message: first Cg example is running Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 5 Aug 2004 15:21:23 -0000 1.2 --- Makefile 13 Aug 2004 08:26:43 -0000 1.3 *************** *** 30,33 **** --- 30,36 ---- $(GEN) glu.xml + csdGLExtBase.cs: glext_8h.xml + $(GEN) glext.xml + csdGLUTBase.cs: gl_8h.xml glut_8h.xml glut.xml $(GEN) glut.xml *************** *** 37,40 **** --- 40,46 ---- ln -sf ../doxygen/xml/gl_8h.xml . + glext_8h.xml: + ln -sf ../doxygen/xml/glext_8h.xml . + glu_8h.xml: ln -sf ../doxygen/xml/glu_8h.xml . |
From: Tim R. <ti...@us...> - 2004-08-13 08:26:52
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/Cg Modified Files: demo.cs Log Message: first Cg example is running Index: demo.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** demo.cs 7 Aug 2004 06:58:39 -0000 1.4 --- demo.cs 13 Aug 2004 08:26:43 -0000 1.5 *************** *** 14,19 **** protected bool haveLoadedPrograms = false; protected int res=512; ! protected float[] P, N, uv; ! protected uint[] indices; public Demo() { --- 14,21 ---- protected bool haveLoadedPrograms = false; protected int res=512; ! protected float[] P = null; ! protected float[] N = null; ! protected float[] uv = null; ! protected uint[] indices = null; public Demo() { *************** *** 37,40 **** --- 39,43 ---- Debug.WriteLine( "Exiting Demo()" ); + Debug.Unindent(); } *************** *** 83,93 **** glRotatef( curTime, 0, 1, 0 ); ! Debug.WriteLine( "Bing Cg programs" ); cgGLBindProgram( vertexProgram ); cgGLBindProgram( fragmentProgram ); Debug.WriteLine( "Bind uniform parameters to vertex shader" ); cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewProj"), CGGLenum.CG_GL_MODELVIEW_PROJECTION_MATRIX, CGGLenum.CG_GL_MATRIX_IDENTITY); cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelView"), CGGLenum.CG_GL_MODELVIEW_MATRIX, CGGLenum.CG_GL_MATRIX_IDENTITY); cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewIT"), CGGLenum.CG_GL_MODELVIEW_MATRIX, CGGLenum.CG_GL_MATRIX_INVERSE_TRANSPOSE); --- 86,99 ---- glRotatef( curTime, 0, 1, 0 ); ! Debug.WriteLine( "Bind Cg programs" ); cgGLBindProgram( vertexProgram ); cgGLBindProgram( fragmentProgram ); Debug.WriteLine( "Bind uniform parameters to vertex shader" ); + Debug.WriteLine( "==> ModelViewProj" ); cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewProj"), CGGLenum.CG_GL_MODELVIEW_PROJECTION_MATRIX, CGGLenum.CG_GL_MATRIX_IDENTITY); + Debug.WriteLine( "==> ModelView" ); cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelView"), CGGLenum.CG_GL_MODELVIEW_MATRIX, CGGLenum.CG_GL_MATRIX_IDENTITY); + Debug.WriteLine( "==> ModelViewIT" ); cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewIT"), CGGLenum.CG_GL_MODELVIEW_MATRIX, CGGLenum.CG_GL_MATRIX_INVERSE_TRANSPOSE); *************** *** 99,107 **** Debug.WriteLine( "Bind uniform parameters to fragment shader" ); ! 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); Debug.WriteLine( "Enable approprate texture for fragment shader" ); --- 105,116 ---- Debug.WriteLine( "Bind uniform parameters to fragment shader" ); ! float[] lightPos = { 3.0f, 2.0f, -3.0f }; ! float[] lightColor = { 1.0f, 1.0f, 1.0f }; ! Debug.WriteLine( "==> Plight" ); cgGLSetParameter3fv(cgGetNamedParameter(fragmentProgram, "Plight"), lightPos); ! Debug.WriteLine( "==> lightColor" ); cgGLSetParameter3fv(cgGetNamedParameter(fragmentProgram, "lightColor"), lightColor); ! Debug.WriteLine( "==> shininess" ); ! cgGLSetParameter1f(cgGetNamedParameter(fragmentProgram, "shininess"), 40.0f ); Debug.WriteLine( "Enable approprate texture for fragment shader" ); *************** *** 124,128 **** protected void DrawGeometry() { Debug.Indent(); ! Debug.WriteLine( "Demo.DrawGeometry()" ); int nu = 30; --- 133,137 ---- protected void DrawGeometry() { Debug.Indent(); ! Debug.WriteLine( "Entering Demo.DrawGeometry()" ); int nu = 30; *************** *** 143,151 **** Debug.WriteLine( "Fill position, normal and texture coordinate arrays" ); 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; --- 152,161 ---- Debug.WriteLine( "Fill position, normal and texture coordinate arrays" ); for ( v=0; v<nv; ++v ) { ! float fv = ((float)v)/((float)(nv-1)); ! Console.WriteLine( fv ); for (u=0; u<nu; ++u ) { ! float fu= ((float)u) /((float)(nu-1)); uv[uvp] = fu; ! uv[uvp+1] = fv; parametricEval( fu, fv, pp, np ); pp += 3; *************** *** 171,211 **** Debug.WriteLine( "Associate data 'pointers' with vertex shader" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); - param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); - cgGLEnableTextureParameter( param ); } Debug.WriteLine( "Enable bindings to parameters" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLEnableClientState( param ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLEnableClientState( param ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLEnableClientState( param ); param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); ! cgGLEnableClientState( param); ! Debug.WriteLine( "Draw geometry" ); glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); ! Debug.WriteLine( "Disable bindings to parameters" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLDisableClientState( param ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLDisableClientState( param ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLDisableClientState( param ); ! param = cgGetNamedParameter(fragmentProgram, "diffuseMap"); ! cgGLDisableTextureParameter(param); } protected void parametricEval( float u, float v, int pp, int np ) { ! Console.WriteLine( "parametricEval" ); double theta = System.Math.PI * u; double phi = 2.0 * System.Math.PI * v; --- 181,234 ---- Debug.WriteLine( "Associate data 'pointers' with vertex shader" ); + Debug.WriteLine( "==> Pobject" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); + Debug.WriteLine( "==> Nobject "); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); + Debug.WriteLine( "==> TexUV" ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); } Debug.WriteLine( "Enable bindings to parameters" ); + Debug.WriteLine( "==> Pobject" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLEnableClientState( param ); + Debug.WriteLine( "==> Nobject" ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLEnableClientState( param ); + Debug.WriteLine( "==> TexUV" ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLEnableClientState( param ); + Debug.WriteLine( "==> diffuseMap" ); param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); ! cgGLEnableTextureParameter( param ); ! Debug.WriteLine( "Draw geometry" ); glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); ! Debug.WriteLine( "Disable bindings to parameters" ); + Debug.WriteLine( "==> Pobject" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLDisableClientState( param ); + Debug.WriteLine( "==> Nobject" ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLDisableClientState( param ); + Debug.WriteLine( "==> TexUV" ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLDisableClientState( param ); ! Debug.WriteLine( "==> diffuseMap" ); ! param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); ! cgGLDisableTextureParameter( param ); + Debug.WriteLine( "Exiting Demo.DrawGeometry()" ); + Debug.Unindent(); } protected void parametricEval( float u, float v, int pp, int np ) { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo.parametricEval(float,float,int,int)" ); ! double theta = System.Math.PI * u; double phi = 2.0 * System.Math.PI * v; *************** *** 215,229 **** 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() { ! Console.WriteLine( "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!" ); --- 238,277 ---- P[pp+2] = (float)(System.Math.Cos(theta)); ! N[np] = P[pp]; ! N[np+1] = P[pp+1]; ! N[np+2] = P[pp+2]; ! ! Debug.WriteLine( "Exiting Demo.parametricEval(float,float,int,int)" ); ! Debug.Unindent(); } ! ! protected void drawTriangles( uint[] indices ) { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo.drawTriangls(uint[])" ); ! ! int i = 0; ! while ( i+8<indices.Length ) { ! glBegin( GL_TRIANGLES ); ! glVertex3f( indices[i], indices[i+1], indices[i+2] ); ! glVertex3f( indices[i+3], indices[i+4], indices[i+5] ); ! glVertex3f( indices[i+6], indices[i+7], indices[i+8] ); ! glEnd(); ! i+=9; ! } ! ! Debug.WriteLine( "Exiting Demo.drawTriangles(uint[])" ); ! Debug.Unindent(); ! } ! protected void ChooseProfiles() { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo.ChooseProfiles()" ); ! if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_ARBVP1 ) ) { vertexProfile = CGprofile.CG_PROFILE_ARBVP1; + Console.WriteLine( "Vertex Profile: ARBVP1" ); } else if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_VP30 ) ) { vertexProfile = CGprofile.CG_PROFILE_VP30; + Console.WriteLine( "Vertex Profile: VP30" ); } else { Console.WriteLine( "Neither arbvp1 or vp30 vertex profiles supported on this system!" ); *************** *** 233,249 **** 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() { ! Console.WriteLine( "LoadCgPrograms" ); Debug.Assert( CG_TRUE==cgIsContext( context ) ); vertexProgram = cgCreateProgramFromFile( context, CGenum.CG_SOURCE, "demo_vert.cg", vertexProfile, null, null ); cgGLEnableProfile( vertexProfile ); cgGLLoadProgram( vertexProgram ); --- 281,305 ---- if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_ARBFP1 ) ) { fragmentProfile = CGprofile.CG_PROFILE_ARBFP1; + Console.WriteLine( "Fargment Profile: ARBFP1" ); } else if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_FP30 ) ) { fragmentProfile = CGprofile.CG_PROFILE_FP30; + Console.WriteLine( "Fragmen Profile: FP30" ); } else { Console.WriteLine( "Netiher arbfp1 or fp30 fragment profiles supported on this system!" ); System.Environment.Exit(2); } + + Debug.WriteLine( "Exiting Demo.ChooseProfiles()" ); + Debug.Unindent(); } protected void LoadCgPrograms() { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo.LoadCgPrograms()" ); ! Debug.Assert( CG_TRUE==cgIsContext( context ) ); vertexProgram = cgCreateProgramFromFile( context, CGenum.CG_SOURCE, "demo_vert.cg", vertexProfile, null, null ); + if (CG_FALSE==cgIsProgramCompiled(vertexProgram)) cgCompileProgram(vertexProgram); cgGLEnableProfile( vertexProfile ); cgGLLoadProgram( vertexProgram ); *************** *** 253,260 **** cgGLEnableProfile( fragmentProfile ); cgGLLoadProgram( fragmentProgram ); } protected void LoadTextures() { ! Console.WriteLine( "LoadTextures" ); uint handle ; uint[] h = new uint[1]; --- 309,321 ---- cgGLEnableProfile( fragmentProfile ); cgGLLoadProgram( fragmentProgram ); + + Debug.WriteLine( "Exiting Demo.LoadCgPrograms()" ); + Debug.Unindent(); } protected void LoadTextures() { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo.LoadTextures()" ); ! uint handle ; uint[] h = new uint[1]; *************** *** 263,267 **** 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); --- 324,328 ---- glBindTexture( GL_TEXTURE_2D, handle ); ! glTexParameterf(GL_TEXTURE_2D, 0x8191, GL_TRUE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); *************** *** 270,273 **** --- 331,335 ---- float[] data = new float[res*res*4]; + for ( int i=0; i<res; i++ ) { for ( int j=0; j<res; j++ ) { *************** *** 288,291 **** --- 350,356 ---- glTexImage2D( GL_TEXTURE_2D, 0, 4, res, res, 0, GL_RGBA, GL_FLOAT, data ); cgGLSetTextureParameter( cgGetNamedParameter( fragmentProgram, "diffuseMap" ), handle ); + + Debug.WriteLine( "Exiting Demo.LoadTextures()" ); + Debug.Unindent(); } |
From: Tim R. <ti...@us...> - 2004-08-09 08:44:17
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18915 Modified Files: demo2.cs Log Message: Noise functions implemnted Index: demo2.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo2.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** demo2.cs 9 Aug 2004 05:14:49 -0000 1.1 --- demo2.cs 9 Aug 2004 08:44:09 -0000 1.2 *************** *** 22,25 **** --- 22,32 ---- protected double[] PhaseOffsetTable = new double[REPEAT_INTERVAL]; + protected const int TextureRes = 512; + protected IntPtr Context; + protected IntPtr Program; + protected IntPtr KdParam; + protected IntPtr ModelViewProjParam; + protected IntPtr TestColorParam; + public Demo2() { Debug.Indent(); *************** *** 144,151 **** Debug.Unindent(); ! return (Lattice1D[MaskedIndex(x)]); } ! protected double LatticeVal( int x, int y ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int,int)" ); --- 151,158 ---- Debug.Unindent(); ! return MaskedIndex(x); } ! protected int LatticeVal( int x, int y ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int,int)" ); *************** *** 157,164 **** Debug.Unindent(); ! return Lattice2D[Index,0]; } ! protected double LatticeVal( int x, int y, int z ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int,int,int)" ); --- 164,171 ---- Debug.Unindent(); ! return Index; } ! protected int LatticeVal( int x, int y, int z ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int,int,int)" ); *************** *** 171,175 **** Debug.Unindent(); ! return Lattice2D[Index,0]; } --- 178,182 ---- Debug.Unindent(); ! return Index; } *************** *** 214,218 **** double Ret; double InvUParam, InvVParam; ! double G00, G10, G01, G11; double F00, F10, F01, F11; --- 221,225 ---- double Ret; double InvUParam, InvVParam; ! int G00, G10, G01, G11; double F00, F10, F01, F11; *************** *** 238,248 **** G11 = LatticeVal( U1, V1 ); ! Debug.WriteLine( "Exiting Demo2.cgNoise(double,double) *" ); Debug.Unindent(); } public static void Main( string[] args) { Debug.Listeners.Add( new TextWriterTraceListener( Console.Out ) ); --- 245,392 ---- G11 = LatticeVal( U1, V1 ); + F00 = UParam * Lattice2D[G00,0] + VParam * Lattice2D[G00,1]; + F10 = (UParam - 1.0) * Lattice2D[G10,0] + VParam * Lattice2D[G10,1]; + F01 = UParam * Lattice2D[G01,0] + (VParam - 1.0) * Lattice2D[G01,1]; + F11 = (UParam - 1.0) * Lattice2D[G11,0] + (VParam - 1.0) * Lattice2D[G11,1]; ! Ret = InvUParam * ( InvVParam * F00 + VParam * F01 ) + UParam * ( InvVParam * F10 + VParam * F11 ); ! Ret = 0.5 * ( Ret + 1.0 ); ! Debug.WriteLine( "Exiting Demo2.cgNoise(double,double) *" ); Debug.Unindent(); + return Ret; } + protected double cgNoise( double u, double v, double w ) { + Debug.Indent(); + Debug.WriteLine( "Entering Demo2.cgNoise(double,double,double)" ); + + double Ret; + double InvUParam, InvVParam, InvWParam; + int G000, G100, G010, G110, G001, G101, G011, G111; + double F000, F100, F010, F110; + double F001, F101, F011, F111; + + int U0 = (int)System.Math.Floor(u); + int U1 = U0 + 1; + double UParam = u - (double)U0; + + int V0 = (int)System.Math.Floor(v); + int V1 = V0 + 1; + double VParam = v - (double)V0; + + int W0 = (int)System.Math.Floor(w); + int W1 = W0 + 1; + double WParam = v - (double)W0; + + Initialize(); + + UParam = WeightSmooth( UParam ); + VParam = WeightSmooth( VParam ); + WParam = WeightSmooth( WParam ); + + InvUParam = 1.0 - UParam; + InvVParam = 1.0 - VParam; + InvWParam = 1.0 - WParam; + + G000 = LatticeVal( U0, V0, W0 ); + G100 = LatticeVal( U1, V0, W0 ); + G010 = LatticeVal( U0, V1, W0 ); + G110 = LatticeVal( U1, V1, W0 ); + G001 = LatticeVal( U0, V0, W1 ); + G101 = LatticeVal( U1, V0, W1 ); + G011 = LatticeVal( U0, V1, W1 ); + G111 = LatticeVal( U1, V1, W1 ); + + F000 = UParam * Lattice3D[G000,0] * Lattice3D[G000,1] * WParam * Lattice3D[G000,2]; + F100 = InvUParam * Lattice3D[G100,0] + VParam * Lattice3D[G100,1] * WParam * Lattice3D[G000,2]; + F010 = UParam * Lattice3D[G010,0] + InvVParam * Lattice3D[G010,1] * WParam * Lattice3D[G000,2]; + F110 = InvUParam * Lattice3D[G110,0] + InvVParam * Lattice3D[G110,1] * WParam * Lattice3D[G000,2]; + F001 = UParam * Lattice3D[G001,0] + VParam * Lattice3D[G001,1] * WParam * Lattice3D[G001,2]; + F101 = InvUParam * Lattice3D[G101,0] + VParam * Lattice3D[G101,1] * WParam * Lattice3D[G001,2]; + F011 = UParam * Lattice3D[G001,0] + InvVParam + Lattice3D[G011,1] * WParam * Lattice3D[G001,2]; + F111 = InvUParam * Lattice3D[G111,0] + InvVParam * Lattice3D[G111,1] * WParam * Lattice3D[G001,2]; + + Ret = InvWParam * ( InvUParam * ( InvVParam * F000 + VParam * F010 ) + UParam * (InvVParam * F100 + VParam * F110 ) ) + WParam * ( InvUParam * ( InvVParam * F001 + VParam * F011 ) + UParam * ( InvVParam * F101 + VParam * F111 ) ); + + Debug.WriteLine( "Exiting Demo2.cgNoise(double,double,double) *" ); + Debug.Unindent(); + + return Ret; + } + + protected double cgFbm( double t, int octaves, double lambda, double omega ) { + Debug.Indent(); + Debug.WriteLine( "Entering Demo2.cgFbm(double,int,double,double)" ); + + double Amp = 1.0; + double TotalAmp = 0.0; + double Freq = 1.0; + double Ret = 0.0; + + for( int i=0; i<octaves; ++i ) { + Ret += Amp * cgNoise( Freq * t + PhaseOffsetTable[i] ); + TotalAmp += Amp; + Amp *= lambda; + Freq *= omega; + } + + Ret /= TotalAmp; + + Debug.WriteLine( "Exiting Demo2.cgFbm(doubl,int,double,double) *" ); + Debug.Unindent(); + + return Ret; + } + + protected double cgFbm( double u, double v, int octaves, double lambda, double omega ) { + Debug.Indent(); + Debug.WriteLine( "Entering Demo2.cgFbm(double,double,int,double,double)" ); + + double Amp = 1.0; + double Freq = 1.0; + double TotalAmp = 0.0; + double Ret = 0.0; + + for ( int i=0; i<octaves; i++ ) { + Ret += Amp * cgNoise( Freq * u + PhaseOffsetTable[i], Freq * v + PhaseOffsetTable[i+1] ); + TotalAmp += Amp; + Amp *= lambda; + Freq *= omega; + } + + Ret /= TotalAmp; + + Debug.WriteLine( "Exiting Demo2.cgFbm(double,double,int,double,double) *" ); + Debug.Unindent(); + + return Ret; + } + + protected double cgFbm( double u, double v, double w, int octaves, double lambda, double omega ) { + Debug.Indent(); + Debug.WriteLine( "Entering Demo2.cgFbm(double,double,double,int,double,double)" ); + + double Amp = 1.0; + double Freq = 1.0; + double TotalAmp = 0.0; + double Ret = 0.0; + + for ( int i=0; i<octaves; i++ ) { + Ret += Amp * cgNoise( Freq * u + PhaseOffsetTable[i], Freq * v + PhaseOffsetTable[ i+1 ], Freq * w + PhaseOffsetTable[i+2] ); + TotalAmp += Amp; + Amp *= lambda; + Freq *= omega; + } + + Ret /= TotalAmp; + + Debug.WriteLine( "Exiting Demo2.cgFbm(double,double,double,int,double,double) *" ); + Debug.Unindent(); + + return Ret; + } + public static void Main( string[] args) { Debug.Listeners.Add( new TextWriterTraceListener( Console.Out ) ); |
From: Tim R. <ti...@us...> - 2004-08-09 05:14:58
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23427/Cg Modified Files: Makefile Added Files: cgGL_vertex_example.cg demo2.cs Log Message: second Cg example --- NEW FILE: cgGL_vertex_example.cg --- struct appdata { float4 position : POSITION; float3 normal : NORMAL; float3 color : DIFFUSE; float3 TestColor : SPECULAR; }; struct vfconn { float4 HPOS : POSITION; float4 COL0 : COLOR0; }; vfconn main(appdata IN, uniform float4 Kd, uniform float4x4 ModelViewProj) { vfconn OUT; OUT.HPOS = mul(ModelViewProj, IN.position); OUT.COL0.xyz = Kd.xyz * IN.TestColor.xyz; OUT.COL0.w = 1.0; return OUT; } // main --- NEW FILE: demo2.cs --- using csDragons.OpenGL; using System; using System.Diagnostics; namespace csDragons { namespace OpenGL { namespace Cg { public class Demo2 : Cg { protected Random rnd; protected const int REPEAT_INTERVAL = 4096; protected const int RepeatInterval = REPEAT_INTERVAL; protected const int Mask = REPEAT_INTERVAL - 1; protected const int NSwaps = RepeatInterval * 8; protected bool Initialized = false; protected double[] Lattice1D = new double[REPEAT_INTERVAL]; protected double[,] Lattice2D = new double[REPEAT_INTERVAL,2]; protected double[,] Lattice3D = new double[REPEAT_INTERVAL,3]; protected int[] FoldTable = new int[REPEAT_INTERVAL]; protected double[] PhaseOffsetTable = new double[REPEAT_INTERVAL]; public Demo2() { Debug.Indent(); Debug.WriteLine( "Entering Demo2()" ); rnd = new System.Random(); Debug.WriteLine( "Exiting Demo2()" ); Debug.Unindent(); } protected double nvFloatRand( double min, double max ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.nvFloatRand(double,double)" ); Debug.WriteLine( "Exiting Demo2.nvFloatRand(double,double) *" ); Debug.Unindent(); return rnd.NextDouble() * (max-min) + min; } protected int nvIntRand( int min, int max ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.nvIntRand(int,int)" ); Debug.WriteLine( "Exiting Demo2.nvIntRand(int,int) *" ); Debug.Unindent(); return rnd.Next( min, max ); } protected void normalize( ref double x, ref double y ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.normalize(ref double,ref double)" ); double Mag = System.Math.Sqrt( x*x + y*y ); x /= Mag; y /= Mag; Debug.WriteLine( "Exiting Demo2.normalize(ref double,ref double" ); Debug.Unindent(); } protected void normalize( ref double x, ref double y, ref double z ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.normalize( ref double, ref double, ref double)" ); double Mag = System.Math.Sqrt( x*x + y*y + z*z ); x /= Mag; y /= Mag; z /= Mag; Debug.WriteLine( "Exiting Demo2.normalize( ref double, ref double, ref double)" ); Debug.Unindent(); } protected void Initialize() { Debug.Indent(); Debug.WriteLine( "Entering Demo2.Initialize()" ); if (Initialized) { Debug.WriteLine( "Already initiailzed!" ); } else { int i; Debug.WriteLine( "Build the fold table" ); for ( i=0; i<RepeatInterval; ++i) FoldTable[i] = i; for ( i=0; i<NSwaps; ++i ) { int Index0 = nvIntRand( 0, RepeatInterval - 1 ); int Index1 = nvIntRand( 0, RepeatInterval - 1 ); int TempVal = FoldTable[Index0]; FoldTable[Index0] = FoldTable[Index1]; FoldTable[Index1] = TempVal; } Debug.WriteLine( "Build the 1D lattice table" ); for ( i=0; i<RepeatInterval; ++i ) Lattice1D[i] = nvFloatRand( 0.0, 1.0 ); Debug.WriteLine( "Build the 2D lattice table" ); for ( i=0; i<RepeatInterval; ++i ) { Lattice2D[i,0] = nvFloatRand( -1.0, 1.0 ); Lattice2D[i,1] = nvFloatRand( -1.0, 1.0 ); normalize( ref Lattice2D[i,0], ref Lattice2D[i,1] ); } Debug.WriteLine( "Build the 2D lattice table" ); for ( i=0; i<RepeatInterval; ++i ) { Lattice3D[i,0] = nvFloatRand( -1.0, 1.0 ); Lattice3D[i,1] = nvFloatRand( -1.0, 1.0 ); Lattice3D[i,2] = nvFloatRand( -1.0, 1.0 ); normalize( ref Lattice3D[i,0], ref Lattice3D[i,1], ref Lattice3D[i,2] ); } Debug.WriteLine( "Build the Phase Offset Table" ); for ( i=0; i<RepeatInterval; ++i ) PhaseOffsetTable[i] = nvFloatRand( 0.0, RepeatInterval ); Initialized = true; } Debug.WriteLine( "Exiting Demo2.Initialize()" ); Debug.Unindent(); } protected int MaskedIndex( int index ) { Debug.Indent(); Debug.WriteLine( "Entering MaskedIndex(int)" ); if (index<0) { index = Mask & -index; if (index>0) index = RepeatInterval-index; } else index &= Mask; Debug.WriteLine( "Exiting MaskedIndex(int) *" ); Debug.Unindent(); return index; } protected double LatticeVal( int x ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int)" ); Debug.WriteLine( "Exiting LatticeVal(int) *" ); Debug.Unindent(); return (Lattice1D[MaskedIndex(x)]); } protected double LatticeVal( int x, int y ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int,int)" ); int Index = FoldTable[MaskedIndex(x)]; Index = FoldTable[(Index+y)&Mask]; Debug.WriteLine( "Exiting LatticeVal(int,int) *" ); Debug.Unindent(); return Lattice2D[Index,0]; } protected double LatticeVal( int x, int y, int z ) { Debug.Indent(); Debug.WriteLine( "Entering LatticeVal(int,int,int)" ); int Index = FoldTable[MaskedIndex(x)]; Index = FoldTable[ (Index+y) & Mask ]; Index = FoldTable[ (Index+z) & Mask ]; Debug.WriteLine( "Exiting LatticeVal(int,int,int) *" ); Debug.Unindent(); return Lattice2D[Index,0]; } protected double WeightSmooth( double t ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.WeightSmooth(double)" ); Debug.WriteLine( "Exiting Demo2.WeightSmooth(double) *" ); Debug.Unindent(); return t * t * ( 3 -2 * t ); } protected double Lerp( double t, double a, double b ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.Lerp(double,double,double)" ); Debug.WriteLine( "Exiting Demo2.Lerp(double,double,double) *" ); Debug.Unindent(); return ( 1.0 - t ) * a + t * b; } protected double cgNoise( double t ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.cgNoise(double)" ); int T0 = (int)System.Math.Floor(t); double TParam = WeightSmooth( t - (double)T0 ); Initialize(); Debug.WriteLine( "Exiting Demo2.cgNoise(double) *" ); Debug.Unindent(); return Lerp( TParam, LatticeVal(T0), LatticeVal(T0+1) ); } protected double cgNoise( double u, double v ) { Debug.Indent(); Debug.WriteLine( "Entering Demo2.cgNoise(double,double)" ); double Ret; double InvUParam, InvVParam; double G00, G10, G01, G11; double F00, F10, F01, F11; int U0 = (int)System.Math.Floor( u ); int U1 = U0 + 1; double UParam = u - (double)U0; int V0 = (int)System.Math.Floor( v ); int V1 = V0 + 1; double VParam = v - (double)V0; Initialize(); UParam = WeightSmooth( UParam ); VParam = WeightSmooth( VParam ); InvUParam = 1.0 - UParam; InvVParam = 1.0 - VParam; G00 = LatticeVal( U0, V0 ); G10 = LatticeVal( U1, V0 ); G01 = LatticeVal( U0, V1 ); G11 = LatticeVal( U1, V1 ); Debug.WriteLine( "Exiting Demo2.cgNoise(double,double) *" ); Debug.Unindent(); } public static void Main( string[] args) { Debug.Listeners.Add( new TextWriterTraceListener( Console.Out ) ); Debug.AutoFlush = true; Demo2 demo = new Demo2(); } } } } } Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 6 Aug 2004 11:42:33 -0000 1.8 --- Makefile 9 Aug 2004 05:14:49 -0000 1.9 *************** *** 6,10 **** DEBUG=/d:DEBUG DEBUG= ! OPTS=$(DEBUG) -lib:/usr/lib/mono/gtk-sharp MCS=$(CC) $(OPTS) PACKAGE=csDragons --- 6,10 ---- DEBUG=/d:DEBUG DEBUG= ! OPTS=$(DEBUG) MCS=$(CC) $(OPTS) PACKAGE=csDragons *************** *** 40,48 **** $(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 --- 40,47 ---- $(GEN) cgGL.xml + demo: demo.exe demo2.exe ! %.exe:%.cs ! $(MCS) -r:csdCg.dll -r:csdGL.dll $^ -o $@ test: test.exe |
From: Kai R. <kre...@us...> - 2004-08-08 14:07:01
|
Update of /cvsroot/csdopenglnet/csdOpenGL/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24934/samples Modified Files: gtkAdvanced.cs Log Message: tried to mix openg with x11-drawing Index: gtkAdvanced.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkAdvanced.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gtkAdvanced.cs 6 Aug 2004 11:42:34 -0000 1.10 --- gtkAdvanced.cs 8 Aug 2004 14:06:52 -0000 1.11 *************** *** 233,236 **** --- 233,243 ---- draw(); glPopMatrix(); + glarea.WaitGL(); + Gdk.EventExpose ev = args.Event; + Gdk.Window window = ev.Window; + + window.DrawLine( glarea.Style.BlackGC, 0,0, 200,200 ); + glarea.WaitX(); + glarea.SwapBuffers(); } else Debug.WriteLine( "MakeCurrent() failed" ); |
From: Kai R. <kre...@us...> - 2004-08-08 14:07:00
|
Update of /cvsroot/csdopenglnet/csdOpenGL/GL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24934/GL Modified Files: gtkArea.cs gtkContext.cs Log Message: tried to mix openg with x11-drawing Index: gtkContext.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/gtkContext.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkContext.cs 5 Aug 2004 13:09:15 -0000 1.1 --- gtkContext.cs 8 Aug 2004 14:06:52 -0000 1.2 *************** *** 41,44 **** --- 41,50 ---- [ DllImport( "GL" ) ] + static extern void glXWaitGL (); + + [ DllImport( "GL" ) ] + static extern void glXWaitX (); + + [ DllImport( "GL" ) ] static extern void glXSwapBuffers ( IntPtr display, int drawableID ); *************** *** 134,137 **** --- 140,151 ---- } + public void WaitGL(){ + glXWaitGL(); + } + + public void WaitX(){ + glXWaitX(); + } + public void SwapBuffers( Window window ) { Debug.Indent(); Index: gtkArea.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/GL/gtkArea.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkArea.cs 5 Aug 2004 13:09:15 -0000 1.1 --- gtkArea.cs 8 Aug 2004 14:06:52 -0000 1.2 *************** *** 68,71 **** --- 68,79 ---- } + public void WaitGL(){ + context.WaitGL(); + } + + public void WaitX(){ + context.WaitX(); + } + /** \brief OpenGL swapBuffers() * |
From: Tim R. <ti...@us...> - 2004-08-07 06:59:04
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv649/Cg Modified Files: demo.cs Log Message: missing cgGLEnable-statements Index: demo.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** demo.cs 6 Aug 2004 12:13:34 -0000 1.3 --- demo.cs 7 Aug 2004 06:58:39 -0000 1.4 *************** *** 9,22 **** 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() { ! Console.WriteLine( "Constructor" ); glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( res, res ); --- 9,25 ---- public class Demo : Cg { ! protected IntPtr context, vertexProgram, fragmentProgram; ! protected CGprofile vertexProfile, fragmentProfile; ! protected int curTime = 0; ! protected bool haveLoadedPrograms = false; ! protected int res=512; ! protected float[] P, N, uv; ! protected uint[] indices; ! public Demo() { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo()" ); ! ! Debug.WriteLine( "Initializing GLUT" ); glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( res, res ); *************** *** 26,36 **** glutKeyboardFunc( new cb0_glutKeyboardFunc(keyboard) ); cgSetErrorCallback( new CgErrorEvent( errorHandler ) ); context = cgCreateContext(); ! glutMainLoop(); } protected void errorHandler() { CGerror err = cgGetError(); Console.Write( "Cg error: " ); --- 29,47 ---- glutKeyboardFunc( new cb0_glutKeyboardFunc(keyboard) ); + Debug.WriteLine( "Initializing Cg" ); cgSetErrorCallback( new CgErrorEvent( errorHandler ) ); context = cgCreateContext(); ! Debug.WriteLine( "Start main loop" ); ! glutMainLoop(); ! ! Debug.WriteLine( "Exiting Demo()" ); ! Debug.Unindent(); } protected void errorHandler() { + Debug.Indent(); + Debug.WriteLine( "Entering Demo.errorHandler()" ); + CGerror err = cgGetError(); Console.Write( "Cg error: " ); *************** *** 38,46 **** Console.WriteLine( cgGetErrorString( err ) ); System.Environment.Exit( 3 ); } protected void draw() { ! Console.WriteLine( "draw" ); if (!haveLoadedPrograms) { ChooseProfiles(); LoadCgPrograms(); --- 49,63 ---- Console.WriteLine( cgGetErrorString( err ) ); System.Environment.Exit( 3 ); + + Debug.WriteLine( "Exiting Demo.errorHandler()" ); + Debug.Unindent(); } protected void draw() { ! Debug.Indent(); ! Debug.WriteLine( "Entering Demo.draw()" ); ! if (!haveLoadedPrograms) { + Debug.WriteLine( "Initiize GL/Cg" ); ChooseProfiles(); LoadCgPrograms(); *************** *** 51,96 **** } 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() { ! Console.WriteLine( "DrawGeometry" ); int nu = 30; int nv = 30; --- 68,129 ---- } + Debug.WriteLine( "Reset GL" ); glClearColor( 0.25f, 0.25f, 0.25f, 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + Debug.WriteLine( "Set projection matrix" ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 30.0, 1.0, 0.1, 100.0 ); + Debug.WriteLine( "Set modelview matrix" ); 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 ); ! Debug.WriteLine( "Bing Cg programs" ); ! cgGLBindProgram( vertexProgram ); ! cgGLBindProgram( fragmentProgram ); ! ! Debug.WriteLine( "Bind uniform parameters to vertex shader" ); ! cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewProj"), CGGLenum.CG_GL_MODELVIEW_PROJECTION_MATRIX, CGGLenum.CG_GL_MATRIX_IDENTITY); ! cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelView"), CGGLenum.CG_GL_MODELVIEW_MATRIX, CGGLenum.CG_GL_MATRIX_IDENTITY); ! cgGLSetStateMatrixParameter(cgGetNamedParameter(vertexProgram, "ModelViewIT"), CGGLenum.CG_GL_MODELVIEW_MATRIX, CGGLenum.CG_GL_MATRIX_INVERSE_TRANSPOSE); + Debug.WriteLine( "Bind varying parameters to vertex shader" ); 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); + Debug.WriteLine( "Bind uniform parameters to fragment shader" ); 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); ! Debug.WriteLine( "Enable approprate texture for fragment shader" ); ! cgGLEnableTextureParameter(cgGetNamedParameter(fragmentProgram, "diffuseMap")); ! ! Debug.WriteLine( "Draw scene" ); DrawGeometry(); ! ! Debug.WriteLine( "Disable texture" ); ! cgGLDisableTextureParameter(cgGetNamedParameter(fragmentProgram, "diffuseMap")); ! glutSwapBuffers(); ++curTime; glutPostRedisplay(); + Debug.WriteLine( "Exiting Demo.draw()" ); + Debug.Unindent(); } protected void DrawGeometry() { ! Debug.Indent(); ! Debug.WriteLine( "Demo.DrawGeometry()" ); ! int nu = 30; int nv = 30; *************** *** 100,103 **** --- 133,137 ---- int np = 0; int uvp = 0; + IntPtr param; if (P==null) { *************** *** 107,110 **** --- 141,145 ---- uv = new float[2*nVerts]; + Debug.WriteLine( "Fill position, normal and texture coordinate arrays" ); for ( v=0; v<nv; ++v ) { float fv = (float)(v/(nv-1)); *************** *** 120,123 **** --- 155,159 ---- } + Debug.WriteLine( "Fill in the vertex index arrays" ); indices = new uint[3*nTris]; int ip = 0; *************** *** 132,171 **** } } ! Console.WriteLine( "1" ); ! IntPtr param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); - - Console.WriteLine( "2" ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); - - Console.WriteLine( "3" ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); - - Console.WriteLine( "4" ); param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); cgGLEnableTextureParameter( param ); - - Console.WriteLine( "5" ); - glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); - - Console.WriteLine( "6" ); - param = cgGetNamedParameter( vertexProgram, "Pobject" ); - cgGLDisableClientState( param ); - - Console.WriteLine( "7" ); - param = cgGetNamedParameter( vertexProgram, "Nobject" ); - cgGLDisableClientState( param ); - - Console.WriteLine( "8" ); - param = cgGetNamedParameter( vertexProgram, "TexUV" ); - cgGLDisableClientState( param ); - - Console.WriteLine( "9" ); - param = cgGetNamedParameter(fragmentProgram, "diffuseMap"); - cgGLDisableTextureParameter(param); } } --- 168,206 ---- } } + ! Debug.WriteLine( "Associate data 'pointers' with vertex shader" ); ! param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); cgGLEnableTextureParameter( param ); } + + Debug.WriteLine( "Enable bindings to parameters" ); + param = cgGetNamedParameter( vertexProgram, "Pobject" ); + cgGLEnableClientState( param ); + param = cgGetNamedParameter( vertexProgram, "Nobject" ); + cgGLEnableClientState( param ); + param = cgGetNamedParameter( vertexProgram, "TexUV" ); + cgGLEnableClientState( param ); + param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); + cgGLEnableClientState( param); + + Debug.WriteLine( "Draw geometry" ); + glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); + + Debug.WriteLine( "Disable bindings to parameters" ); + param = cgGetNamedParameter( vertexProgram, "Pobject" ); + cgGLDisableClientState( param ); + param = cgGetNamedParameter( vertexProgram, "Nobject" ); + cgGLDisableClientState( param ); + param = cgGetNamedParameter( vertexProgram, "TexUV" ); + cgGLDisableClientState( param ); + param = cgGetNamedParameter(fragmentProgram, "diffuseMap"); + cgGLDisableTextureParameter(param); } *************** *** 262,266 **** } ! public static void Main( string[] argss) { Demo demo = new Demo(); } --- 297,303 ---- } ! public static void Main( string[] args) { ! Debug.Listeners.Add( new TextWriterTraceListener( Console.Out ) ); ! Debug.AutoFlush = true; Demo demo = new Demo(); } |
From: Kai R. <kre...@us...> - 2004-08-06 12:13:43
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14967 Modified Files: demo.cs Log Message: tippfehler Index: demo.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** demo.cs 6 Aug 2004 11:42:33 -0000 1.2 --- demo.cs 6 Aug 2004 12:13:34 -0000 1.3 *************** *** 18,21 **** --- 18,22 ---- public Demo() { + Console.WriteLine( "Constructor" ); glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( res, res ); *************** *** 40,43 **** --- 41,45 ---- protected void draw() { + Console.WriteLine( "draw" ); if (!haveLoadedPrograms) { ChooseProfiles(); *************** *** 90,93 **** --- 92,96 ---- protected void DrawGeometry() { + Console.WriteLine( "DrawGeometry" ); int nu = 30; int nv = 30; *************** *** 130,158 **** } IntPtr param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); cgGLEnableTextureParameter( param ); glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLDisableClientState( param ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLDisableClientState( param ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLDisableClientState( param ); ! param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); ! cgGLDisableClientState( param ); } --- 133,170 ---- } + Console.WriteLine( "1" ); IntPtr param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); + Console.WriteLine( "2" ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); + Console.WriteLine( "3" ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); + Console.WriteLine( "4" ); param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); cgGLEnableTextureParameter( param ); + Console.WriteLine( "5" ); glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); + Console.WriteLine( "6" ); param = cgGetNamedParameter( vertexProgram, "Pobject" ); cgGLDisableClientState( param ); + Console.WriteLine( "7" ); param = cgGetNamedParameter( vertexProgram, "Nobject" ); cgGLDisableClientState( param ); + Console.WriteLine( "8" ); param = cgGetNamedParameter( vertexProgram, "TexUV" ); cgGLDisableClientState( param ); ! Console.WriteLine( "9" ); ! param = cgGetNamedParameter(fragmentProgram, "diffuseMap"); ! cgGLDisableTextureParameter(param); } *************** *** 160,163 **** --- 172,176 ---- protected void parametricEval( float u, float v, int pp, int np ) { + Console.WriteLine( "parametricEval" ); double theta = System.Math.PI * u; double phi = 2.0 * System.Math.PI * v; *************** *** 173,176 **** --- 186,190 ---- protected void ChooseProfiles() { + Console.WriteLine( "ChooseProfiles" ); if ( CG_TRUE==cgGLIsProfileSupported( CGprofile.CG_PROFILE_ARBVP1 ) ) { vertexProfile = CGprofile.CG_PROFILE_ARBVP1; *************** *** 193,196 **** --- 207,211 ---- protected void LoadCgPrograms() { + Console.WriteLine( "LoadCgPrograms" ); Debug.Assert( CG_TRUE==cgIsContext( context ) ); *************** *** 206,209 **** --- 221,225 ---- protected void LoadTextures() { + Console.WriteLine( "LoadTextures" ); uint handle ; uint[] h = new uint[1]; *************** *** 246,250 **** } ! public static void Main( string[] args) { Demo demo = new Demo(); } --- 262,266 ---- } ! public static void Main( string[] argss) { Demo demo = new Demo(); } |
Update of /cvsroot/csdopenglnet/csdOpenGL/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10447/samples Modified Files: gears.cs gtkAdvanced.cs gtkFrame.cs gtkGears.cs gtkTexture.cs gtkTriangle.cs gtkWidget.cs texture.cs triangle.cs Log Message: bla Index: gtkAdvanced.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkAdvanced.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gtkAdvanced.cs 1 Aug 2004 13:26:42 -0000 1.9 --- gtkAdvanced.cs 6 Aug 2004 11:42:34 -0000 1.10 *************** *** 7,11 **** using System.Diagnostics; ! public class GtkAdvanced : csdGL { protected Gtk.Window window; --- 7,11 ---- using System.Diagnostics; ! public class GtkAdvanced : GL { protected Gtk.Window window; Index: gears.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gears.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gears.cs 18 Jul 2004 13:41:33 -0000 1.6 --- gears.cs 6 Aug 2004 11:42:34 -0000 1.7 *************** *** 2,6 **** using System; ! public class Gears : csdGL { protected double rotAng = 0.0f; --- 2,6 ---- using System; ! public class Gears : GL { protected double rotAng = 0.0f; Index: gtkTriangle.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkTriangle.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkTriangle.cs 28 Jul 2004 16:30:50 -0000 1.1 --- gtkTriangle.cs 6 Aug 2004 11:42:34 -0000 1.2 *************** *** 6,10 **** using System.Diagnostics; ! public class GtkTest : csdGL { GtkGLArea glarea; --- 6,10 ---- using System.Diagnostics; ! public class GtkTest : GL { GtkGLArea glarea; Index: gtkWidget.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkWidget.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gtkWidget.cs 17 Jul 2004 11:59:31 -0000 1.2 --- gtkWidget.cs 6 Aug 2004 11:42:34 -0000 1.3 *************** *** 6,10 **** using System.Diagnostics; ! public class GtkTest : csdGL { GtkGLArea glarea; --- 6,10 ---- using System.Diagnostics; ! public class GtkTest : GL { GtkGLArea glarea; Index: triangle.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/triangle.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** triangle.cs 17 Jul 2004 11:59:31 -0000 1.3 --- triangle.cs 6 Aug 2004 11:42:34 -0000 1.4 *************** *** 2,6 **** using System; ! public class Triangle : csdGL { protected float ang = 0.0f; --- 2,6 ---- using System; ! public class Triangle : GL { protected float ang = 0.0f; Index: gtkGears.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkGears.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gtkGears.cs 28 Jul 2004 05:30:06 -0000 1.3 --- gtkGears.cs 6 Aug 2004 11:42:34 -0000 1.4 *************** *** 6,10 **** using System.Diagnostics; ! public class GtkGears : csdGL { GtkGLArea glarea; --- 6,10 ---- using System.Diagnostics; ! public class GtkGears : GL { GtkGLArea glarea; Index: gtkTexture.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkTexture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkTexture.cs 28 Jul 2004 16:30:50 -0000 1.1 --- gtkTexture.cs 6 Aug 2004 11:42:34 -0000 1.2 *************** *** 6,10 **** using System.Diagnostics; ! public class GtkTest : csdGL { protected GtkGLArea glarea; --- 6,10 ---- using System.Diagnostics; ! public class GtkTest : GL { protected GtkGLArea glarea; Index: gtkFrame.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkFrame.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gtkFrame.cs 31 Jul 2004 11:45:59 -0000 1.7 --- gtkFrame.cs 6 Aug 2004 11:42:34 -0000 1.8 *************** *** 6,10 **** using System.Diagnostics; ! public class GtkFrame : csdGL { protected GtkGLArea glarea; --- 6,10 ---- using System.Diagnostics; ! public class GtkFrame : GL { protected GtkGLArea glarea; Index: texture.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/texture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texture.cs 16 Jul 2004 15:02:29 -0000 1.2 --- texture.cs 6 Aug 2004 11:42:34 -0000 1.3 *************** *** 5,9 **** using System.Runtime.InteropServices; ! public class TextureTest : csdGL { protected float rotAngle = -1.0f; --- 5,9 ---- using System.Runtime.InteropServices; ! public class TextureTest : GL { protected float rotAngle = -1.0f; |
From: Tim R. <ti...@us...> - 2004-08-06 11:42:43
|
Update of /cvsroot/csdopenglnet/csdOpenGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10447 Modified Files: ChangeLog TODO Log Message: bla Index: TODO =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 12 Jul 2004 17:14:16 -0000 1.1.1.1 --- TODO 6 Aug 2004 11:42:33 -0000 1.2 *************** *** 1 **** ! - correct Gtk#-Widget \ No newline at end of file --- 1,3 ---- ! - Cg# tests ! - CgFX Binding ! - solve error, that occurs when exiting an OpenGL#-Gtk#-application \ No newline at end of file Index: ChangeLog =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ChangeLog 5 Aug 2004 18:10:51 -0000 1.6 --- ChangeLog 6 Aug 2004 11:42:33 -0000 1.7 *************** *** 1,13 **** ! 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 ! since 0.1.0: ! modified and activated Gtk#-Widget ! modified Makefile to use global GAC-Parameters ! added gears and gtkGears examples --- 1,14 ---- ! 0.1.3: ! added basic Cg support ! freeglut support is removed, because we focus on Gtk# and freeglut was not as easy as glut ! there was an error in the generator by converting (void*), so that not all possible type combinations were BERÜCKSICHTIGT ! 0.1.2: ! add freeglut support ! 0.1.1: ! modified and activated Gtk#-Widget ! modified Makefile to use global GAC-Parameters ! added gears and gtkGears examples |
From: Tim R. <ti...@us...> - 2004-08-06 11:42:43
|
Update of /cvsroot/csdopenglnet/csdOpenGL/Cg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10447/Cg Modified Files: Makefile cgGL.xml demo.cs Log Message: bla Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile 5 Aug 2004 21:13:56 -0000 1.7 --- Makefile 6 Aug 2004 11:42:33 -0000 1.8 *************** *** 31,38 **** 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 --- 31,41 ---- ln -sf ../doxygen/cg_xml/cgGL_8h.xml . + gl_8h.xml: + ln -sf ../doxygen/xml/gl_8h.xml . + csdCgBase.cs: cg_8h.xml cg.xml $(GEN) cg.xml ! csdCgGLBase.cs: cgGL_8h.xml cgGL.xml gl_8h.xml $(GEN) cgGL.xml Index: cgGL.xml =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/cgGL.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgGL.xml 6 Aug 2004 06:02:10 -0000 1.1 --- cgGL.xml 6 Aug 2004 11:42:33 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- <TypeDefs> <File>cg_8h.xml</File> + <File>gl_8h.xml</File> </TypeDefs> <BaseTypes> *************** *** 22,27 **** <Type>CGtype</Type> </BaseTypes> - <TypeDefs> - </TypeDefs> <IgnoreFunctions> </IgnoreFunctions> --- 23,26 ---- Index: demo.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/Cg/demo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** demo.cs 5 Aug 2004 21:13:56 -0000 1.1 --- demo.cs 6 Aug 2004 11:42:33 -0000 1.2 *************** *** 32,35 **** --- 32,40 ---- protected void errorHandler() { + CGerror err = cgGetError(); + Console.Write( "Cg error: " ); + Console.Write( err ); + Console.WriteLine( cgGetErrorString( err ) ); + System.Environment.Exit( 3 ); } *************** *** 125,134 **** } - uint[] a3 = {3}; - uint[] af = {GL_FLOAT}; - uint[] a0 = {0}; - IntPtr param = cgGetNamedParameter( vertexProgram, "Pobject" ); ! cgGLSetParameterPointer( param, a3, af, a0, P ); } --- 130,158 ---- } IntPtr param = cgGetNamedParameter( vertexProgram, "Pobject" ); ! cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, P ); ! ! param = cgGetNamedParameter( vertexProgram, "Nobject" ); ! cgGLSetParameterPointer( param, 3, GL_FLOAT, 0, N ); ! ! param = cgGetNamedParameter( vertexProgram, "TexUV" ); ! cgGLSetParameterPointer( param, 2, GL_FLOAT, 0, uv ); ! ! param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); ! cgGLEnableTextureParameter( param ); ! ! glDrawElements( GL_TRIANGLES, 3*nTris, GL_UNSIGNED_INT, indices ); ! ! param = cgGetNamedParameter( vertexProgram, "Pobject" ); ! cgGLDisableClientState( param ); ! ! param = cgGetNamedParameter( vertexProgram, "Nobject" ); ! cgGLDisableClientState( param ); ! ! param = cgGetNamedParameter( vertexProgram, "TexUV" ); ! cgGLDisableClientState( param ); ! ! param = cgGetNamedParameter( fragmentProgram, "diffuseMap" ); ! cgGLDisableClientState( param ); } *************** *** 212,221 **** 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 ); } --- 236,247 ---- glTexImage2D( GL_TEXTURE_2D, 0, 4, res, res, 0, GL_RGBA, GL_FLOAT, data ); ! cgGLSetTextureParameter( cgGetNamedParameter( fragmentProgram, "diffuseMap" ), handle ); } protected void keyboard( byte key, int x, int y ) { ! if ( (key==(byte)'q') || (key==(byte)'Q') || (key==27) ) { ! cgDestroyContext( context ); ! System.Environment.Exit(0); ! } } |