Bah, 2D in OpenGL really isn't that hard and there's not that much
extra code.  If someone were to just write a simple spriterenderer
class that takes a set of bitmaps and lets you draw them wherever you
want by index then improve it to handle an atlas of images for faster
drawing and you've got 90% of most 2D game rendering code done right
there, all in under a couple hundred or so lines.

The lifecycle isn't that bad - all you ever have to do is reload vram-
stored stuff like textures and VBOs, which I just have a method called
vInit() that does that for any given renderer in the game, and when
the gl context has changed, my main renderer just calls vInit() on all
the subrenderers and all is back into the context and ready.  I think
that took me all of a few hours to get working correctly.

On Sep 18, 1:55 pm, Leigh McRae <[email protected]>
wrote:
>   On 9/18/2010 2:23 PM, Dianne Hackborn wrote:> On Fri, Sep 17, 2010 at 7:54 
> PM, Leigh McRae
> > <[email protected]
> > <mailto:[email protected]>> wrote:
>
> >      Making a few fast paths for drawing bitmaps (BitBlt) would be
> >     huge for game developers.  I know that 3 of my games I have made
> >     aren't OGL simply because I don't want the extra code
> >     maintenance/burden.  If a game is doing some of the things you
> >     mention, well then it's not likely concerned with frame-rate.
>
> > Use OpenGL ES.
>
> As I stated, using OpenGL ES requires extra code.  You to manage
> re-loading the assets such as textures and VBO.  With the Android
> Activity life cycle this is even more of an issue than other platforms.  
> This isn't trivial.  It also exposes you to driver bugs/oddities.
>
> > Seriously, you generally can't just accelerate one function and
> > nothing else.  What you will end up with is the worst of both worlds,
> > as you take the hit of switching between hardware and software
> > rendering all the time.
>
> You can actually.  I don't think it's being suggested that you use the
> OpenGL driver to implement a basic bitblt.  Its being suggested that the
> Android OS supports the ability for hardware to accelerate the bitblt.  
> Maybe it already does, I don't know.
>
> > If you just want to draw bitmaps to the screen, this can certainly be
> > accomplished with Open GL ES, and you don't need to rely on the
> > platform to provide you with essentially helper APIs to make it easier
> > to do that particular special case.  You can ask anyone here to write
> > such a thing for you.  Waiting for the platform to provide it is a
> > really bad option because you don't know when it will be available (we
> > don't really, either), and even once it does become available you
> > can't really take advantage of it until it is available on the
> > majority of the devices.
>
> > There are so many things people can do without relying on the platform
> > to give it to them in a nice little bundle.
>
> I don't think anyone is waiting.  I believe it was just a
> request/suggestion.
>
>
>
>
>
>
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected] <mailto:[email protected]>
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support, and so won't reply to such e-mails.  All
> > such questions should be posted on public forums, where I and others
> > can see and answer them.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Leigh McRaewww.lonedwarfgames.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to