python748 / alternate-java-bridge-library

Automatically exported from code.google.com/p/alternate-java-bridge-library
Apache License 2.0
0 stars 0 forks source link

OpenGL Canvas #67

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Implement OpenGL Canvas. This may require also adding an OpenGL Sprite. This is 
another feature which will take a while to implement.

Original issue reported on code.google.com by IMPINC...@gmail.com on 27 May 2012 at 4:46

GoogleCodeExporter commented 8 years ago
Started implementation. OpenGLCanvas class created, and barebones OpenGL works. 
Right now, you can only change the color of the background, and create a 
triangle , and change it's background.

Touch events have been implemented as well.

Movement will take some time as it's handled quite differently than Canvas, or 
AnimCanvas. Not to mention camera control.

Original comment by IMPINC...@gmail.com on 2 Jun 2012 at 7:20

GoogleCodeExporter commented 8 years ago
Progress is coming slowly but surely. You can now create a rectangle as well as 
a triangle, and change their colors. You can also rotate them (either manually, 
or have it automatically handled). Also, you can have it rotate in place, or 
rotate around a point on the screen (think a moon around a planet). You will 
also have the option to reverse the rotation direction.

Update Thread which handles any automatic movement, implemented. This thread 
tries to run at ~60fps. The interval of any object is in ticks. I'm still 
experimenting with the optimum size of a tick. Too small, and you chew through 
the battery in no time (and actually end up hurting performance). Too high, and 
it's not smooth enough.
Essentially, the interval dictates how often the object is drawn to the screen.

Speed is simply, the amount the object moves each time it is drawn (if you use 
the automatic movement built within, otherwise you can just set where you want 
it to be manually).

The coordinate system has been implemented as well. The idea is, you set what 
you want the canvas to be (this is an arbitrary size that you declare). Then 
you place your objects into that canvas where you want based upon the canvas 
size. (The nice thing about OpenGL is that is does the scaling for different 
phone sizes for you. So, even if you set your canvas to 800x480, it will look 
the same on a 480x320 screen).

Early camera control has been implemented. Right now you can zoom in and out. 
You can also change the camera eye, but this needs work (it will probably come 
a little later).

I want to get things running a little smoother before progressing onto general 
movement (this will be easier though, so it may come sooner than I think). Then 
the beast of adding textures for sprites.

Then the beast of collision, and the object events (touched, dragged, etc)

Original comment by IMPINC...@gmail.com on 15 Jun 2012 at 6:12

GoogleCodeExporter commented 8 years ago
Finally got textures to work properly.

There's an issue which needs to be worked out still. The longer you leave the 
example running, the longer it takes for it to close.

I'll be working on this, and movement next.

Original comment by IMPINC...@gmail.com on 18 Jul 2012 at 4:51

GoogleCodeExporter commented 8 years ago

Original comment by IMPINC...@gmail.com on 30 Aug 2012 at 11:00