I forgot to say that the textures are all of power of 2.

2011/3/17 Terje Olsen <[email protected]>:
> Hello.
>
> I'm writing a simple game with OpenGL.
>
> I've been using the emulator to test it up until now, and it has
> worked fine there. Today I deployed it to my phone, and some parts of
> the rendering was not working.
>
> I load textures with the following settings.
>
> gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
> GL10.GL_NEAREST);
> gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
> GL10.GL_LINEAR);
>
>
> gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, 
> GL10.GL_REPEAT);
> gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, 
> GL10.GL_REPEAT);
>
> GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
>
> Now, rectangles textures with a 1:1 size works on the phone. (A
> rectangle of dimension 16*16 with a texture of dimension 16*16 for
> example).
>
> However, my background, which utilizes the GL_REPEAT parameter to
> texture a a larger surface does not work. Neither does a background
> overlay which is essentially a vertex array of ~2000 vertices.
> Everything's just black.
>
> Are there any gotcha's I'm missing, or does anyone have an inkling as
> to why this is the case?
>
> Both Emulator and Phone are Android 2.1-Update 1.
>
> -Terje
>

-- 
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