apitrace Digest, Vol 13, Issue 3

Kenneth Hurley klhurley at graffitientertainment.com
Fri Sep 14 09:10:03 PDT 2012


At least for Android and iOS this is true.  I think there is an 
extensions to check if you
can also use mipmapping and different wrapping modes.

They term is limited NPOT for setting the glTexParameteri below. You can 
also use
non-limited NPOT, with extensions.

See:

http://www.khronos.org/registry/gles/extensions/APPLE/APPLE_texture_2D_limited_npot.txt
http://www.opengl.org/registry/specs/ARB/texture_non_power_of_two.txt

There are also some arbitrary restrictions on Android for different 
hardware, but in general
we haven't run into any problems as the screen resolutions usually fit 
into these restrictions.

For instance: PowerVR SGX requires the width & height to be multiples of 
2 and I've heard that
some hardware requires multiples of 8.  But if it's only uses for screen 
capture then you
shouldn't run into any problems.

Regards,

Kenneth Hurley

On 9/14/12 8:41 AM, José Fonseca wrote:
> On Thu, Sep 13, 2012 at 10:58 PM, Kenneth Hurley
> <klhurley at graffitientertainment.com> wrote:
>> On 8/2/12 11:16 AM, apitrace-request at lists.freedesktop.org wrote:
>>> But I had to tweak the image
>>>> to be a power-of-two -- it looks like EGLImageKHR don't need to be a
>>>> power-of-two size, but regular textures do. A bit confusing.
>>>> Eitherway, I believe this is a problem with your original solution
>>>> too.
>> Just a FYI,  Images do not have to be a power of two in both cases.
>>
>> They just need the following set to have NPOT (Non-Power of Two) settings,
>>
>>      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
>>      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
>>      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
>>      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
>>
>> And mipmaps should be turned off as they make no sense.
>>
>> We use NPOT all over the place for video textures.
> hmm..
>
> So, essentially, we should also emit the above glTexParameteri calls
> when replacing the  glEGLImageTargetTexture2DOE with glTexImage to
> ensure the NPOT get accepted...
>
> Jose
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20120914/55421f98/attachment.html>


More information about the apitrace mailing list