Jump to content
  • Advertisement
Sign in to follow this  
giugio

anyone knows sketchup?

This topic is 2627 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

hello.
I'm trying to finish a sketchup importer for opengl in c++ .
My problem is that the shaders that rapresent the materials of sketchup are five:
1)front color back color
2)front color back texture
3)texture front, back color
4)double color
5)double texture.

in these shaders i use the gl_frontfacing (that return true if the face is front and false if the face is back )for draw the different materials.
For example ,in case 2: in the pixel shader:

if(gl_frontFacing)
{
gl_color = frontColor
}
else
{
gl_color = texture color
}

ecc...

I see that the gl_frontFacing return true if the vertexes are in counterclockwise order or the opposite, i'm not remember good, The problem is that in my importer i have some faces that are counterclockwise and others that are clockwise , then i get a wrong model.
I think that the problem is the indexes order of the vertexes , how i can get all the faces in an unique wind order?
thanks.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!