glGenTextures going crazy on actual device

All your problems with Audio, Video and Images.

glGenTextures going crazy on actual device

Postby Borsty » Thu May 20, 2010 10:09 pm

Hey everyone!

I'm working on a game for school and I ran into some problems with glGenTextures :/
It works perfectly fine on the emulator but after 4 textures it breaks on my Motorola Milestone.

Here's what I'm doing to setup my texture buffer:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. // array with textures
  2.         public static final int[] texIds = new int[8];
  3.         public static int texIndex = -1;
  4.        
  5.         public static void setupTetureBuffer( GL10 gl ) {
  6.  
  7.                 // generate n textures
  8.                 gl.glGenTextures( texIds.length, texIds, 0 );
  9.                 texIndex = 0;
  10.                
  11.                 // DEBUG
  12.                 for ( int i = 0; i < texIds.length; i++ ) {
  13.                         // write to logcat
  14.                         GameActivity.log( "%d -> %d", i, texIds[i] );
  15.                 }
  16.                
  17.                 // checks for erros
  18.                 GLView.checkGlState( gl );
  19.         }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


And I'm using those slots to load my textures (which works nicely)

On the emulator I get this:
Code: Select all
0 -> 1
1 -> 2
2 -> 3
3 -> 4
4 -> 5
5 -> 6
6 -> 7
7 -> 8

And all textures can be loaded.

But when I run it on my Milestone I get:
Code: Select all
0 -> 100271
1 -> 315638026
2 -> 534244737
3 -> 1505553200
4 -> -1563003837
5 -> -867317458
6 -> -1700480907
7 -> -2028555960

Here only the first 4 work, the other 4 stay white.

Memory shouldn't be the problem (As I'm loading 64x64 pixel RGBA's)
I'm calling the whole setup and loading stuff in onSurfaceCreated (also tested onSurfaceChanged, no difference)

I would really appreciate some help with this ^^
- borsty
Borsty
Once Poster
Once Poster
 
Posts: 1
Joined: Thu May 20, 2010 9:56 pm
Location: Hamburg, Germany

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 15 guests