Hi Artur,
There are two reasons why QuadArray is significantly slower
under DirectX version of Java3D:
(1) Quad primitive is not support by DirectX (unlike OpenGL)
So in v1.2.1 we create an index for Quad and draw it using
DrawIndexedPrimitiveStrided()
This works fine when the length of index is less than
maximum vertex count DirectX 7.0 can support which
is 32767. So in this case the vertex count limit is
32767*2/3 = 21844
If this is greater than that, we fall back to break
down the quad into two triangles and draw it using
DrawPrimitiveStrided()
which is very slow since one triangle is drawn
for every call.
Bug 4433271 is submit for this. We should use
multiple index buffer instead.
(2) There is a bug 4425819
- D3D: performance is slower than OGL for dataset with vcount > 65535
It happens when the scene graph is compiled to use
displaylist/vertexbuffer. Under D3D when the vertex count of
a geometry is bigger than 65535, VertexBuffer will not use
and we will fall back to use multiple call of
DrawPrimitiveStrided() instead.
This will affect all primitive, not just Quad.
Great observation.
- Kelvin
--------------
Java 3D Team
Sun Microsystems Inc.
>X-Unix-From: [EMAIL PROTECTED] Tue Apr 3 03:06:50 2001
>X-Accept-Language: pl,en
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Date: Tue, 3 Apr 2001 11:59:32 +0200
>From: Artur Biesiadowski <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Quad/Triangle performance strangeness
>To: [EMAIL PROTECTED]
>
>I'm working on particle system. After experimenting with immediate mode
>(which turned out to be about 4x slower) I've decided to use single
>geometry with byref coordinates array for all particles of single type.
>
>Now I have to decide if I want to use QuadArray or TriangleArray (with
>two triangles creating a particle). QuadArray is more intuitive and
>updating it is a bit faster, but I wanted to check the hard numbers. Fps
>below are for static case, without updating coordinates of particles -
>just plain throughput.
>
>Particles TriangleFPS QuadFPS
>
>4800 58-104 69-84
>8000 41-70 48-82
>11200 32-33 4
>
>Ok, quads seem to perform better - after all there is less data to send
>to graphics card. But what happens at high number of particles ???? With
>10800 particles quads still have 30+fps. Just over 11000 performance
>drops to 4-3 fps. What is a problem ? Have I hit some cache overflow, gc
>treshold array size or anything like this ?
>
>I use Java3d 1.2.1/directx, jdk 1.3.1 beta, win 2000 and geforce 256.
>Under opengl I do not see this behaviour - framerate constantly drops
>with increasing number of particles and quads are always a bit faster.
>
>
>Artur
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".