OpenGL does not support global alpha(although there is an extension
GL_SUN_global_alpha supported on Solaris that does this). So, in Java3D, When
color_4 vertex data is present and transparency is turned on, the vertex alpha
value is multipled with the transparency value to get the correct rendering
effect. In the case of interleaved array Java3D makes a separate color copy to
do this so that user's data(by-ref) is not polluted.
-Uma
Java3D Team
> Delivered-To: [EMAIL PROTECTED]
> X-Accept-Language: pl,en
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Tue, 3 Jul 2001 20:09:33 +0200
> From: Artur Biesiadowski <[EMAIL PROTECTED]>
> Subject: Re: [JAVA3D] Interleaved array color performance
> To: [EMAIL PROTECTED]
>
> I've done some more testing. It turned out that color data is copied
> only when I enable blend transparency for quads. In other case
> (per-vertex color modulated by texture, non-transparent) color data is
> copied directly from same array as coordinates and texture coords.
>
> With blending it looks like this
> [00:00:08.863] glDisableClientState(GL_NORMAL_ARRAY)
> [00:00:08.863] glEnableClientState(GL_COLOR_ARRAY)
> [00:00:08.863] glEnableClientState(GL_VERTEX_ARRAY)
> [00:00:08.863] glEnableClientState(GL_TEXTURE_COORD_ARRAY)
> [00:00:08.863] glColorPointer(4,GL_FLOAT,0,0x293000C)
> [00:00:08.863] glVertexPointer(3,GL_FLOAT,36,0x2C0F07C)
> [00:00:08.863] wglGetProcAddress(glClientActiveTextureARB) = 0xB2601E0
> [00:00:08.863] glEnableClientState(GL_TEXTURE_COORD_ARRAY)
> [00:00:08.863] glTexCoordPointer(2,GL_FLOAT,36,0x2C0F064)
> [00:00:08.863] glDrawArrays(GL_QUADS,0,4000)
> (note different address for color pointer and vetrex/tex coord pointer).
>
> Without blending:
>
> [00:00:11.124] glDisableClientState(GL_NORMAL_ARRAY)
> [00:00:11.124] glEnableClientState(GL_COLOR_ARRAY)
> [00:00:11.124] glEnableClientState(GL_VERTEX_ARRAY)
> [00:00:11.124] glEnableClientState(GL_TEXTURE_COORD_ARRAY)
> [00:00:11.124] glColorPointer(4,GL_FLOAT,36,0x2C0EC0C)
> [00:00:11.124] glVertexPointer(3,GL_FLOAT,36,0x2C0EC1C)
> [00:00:11.124] wglGetProcAddress(glClientActiveTextureARB) = 0xB2601E0
> [00:00:11.124] glEnableClientState(GL_TEXTURE_COORD_ARRAY)
> [00:00:11.124] glTexCoordPointer(2,GL_FLOAT,36,0x2C0EC04)
> [00:00:11.124] glDrawArrays(GL_QUADS,0,4000)
>
>
> I also wonder why glEnableClientState(GL_TEXTURE_COORD_ARRAY) is called
> twice, but this is certainly not a performance problem here (as opposed
> to color mirror table creation which takes about 20-40% of entire
> runtime).
>
>
> 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".