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:

        // array with textures
        public static final int[] texIds = new int[8];
        public static int texIndex = -1;

        public static void setupTetureBuffer( GL10 gl ) {

                // generate n textures
                gl.glGenTextures( texIds.length, texIds, 0 );
                texIndex = 0;

                // DEBUG
                for ( int i = 0; i < texIds.length; i++ ) {
                        // write to logcat
                        GameActivity.log( "%d -> %d", i, texIds[i] );
                }

                // checks for erros
                GLView.checkGlState( gl );
        }


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

On the emulator I get this:

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:

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to