>Delivered-To: [EMAIL PROTECTED] >MIME-Version: 1.0 >Content-Transfer-Encoding: 7bit >X-Priority: 3 (Normal) >X-MSMail-Priority: Normal >Importance: Normal >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 >Date: Thu, 3 Jan 2002 05:46:16 -0600 >From: Alex Terrazas <[EMAIL PROTECTED]> >Subject: Re: [JAVA3D] texture by reference on Linux >To: [EMAIL PROTECTED] > >If you look at the J3DRenderer class that >is available as part of the JMF-Java3D example >on the JMF website, they have a lot of extra >code to determine the image parameters for >the different platforms-this class only supports >byRef for windows and solaris- > >A couple questions: > >Why does J3D need to make a copy in some cases >and not in others?
Because there can be a wide variety of BufferedImage format and it can also be custom type but OGL API glTexImage2D() we use did not support all formats. So an intermediate format common is used during passing from Java to opengl API. We decide to perserve the intermediate format in order to reuse it for better performance if texture not change so an extra copy is needed. > Would it be possible to have >a single format that is gauranteed supported >byRef on all platforms? (1) For OpenGL support extension GL_EXT_abgr / D3D version BufferedImage.TYPE_4BYTE_ABGR + ImageComponent.FORMAT_RGBA8 (2) For OpenGL version 1.2 and above / D3D version BufferedImage.TYPE_3BYTE_BGR + ImageComponent.FORMAT_RGB (3) BufferedImage.TYPE_BYTE_GRAY + ImageComponent.FORMAT_CHANNEL8 > >Is there any way to query to see if you are >getting the extra copy? That would make a nice >debugging feature at least. > No. - Kelvin -------------- Java 3D Team Sun Microsystems Inc. =========================================================================== 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".
