I've been developing my top-down 2d OpenGL game using the emulator so far (right now, just displaying a tile map). It looks good on the emulator, but when I put it on my Nexus One to try it out, my tile map was nowhere to be seen and I just had the weird OpenGL funky background.
Since then I've tried to narrow down what the difference between the emulator and the device is, but I can't seem to place it. I never once got any of my tile map (which uses one big VBO with a grid) to display on the device but I did get some squares, etc to show up and it does look quite different.
In the setup of my app, I've screwed around with an ortho projection and fixing the size of the screen. I've been using an emulator resolution that's the same as my N1 though (800x480) so I'm not sure what would happen there.
What's the difference between the emulator and the N1? Is there some dangerous setting that I'm using?
If it helps, here is some of the init code I use:
- Code: Select all
gl.glViewport(0, 0, 480, 800);
gl.glOrthof(0, 480f, 800f, 0f, 0.0f, 1.0f);
This (at least on the emulator) gives me a 800x480 screen with the origin at the top left.