Log in or register to post comments

Texture Problem

November 23, 2011 - 11:03am #1

Hi guys,

I'm having a problem with my AR application, its based on ImageTargets and instead of a teapot i have a plane with a png transparent texture on it... it works fine with a galaxy S II, but in the galaxy tab p1000 it shows the plane with a black texture.

I'm kind of lost here as i know that:

i HAVE GLBlend enabled and working (as it works in GSII)
i HAVE glActiveTexture(GL_TEXTURE0);
its not a memory issue because if it was it would crash.

Any Ideas on what may be causing this?

Thanks in advance,

Bruno

Texture Problem

August 27, 2012 - 11:48am #9

Hello,

We use glDrawElements in the samples which takes an array of indices. This allows us to randomly index into the other model arrays when building the triangles that make up our model.

You may have a model without indices. This means that the model arrays are meant to be read linearly, that is, the triangles are listed in consecutive order. In that case, you would use the glDrawArrays method instead:

glDrawArrays(GL_TRIANGLES, 0, numVertices);

Let me know if this fixes your problem,

-Peter

Texture Problem

August 26, 2012 - 7:23am #8

Hi Guys,

I am getting patchy texture on my model on Galaxy S2. 

This is how it looks:

http://dl.dropbox.com/u/45876571/Screenshot_2012-08-26-19-22-09.png

Should I enable the glEnable(GL_TEXTURE_3D) instead of 2D or any other hint..??

 

Thanks..??

Texture Problem

July 26, 2012 - 4:07pm #7

Hello Lovebean,

It is ok for your texture to be that size. It just should be a power of two.

Please see http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml for more information about how textures are mapped in OpenGL. Please search these forums for the banana example to see how the banana texture is mapped to the 3d banana model.

Thank you,

-Peter

Texture Problem

July 25, 2012 - 5:47pm #6

Is that ok for the pixel to be 1024x1024?

One question, How do the application detect the which pixel in the png belong to which part of the model? 

I mean, Png is just a image file. It is not like mtl that contain information.

 

Please enlight.

Regards

Texture Problem

July 19, 2012 - 5:37pm #5

Oh! =D
Many thanks!!! =D
It works great! ;)

David Moisés Lages

Texture Problem

July 18, 2012 - 6:54pm #4

Power Of Two (POT) textures have a size that is a power of 2 in each dimension:
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, etc..

And they don't have to be square: i.e. 512x64 will work.

This is a requirement of certain rendering contexts.

Texture Problem

July 12, 2012 - 4:50pm #3

crociquia wrote:

I figured it out. I completely forgot about sizes being power of 2 starting from 64pixels, i was using a texture size 1000x500, just changed that to 1024x104 and worked fine

Hello,
I'm having a same problem like you...

Can you explain what you want to mean with "sizes being power of 2 starting from 64 pixels"?!

Thanks,

 

NOTE: I hope that you respond to this post, since this post is of 2011

Re: Texture Problem

November 24, 2011 - 2:54am #2

I figured it out.

I completely forgot about sizes being power of 2 starting from 64pixels, i was using a texture size 1000x500, just changed that to 1024x104 and worked fine

Log in or register to post comments