<?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>657</bug_id>
          
          <creation_ts>2012-12-28 19:28:53 +0100</creation_ts>
          <short_desc>PMVMatrix.glPushTransform shouldn&apos;t allocate a new float array per call</short_desc>
          <delta_ts>2012-12-31 15:10:25 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>util</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Brice Figureau">brice.figureau</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>gluegen: ac16df0bab94fab313030ead42644844d1690a82
gluegen: 8b3e5b94bcd3167278eb972b2be37086d3bd2996
jogl: 96f8f55a8db5f430fc17ce9ea1bf45e4728ab6ac</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2057</commentid>
    <comment_count>0</comment_count>
    <who name="Brice Figureau">brice.figureau</who>
    <bug_when>2012-12-28 19:28:53 +0100</bug_when>
    <thetext>PMVMatrix is very convenient for GLES2 application, unfortunately on embedded hardware glPushTransform becomes quite stressfull because it allocates a new float array on every call.

At least on android, this is detrimental because this gives more work to the GC, especially during tight rendering loops.

This could be rewritten with a fixed 16 or 8 levels (or configurable) stacks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-12-29 23:51:00 +0100</bug_when>
    <thetext>You are referring to glPushMatrix/glPopMatrix ?
If so .. I agree.

Do you like to make that [git] patch ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-12-31 15:10:25 +0100</bug_when>
    <thetext>http://jogamp.org/git/?p=jogl.git;a=commit;h=96f8f55a8db5f430fc17ce9ea1bf45e4728ab6ac

    Enhance PMVMatrix: Use FloatStack to implement PushMatrix and PopMatrix (Bug 657)
    
    One FloatStack for each, MV, P and T, with initialialSize zero to save memore
    and growSizes: MV = 16 arrays, P = 2 arrays, T = 2 arrays,
    with array = 16 floats.
    
    This shall save performance due to the preallocated stack when used
    and growing only in the above mentioned grow intervals.
    
    We may finetune the growSize, if required.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>