Hi Daniel,
find the Java/DLL code for my Win32 timer solution attached - not well
documented, sorry.
Yes, I am using JNI and certainly that incurs an overhead but - there's no
way to avoid this (except perhaps recompiling bin\java). The Hires-Timer I
am using should work under Win32, but yet I have tested it only on
Windows98. As I mentioned, it has a very good resolution (in nanosecond
scale).
What did you do to draw a Shape3D in immediate mode? gc.draw(shape3d)
doesn't work with me, except if I create the Shape3D myself and manually
assign geometry and appearance. As soon as I use something like Text2D or
Raster, nothing happens when I call draw().
Cheers,
-- Julian
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Daniel Selman
Sent: Monday, February 07, 2000 2:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] AW: [JAVA3D] IndexedGeometryArrays Vs.
GeometryArrays?
Julian,
I have done a fair bit of timing (in another life) using the Win32 API. As
far as I know there are three ways:
- tick count, ~50 ms resolution
- multimedia (MIDI) timer, ~1 ms resolution
- profiling frequency timer, (NT only) - as high as possible in software
I'd be interested to hear which one you chose, and the DLL/Java code if you
have it! It sounds like you used the NT profiling timer. If you are crossing
the JNI barrier to call into the DLL you are you also measuring a lot of
Java related overhead. Accurate (sub millisecond) timing is very difficult
in Win32, even using hardware timers, as the old adage that you can't
measure something without effecting it really comes into play!
Regarding indexed geometry. I think the point is that no hardware supports
indexed geometry, therefore anything you do in software will be much slower
than just pumping a nice strip of triangles to the hardware. Transformation
and lighting can both be performed in hardware (well, some).
Until we have "4th generation" (yuck) hardware that accepts whole objects
for rendering instead of a few vertices we will probably be stuck with this
limitation.
Just some (random?) thoughts.
Sincerely,
Daniel Selman
HiresTimer.zip