Archived

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

sneak

I need help texturing a glutSolidCube (newbie)

Recommended Posts

sneak    122
Can anyone provide me with some code on how I can map a .bmp or .tga texture file (say, 128*128 or 256*256) onto a glutSolidCube object? Rewriting my program to use GL_QUADS isn''t an option. I''ve spent all day looking for info on this, and it sounds like it''s possible but I can''t find any code. Thanks!

Share this post


Link to post
Share on other sites
a2k    124
hmm, for using one of the glut primitives, i''d imagine you can only specify mapping coordinates that are prepackaged with opengl i.e. spherical, planar, etc, not by tex coords. if you want to specifically assign texture coordinates to the cube, you''re going to have to use quads, triangles, or the like.

a2k

Share this post


Link to post
Share on other sites
sneak    122
Thanks for the reply.

I''m not trying to do anything fancy, the same texture on all six sides would suffice. Is there ANY way to avoid having to rewrite my program?

Share this post


Link to post
Share on other sites