0

I'm looking to develop a game for Android using minimal 3D effects, but with mainly 2D graphics. I would prefer not to deal with OGLES Ortho projections and just stick with the simple 2D Canvas drawing provided by the Android SDK but everywhere I turn I only see solutions for using OGLES Ortho stuff.

Can anyone point me in the direction of a resource that would show me how to effectively render an OGLES view over a normal SurfaceView? Conceptually I think it would be something like having an Activity filled with a SurfaceView and an GLView on top of that, with the GLView's clear color being set to transparent. Am I at all on the right track with this? Is this approach even advisable or should I just bite the bullet and do everything with OpenGL?

Evan C
  • 141
  • 10

1 Answers1

3

If you want to use OpenGL you should first start here. In short, Android lets you use GlSurfaceView in combination with a GlSurfaceView.Renderer to interact with the underlying, native OpenGL.

If you want a more "guided" approach, this is the book I am reading now.

Once you get familiar with OpenGL, you might want to use an engine like libgdx. After playing with it for a while you mind find that you want a tool to create your world. You can use this Box2D editor.

RUBE is a Box2D editor (that uses the Box2D physics engine) that will output a JSON file that represents your world, so you will need a parser to convert the JSON file to Java so you can use it with the engine. Luckily there is this project you can use for that.

Emmanuel
  • 13,083
  • 4
  • 39
  • 53
  • 1
    I am actually more familiar with OpenGL than I am with Android development. This is also partially a learning exercise too, so I would rather not use an engine. – Evan C Dec 08 '13 at 07:52
  • Then I suggest you read the first link and try to get a hold of that book. It is really good. – Emmanuel Dec 08 '13 at 14:08
  • I've been following that all along actually, and it does not address my issue at all – Evan C Dec 08 '13 at 20:07