<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>265</bug_id>
          
          <creation_ts>2007-01-23 02:52:57 +0100</creation_ts>
          <short_desc>problem scaling TYPE_INT_ARGB, Alpha not scaling</short_desc>
          <delta_ts>2010-03-24 07:49:55 +0100</delta_ts>
          <reporter_accessible>0</reporter_accessible>
          <cclist_accessible>0</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>windows</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://www.kyrondevelopment.com/viewer/JoglScaler.java</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>281</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-24 07:49:55 +0100</bug_when>
    <thetext>


---- Reported by krazykatz 2007-01-23 14:52:57 ----

The following code doesn&apos;t work on one of the laptops in our office.  The 
same problem is showing up on a workstation at one of our site&apos;s.  It is fine
on 6-8 other computers I&apos;ve tried it on.  The laptop has Window&apos;s XP and a
&quot;GeForce Go 7900 GS&quot; card.

All the code is trying to do is scale a 2D image.  Scaling greyscale works fine,
but when scaling TYPE_INT_ARGB all transparency is lost.  For the complete
source for the class check out the URL
http://www.kyrondevelopment.com/viewer/JoglScaler.java


      // Prepare a texture w/ source
      gl.glTexSubImage2D(
         GL.GL_TEXTURE_2D,
         0,
         0,
         0,
         m_src_width,
         m_src_height,
         GL.GL_RGBA,
         GL.GL_UNSIGNED_BYTE,
         src_ints );

      // Map the source texture to a quad
      gl.glBegin( GL.GL_QUADS );
        gl.glTexCoord2d( 0.0, 0.0 );
        gl.glVertex2f( 0.f, 0.f );

        gl.glTexCoord2d( 0.0, m_dst_height/m_scaley/PBUFFER_HEIGHT );
        gl.glVertex2f( 0.f, m_dst_height );

        gl.glTexCoord2d( m_dst_width/m_scalex/PBUFFER_WIDTH,
              m_dst_height/m_scaley/PBUFFER_HEIGHT );
        gl.glVertex2f( m_dst_width, m_dst_height );

        gl.glTexCoord2d( m_dst_width/m_scalex/PBUFFER_WIDTH, 0.0 );
        gl.glVertex2f( m_dst_width, 0.f );
      gl.glEnd();

      gl.glFlush();

      // Retrieve the scaled data
      IntBuffer scaled_buffer = BufferUtil.newIntBuffer(PBUFFER_SIZE);
      gl.glReadPixels(
            0,
            0,
            m_dst_width,
            m_dst_height,
            GL.GL_RGBA,
            GL.GL_UNSIGNED_INT_8_8_8_8_REV,
            scaled_buffer );

      int[] dst_ints = ((DataBufferInt)m_dst.getRaster().getDataBuffer()).
            getData();



---- Additional Comments From kbr 2007-01-23 15:00:18 ----

I suspect you need to call setAlphaBits(8) on the GLCapabilities you use to
create your GLPbuffer. If this doesn&apos;t solve the problem then please provide a
complete and self-contained test case showing the issue. I&apos;ll leave this bug
open for another day or two, but I don&apos;t believe this is a JOGL bug.





---- Additional Comments From krazykatz 2007-01-24 07:43:20 ----

Thank you that seems to be it.



---- Additional Comments From kbr 2007-01-24 08:49:47 ----

Not a JOGL bug.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:49 EDT  ---

This bug was previously known as _bug_ 265 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=265
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>