I found this way to used non power of two size picture as a texture
and the textured is filled with black but it doesn't matter :

QUOTE :
------------------------------------
        Find the smallest power of 2 testure that still contains the
non-power-of-two (NPOT) texture. Then adjust texture coordinates
accordingly.

        Quick example :
        NPOT original texture is x=11 ; y=34
        POT texture should be x2 = 2^ceil(log2(x)) = 16 ; y2 = 2^ceil
(log2(x)) = 64
        The remaining texel data should be set to black, as it is the
default border color (wait, does GL ES have texture borders ? EDIT:
not in ES 1.1). It works well for non-repeating textures, but if you
want a repeating texture, a pixel shader is probably needed (ES
2.0) ...

        NPOT original texcoords = 0,0 0,1 1,1 1,0
        POT adapted texcoords = 0,0 0,1*y/y2 1*x/x2,1*y/y2 1*x/x2,0
----------------------------------------------

is that what you meant robert ?

I think I will try it soon...



On Dec 5, 7:11 am, Robert Green <[EMAIL PROTECTED]> wrote:
> Pretty much the rule with 3D stuff is that you always use power-of-2
> size textures.  Many times the texture won't be filled all the way
> with usable stuff (lots of black area) but that doesn't matter because
> you only really care about the areas within the UV maps anyway.
>
> On Dec 4, 8:39 pm, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
>
> > I believe the G1 hardware does not support non-power-of-2 textures.
>
> > On Thu, Dec 4, 2008 at 8:48 AM, Guian <[EMAIL PROTECTED]> wrote:
>
> > > in the OpenGL android API  (android.opengl.GLUtils.texImage2D() )
> > > (http://code.google.com/android/reference/android/opengl/GLUtils.html
> > > )
> > >  we can read=>
>
> > > "Whether or not bitmap can have non power of two dimensions depends
> > > on
> > > the current OpenGL context."
>
> > > I load my OpenGL context using :
> > > mEglContext = mEgl.eglCreateContext(mEglDisplay,
> > > mEglConfig,EGL10.EGL_NO_CONTEXT, null);
>
> > > do you know what do I have to do in order to load non power of two
> > > dimensions bitmap?
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [EMAIL PROTECTED]
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
--~--~---------~--~----~------------~-------~--~----~
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