Jump to content
  • Advertisement
Sign in to follow this  
carbonsunsu

A problem about performing texture with GLSL

This topic is 2569 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 everyone

These days I use GLSL to perform texture and lighting. When I use glutSolidTeaport(),everything is all right


but if I change glutSolidTeaport() to glutSolidCube() without any other change , it will have some problem , the cube is rendered without texture


and then I copy my shader code into the RenderMonkey , there is the same problem : the teaport is ok but the cube has problem , and some other model will also have this problem , anyone can tell me why?blink.gif

Share this post


Link to post
Share on other sites
Advertisement
i dont know how glut makes these objects, but i remember having the same problem with textures on glutSolidCube
regardless, wouldnt it be better if you constructed these objects yourself?
it gives you more control, and most people need to construct their objects themselves anyways at some point
such as importing models from a file

Share this post


Link to post
Share on other sites

i dont know how glut makes these objects, but i remember having the same problem with textures on glutSolidCube
regardless, wouldnt it be better if you constructed these objects yourself?
it gives you more control, and most people need to construct their objects themselves anyways at some point
such as importing models from a file


thank you , I will learn that later.

but then tried to draw a polygon by glBegin(GL_POLYGON) , it also has the same problem , so I think it's not the glut's problem

Share this post


Link to post
Share on other sites

If GLUT is not the problem, then what is the problem?


I don't know .. I test the output of the normal and the texture coordinate , the teapot is all ok , but when I use the cube , the texture coordinate is wrong , do you know what's wrong? thank you .

Share this post


Link to post
Share on other sites
Unless this is for an assignment, I wouldn't stress about it. Cant make a game with teapots and cubes. Try using different models to test your shaders.

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!