Background image problem using Rokon in 2.2

Problems with Canvas, OpenGL, etc...

Background image problem using Rokon in 2.2

Postby PkL728 » Mon Jun 14, 2010 2:32 pm

I realize the Rokon engine is being re-written to a Rokon 2.0, but I've been using it for a project and am getting some weird results when trying to run it on an Android 2.2 emulator. Has anyone ran across this issue before? If you just use the example included, on anything before 2.2 I see the sprite and the background but on 2.2 I see the sprite and a purple background. I can't seem to figure out why background images won't work for 2.2... does anyone have any ideas?
PkL728
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Feb 22, 2010 6:33 am

Top

Re: Background image problem using Rokon in 2.2

Postby PkL728 » Mon Jun 14, 2010 8:04 pm

Specifically this is the problem code I believe:

Code: Select all
      _buffer.getTexture().select(gl);
      gl.glVertexPointer(2, GL11.GL_FLOAT, 0, GameRenderer.vertexBuffer);
      gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, _buffer.getBuffer());
      gl.glLoadIdentity();
      gl.glScalef(Game.getGame().getWidth(), Game.getGame().getHeight(), 0);
      gl.glColor4f(1, 1, 1, 1);
      gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);


The above works in 1.6, but doesn't draw the background image in FroYo. This is in the drawFrame routine in FixedBackground.java
PkL728
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Feb 22, 2010 6:33 am

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 6 guests