Jump to content
  • Advertisement
Sign in to follow this  
6itru

OpenGL Stupid problem with texture coords;

This topic is 2472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 :D i get this :
errork.png
:P 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 :P
Thanks for help! :P
Grettings from 6itru.

Share this post


Link to post
Share on other sites
Advertisement
SOIL ( Simple OpenGL Image Loader ) -> SOIL_INVERT_Y flag in load funcion xd When soil invert texture about Y all goes crazy xd

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!