Jump to content
  • Advertisement
Sign in to follow this  
Pierrick

Drawing polygons on a box - newbie question

This topic is 3960 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, I am a new newbie with openGL but already addict of this 3d engine. Now my question : I have created 3d shapes such as boxes and mapped textures on them. This works good. Now I'd like to draw polygons on each box side. How can I do ? It's failing when I use the glVertex3f with glColor3f apis : the drawn polygon is "merged" with the side texture. I'd like to have the polygon drawn ABOVE the box textured side. Any help is fully welcome, Pierrick, who has a lot to learn about opengl !!!

Share this post


Link to post
Share on other sites
Advertisement
Hello,

Could you post the code where you draw your textured cube ? I don't have that much experience with OpenGL but maybe I can help a bit.

Share this post


Link to post
Share on other sites
Seems to me, you want to render to the sides of the cube (or whatever it is). The easier way is to render to texture. It generally works in the following way:

1. You set up the renderer and draw what you want the sides of the cube to look. So if you want a red triangle on the side, you draw it now.

2. You convert the drawn image to a texture. This can be made in many ways, just make a quick search on the forums.

3. You set up the renderer for the second time and render the cube textured by the texture from (2).

Tommy

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!