I find that whenever I'm creating a live wallpaper, things begin to lag. For example, when switching between the screens, the animation lags. In many other wallpapers I've seen, ones with much more demanding graphics, there is literally no lag. From what I can see, OpenGL seems to be able to render graphics much faster than the Canvas can.
I want to draw solely in 2D. So I think it goes something like this in the onDrawFrame method. thanks to http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL
public void onDrawFrame(GL10 gl)
{
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadIdentity();
gl.glOrthox(0, w, h, 0, 0, 1);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glTranslatef(.375f, .375f, 0);
gl.glDisable(GL10.GL_DEPTH_TEST);
gl.glClearColorx(162,205,239, 255);//In place of gl.glClear() because I want a differently colored background
}
But after this, I have no idea how to draw bitmaps or lines, which are essentially all I need for my current project. Can someone please tell me how to do these simple tasks? Also, if I'm completely off, can someone tell me what I'm doing wrong?