Archived

This topic is now archived and is closed to further replies.

Squirrel

I have a whole buch of questions!

Recommended Posts

I will number them since I''m really starting with allot of things that I want/need to know! 1) How do I load a bitmap and put it on a shape? Texture mapping is not the solution. My compiler does not support it. I tried the ne-he tutorials already and it did not compile. 2) Can someone explain exactly the process of rotating a shape. I want to know also how to rotate a 3D shape made out of a flat one. What I can''t get to click in is the placement of the axis. I don''t know how to specify that. (so that it rotates from the center of the shape) 3) Is there other shapes that I can make then rectangles and triangles? It would be painfull to use rectangles if ever I wanted to make a shere or something. Ouch 4) How can I create a source of light? Thank you very much! When answering some and not all questions, specify which ones please so I know what code is for what

Share this post


Link to post
Share on other sites
1) How do I load a bitmap and put it on a shape? Texture mapping is not the solution.
What do you mean? OpenGL has supported texture mapping since version 1.1. Do you mean that glaux won''t work? That''s not a problem, if that''s the case just say so.

2) Can someone explain exactly the process of rotating a shape.
Well, you''ll want to rotate around the Z axis probably (I assume you want 2D style rotations), so it''d look something like this:
  
glTranslatef(to-wherever);
glRotatef(angle-in-degrees,0.0f,0.0f,1.0f);
render-stuff;


3) Is there other shapes that I can make then rectangles and triangles?
Yes, but those (tris and quads) are the ones you''ll want to use. Spheres are relatively easy to make out of triangles.

4) How can I create a source of light?
Just so that you know, true lighting will be harder than creating light sources. That said, you should look up glLight___. You can use glEnable(GL_LIGHT0 + x) to turn a light on, and glEnable(GL_LIGHTING) to enable lighting in general.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites