开发者

2D OpenGL Canvas Replacement

I've created a prototype for a 2d android game using the android canvas object. Unfortunately, the performance is suffering greatly due to the large number of bitmaps that need to be redrawn frequently.

I'd like to migrate the drawing code to opengl, but I have no experience with it, and I'm having a difficult time getting the views configured properly. I've tried a wide variety of methods, but I'm not sure if the view configurations were wrong, of if the drawing functions didn't match.

Si开发者_C百科nce most of my touch events are based on the coordinates, I'd like to have the opengl canvas view's coordinate system match the touch event coordinate system if possible. This would allow me to reuse a lot of code and avoid a lot of coordinate translation.

Can someone provide code or a link to code that would accomplish setting up a view and drawing a textured element?


I do not know how this question got overlooked but if you want a light introduction to OpenGL ES then you should take a look here. It is pretty good an explains things slowly enough that it is reasonably easy to understand.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜