Skip to main content
GameDev.net gamedev.net
🔒 Locked

Stupid problem with texture coords;

Started by 6itru Mar 11, 2012 at 12:15 AM 2 replies 1.3k views
Original Post
6itru
6itru
Hi!
Its agin me:P
I rewrite my engine to opengl 3.3.
I try to load models ( im using assimp )
But i have strange problem with texcoords i get this :
errork.png
Its looks like theres no texcoords? wtf? xd

It's should look like this :
http://www.turbosquid.com/3d-models/free-obj-mode-palm-trees/490485

( Every model look the same ( texcoords))

my Vertex Shader:

#version 150
uniform mat4 Matrix;
in vec4 Position;
in vec2 in_TexCoord;
out vec2 out_TexCoord;
void main()
{
out_TexCoord = in_TexCoord;
gl_Position = Matrix * Position;
}

my Fragment Shader:

#version 150
uniform sampler2D tex;
out vec4 out_Color;
in vec2 out_TexCoord;
void main()
{
out_Color = texture(tex, out_TexCoord);
}


I think loading model code is good because its working before on opengl 2.x ;P

Sorry for my stupid question
Thanks for help!
6itru
6itru
Ok i repair it. topic to close
6itru
6itru
SOIL ( Simple OpenGL Image Loader ) -> SOIL_INVERT_Y flag in load funcion xd When soil invert texture about Y all goes crazy xd

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.