Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Better tracing output - patch  (Read 3325 times)
0 Members and 1 Guest are viewing this topic.
Offline abies

Senior Member





« Posted 2003-06-21 15:14:55 »

http://jogl.dev.java.net/issues/show_bug.cgi?id=12

direct link to patch

http://nwn-j3d.sf.net/jogl/trace.diff

This patch against BuildComposablePipeline.java creates TraceGL which IMHO is a bit better. In addition to reporting function name, it dumps arguments, including arrays up to 16 values long (longer are truncucated) and return value of function if available.

Example output:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
glVertex3f(1.0517219,-0.7641209,0.25)
glNormal3f(-1.0,-1.7484555E-7,0.0)
glVertex3f(1.3,2.2729921E-7,-0.25)
glVertex3f(1.3,2.2729921E-7,0.25)
glEnd()
glEndList()
glEnable(2977)
glMatrixMode(5889)
glGetString(7936) = NVIDIA Corporation
glGetString(7937) = GeForce3/AGP/3DNOW!
glGetString(7938) = 1.4.0
isFunctionAvailable(glLoadTransposeMatrixfARB) = true
isFunctionAvailable(glLoadTransposeMatrixfARB) = true
glLoadTransposeMatrixfARB([1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0])
glFrustum(-1.0,1.0,-0.9109588861465454,0.9109588861465454,5.0,60.0)

Unfortunately, constants are not resolved at the moment - still thinking about best way for that.

Artur Biesiadowski
Offline ckline

Senior Newbie





« Reply #1 - Posted 2003-06-21 19:38:43 »

Awesome! This is the style TraceGL that Magician used, and it's very handy. I wanted to implement it for JOGL but just didn't have time.

Some more nice things to add at some point would be support for indenting the stuff between glBegin*()/glEnd*() pairs, and outputting the actual constant name (e.g., GL_LIGHT0) instead of its integer value. That shouldn't be too hard to do with reflection.

chris
Offline abies

Senior Member





« Reply #2 - Posted 2003-06-21 19:58:00 »

Quote

Some more nice things to add at some point would be support for indenting the stuff between glBegin*()/glEnd*() pairs, and outputting the actual constant name (e.g., GL_LIGHT0) instead of its integer value. That shouldn't be too hard to do with reflection.


Indenting is indeed not hard - I'll try to do it. As for the constants, it is unfortunately not so easy. Reflection will not tell a difference between plain int and GLenum.
Ugly solution would be to always output both integer and possible constant value - but this is not acceptable for 'serious' API. I don't think there is anything that can be done with current way it is handled. Only solution I see, is to add some kind of dump to GlueGen code, to output function prototypes in some readable form (probably just serialiazed Map) and the reading it from pipeline builder and checking exact type of 'int' arguments. Possible, but this is not few-line patch and I'm a bit afraid to play with so big changes to build system at the moment.

Artur Biesiadowski
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ckline

Senior Newbie





« Reply #3 - Posted 2003-06-21 20:16:03 »

Yes, you're right. The composable pipeline builder works purely via reflection, and doesn't have any info about the Types of the function arguments. I did it this way initially just because it was the fastest way to get a composable pipeline built.

In light of this, perhaps I'll sink some time into building an emitter a la GLEmitter so that we can generate the pipeline classes with full knowledge of type information.

-chris
Offline abies

Senior Member





« Reply #4 - Posted 2003-06-21 20:52:18 »

Indent is here
http://nwn-j3d.sourceforge.net/jogl/indent.diff

It is incremental path against previous one. I have added it to issue on jogl bugzilla, so both patches are there.

Currently it indents on glBegin and glNewList.

Artur Biesiadowski
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (74 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (28 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!