Actually I need 3d on 2d... I mean the background image (320 x 480) is
the performance bottleneck and I need to speed up that part
I get 3x frame rate without the background picture alone



On Feb 21, 3:27 pm, suhas <suhas.ga...@gmail.com> wrote:
> hi quakeboy,
> if u want to render 2d on 3d then just use views like textview,
> imageview etc ......... I assure u that it works fine and laso u dont
> have to render or draw those view always ....... I have used views
> with 3d and they are just working fine .
>
> regards,
> Suhas
>
> On Feb 18, 11:22 am, quakeboy <prasna...@gmail.com> wrote:
>
> > @suhas thanks a lot for sharing your information
>
> > I request you to please take part in this thread to help the 
> > communityhttp://groups.google.com/group/android-developers/browse_thread/threa...
>
> > On Feb 18, 10:53 am, suhas gavas <suhas.ga...@gmail.com> wrote:
>
> > > Hi,
> > > I m rendering 3 models
>
> > > model 1 :
> > > vertices = 309
> > > Triangles : 232
> > > grp = 19
> > > material 9
> > > joints 0
>
> > > model 2
> > > vertices = 258
> > > Triangles : 188
> > > grp = 2
> > > material 2
> > > joints 0
>
> > > model 3
> > > vertices = 64
> > > Triangles : 80
> > > grp = 1
> > > material 1
> > > joints 0
>
> > > And i m rendering model number 2 twice ................  and getting 40
> > > above fps
>
> > > regards,
> > > suhas
>
> > > On Tue, Feb 17, 2009 at 9:40 PM, fcalzada <fcalz...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > you said that with game logic you're getting 45 fps !?
> > > > what is the size of your ms3d object (nb of vertex and faces ?)
>
> > > > My scene includes 1000 faces, and I'm getting only 10 - 12 fps... just
> > > > rendering it without 2d overlay and game logic...
>
> > > > On Feb 17, 11:43 am, suhas gavas <suhas.ga...@gmail.com> wrote:
> > > > > hi,
> > > > > The max fps u can get can be 60 ............. I m rendering a 3d
> > > > > models(ms3d)  ...........  with game logic i m getting 45 fps
> > > > > ................ but prb occurs when touch event is executed ........ 
> > > > > fps
> > > > > falls to 28 - 30fps ........... my only worry is touch event ....... 
> > > > > one
> > > > > hint to handle touch event is keep constant fps (not dependent on 
> > > > > device)
> > > > > and ur tocuh event will be handled properly
> > > > > regards,
> > > > >  suhas
>
> > > > > On Tue, Feb 17, 2009 at 3:49 PM, quakeboy <prasna...@gmail.com> wrote:
>
> > > > > > Cool ! It worked... Thanx a lot
> > > > > > I wasn't doing anything different than just using the float versions
> > > > > > of the same function .. wonder why it wasn't working for me ?
>
> > > > > > I am posting more observations which might help someone else.
>
> > > > > > I can see the sample cube application using the GLSurfaceView and
> > > > > > provides a Renderer interface for reusing that code very easily. 
> > > > > > All I
> > > > > > have to do is write a new class which extends Renderer and pass it 
> > > > > > to
> > > > > > setRenderer.... (Correct me if I am wrong)
>
> > > > > > BUT I am using only one thread !!! I initialize the OpenGL and 
> > > > > > render
> > > > > > NOT on a different thread like I assume most of you here are doing..
> > > > > > On each touch event I call a draw function whose body is quoted 
> > > > > > below
>
> > > > > > //CODE BEGINS
>
> > > > > > /* I do this after binding and loading the texture image which is
> > > > > > 320x480
>
> > > > > >                ((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
> > > > > >                                   GL11Ext.GL_TEXTURE_CROP_RECT_OES,
> > > > > >                                   new int[] {0, 0, 320, 480}, 0);
> > > > > > */
>
> > > > > >        public final void draw()
> > > > > >        {
> > > > > >                long now = System.nanoTime();
> > > > > >                GL10 l_gl = gl;
>
> > > > > >                int sss = GL10.GL_BLEND;
>
> > > > > >                l_gl.glDisable(sss);
> > > > > >                l_gl.glBindTexture(GL10.GL_TEXTURE_2D, t);
> > > > > >                ((GL11Ext)l_gl).glDrawTexiOES(0, 0, 0, 320, 480);
> > > > > >                l_gl.glEnable(sss);
>
> > > > > >                now = System.nanoTime() - now;
> > > > > >                System.out.println(1000000000/now);
> > > > > >        }
> > > > > > //CODE ENDS
>
> > > > > > LogCat output from Println shows - 26 or 27 if I click and release 
> > > > > > at
> > > > > > a very very slow rate.. and drops almost below 20 when I click and
> > > > > > drag mouse which I assume is because of the touch event eating the 
> > > > > > CPU
> > > > > > cycle which was discussed in another thread.
>
> > > > > > Is my math to measure fps correct ? Is this the maximum potential of
> > > > > > OpenGL on Android ?
> > > > > > I tried using 256x256, 512x512 textures scaled to 320x480 and
> > > > > > performance numbers are just the same
>
> > > > > > Thanks to Android team for their beautiful performance optimization
> > > > > > document.
> > > > > > I use final, static, local declarations of references whenever
> > > > > > possible now... and I can see a huge difference.
>
> > > > > > On Feb 16, 6:47 pm, Jon Colverson <jjc1...@gmail.com> wrote:
> > > > > > > On Feb 16, 12:57 pm, quakeboy <prasna...@gmail.com> wrote:
>
> > > > > > > > but still my speed drops when I draw the background as a 
> > > > > > > > textured
> > > > > > > > quad. and I am not able to get the drawtexfOES to work.
>
> > > > > > > > @Jon
> > > > > > > > Can you please help me by posting a sample code of what 
> > > > > > > > parameters
> > > > to
> > > > > > > > pass to
>
> > > > > > > > 1. glTexParameterfv
> > > > > > > > 2. glDrawTexfOES
>
> > > > > > > > to get them to paint the texture properly. I get a red color 
> > > > > > > > only,
> > > > and
> > > > > > > > not the actual texture. I use a 2d ortho with 320,480 as 
> > > > > > > > extents..
> > > > > > > > with ortho camera's bottom left at 0,0
>
> > > > > > > This is what I'm doing:
>
> > > > > > > gl.glBindTexture(GL10.GL_TEXTURE_2D, name);
> > > > > > > GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, b, 0);
> > > > > > > ((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
> > > > > > >     GL11Ext.GL_TEXTURE_CROP_RECT_OES,
> > > > > > >     new int[] {0, 0, 320, 480}, 0);
>
> > > > > > > ((GL11Ext) gl).glDrawTexiOES(0, 0, 0, 320, 480);
>
> > > > > > > Could the problem be not binding the texture before setting the
> > > > > > > parameters?
>
> > > > > > > --
> > > > > > > Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to