Log in or register to post comments

Changing Texture on a Plane Object (iOS) > Obligation to Square Texture?!

July 15, 2012 - 5:20pm #1

Hello,

I'm having a real problem on changing Textures on example ImageTargets.
I changed the 3D object (Teapot), with a Plane object (using examples found in this forum) using the textures of Teapot.
Example: TextureTeapotBrass.png

It show perfectly but, when I changed to my texture, it shows a Black Image.

I tested with diferentes imagens, size, extension, types and... I found that If I use the same size of Textures of Teapot (246x256px), it shows Perfectly.
Where in the Code of ImageTargets Example it limite the size of Texture?!

I'm using the same Markers of Examples but, I used too a personal Marker and I have the same problem...
Concluding that is not a problem of Marker...

Help Please! -.-'

For now, Thank you,
David Moisés Lages

NOTE: I'm using the Vuforia SDK iOS 1.5.8, Mac OSX 10.7.4 (Lion), Xcode 4.3.3 + iOS SKD 5.1, iPad 2

 

Changing Texture on a Plane Object (iOS) > Obligation

July 20, 2012 - 1:52am #6

Great to hear it worked out for you, and thanks for sharing your solution :)

N

Changing Texture on a Plane Object (iOS) > Obligation to Square

July 19, 2012 - 5:39pm #5

Thanks for the help! =D
Using this lines it works great! =D

 

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

 

Many thanks! ;)
 

David Moisés Lages

Changing Texture on a Plane Object (iOS) > Obligation

July 18, 2012 - 1:00am #4

Hi dlages

"How can I change this feature"

This link will give you some clues, and hopefully point you in the right direction:

http://stackoverflow.com/questions/4760174/rendering-to-non-power-of-two-texture-on-iphone

 

HTH

N

Changing Texture on a Plane Object (iOS) > Obligation to Square

July 16, 2012 - 2:48pm #3

NalinS wrote:

Hi dlages,

I think this might be because OpenGL ES requires that the texture sizes are a power of two e.g. 256*256 or 512*256 etc.

The simplest approach is to keep textures to such sizes, particularly if you are new to OpenGL ES.

HTH

N

Hi NalinS

Thanks for the reply but... How can I change this feature?!
I need a solution to put any size of images on texture of my plane object... -.-'

Changing Texture on a Plane Object (iOS) > Obligation

July 16, 2012 - 3:00am #2

Hi dlages,

I think this might be because OpenGL ES requires that the texture sizes are a power of two e.g. 256*256 or 512*256 etc.

The simplest approach is to keep textures to such sizes, particularly if you are new to OpenGL ES.

HTH

N

Log in or register to post comments