maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   OpenGL: Can't get a texture mapped correctly on a sphere. (https://talk.maemo.org/showthread.php?t=62580)

ucomesdag 2010-09-20 00:42

OpenGL: Can't get a texture mapped correctly on a sphere.
 
1 Attachment(s)
As the title says. Digged arround all weekend and didn't find a solution.

Code:

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);

Tried setting GL_TEXTURE_WRAP_* to GL_CLAMP but nothing.

Hope someone has a clue. I'm new to opengl es.

Btw. the texture dimension is 800x400.

TiagoTiago 2010-09-20 01:26

Re: OpenGL: Can't get a texture mapped correctly on a sphere.
 
are you sure the texture is rotated correctly? (like, not 90 degrees away)

ucomesdag 2010-09-20 01:33

Re: OpenGL: Can't get a texture mapped correctly on a sphere.
 
It maps corectly on windows and linux desktop. And yes the visible half gets mapped correctly and the rest... well as in the screenshot..

TiagoTiago 2010-09-20 01:35

Re: OpenGL: Can't get a texture mapped correctly on a sphere.
 
Hm, if it does show only one half, have you tried redimensioning the texture so it is half as wide?

ucomesdag 2010-09-20 01:46

Re: OpenGL: Can't get a texture mapped correctly on a sphere.
 
Exactly the ame result when resizing it to 400x400...

TiagoTiago 2010-09-20 01:51

Re: OpenGL: Can't get a texture mapped correctly on a sphere.
 
a wasteful workaround would be to double the image, two copies side to side


All times are GMT. The time now is 05:33.

vBulletin® Version 3.8.8