Jump to content
  • Advertisement


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


Gah! Texture problem

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

For some reason, the texture in this code does not properly show. It gets mapped out in a radial pattern, like spokes in a wheel almost. Any ideas? It''s driving me insane.
GLvoid BuildMapList()
 int xloop, yloop;
 GLfloat floatx, floaty, floatxB, floatyB;
 glBindTexture(GL_TEXTURE_2D, texture[0]);
 glNewList(MapList,GL_COMPILE);			// New Compiled box Display List
   for (xloop=1;xloop     


Share this post

Link to post
Share on other sites
Hi !

Not sure, but you''re trying to apply a 2d texture on a terrain, right ?
I guess you should be using glTexCoord2f(floatx, floaty) once per vertex (before each glVertex3f statement).

BTW, you should consider using triangle strips instead of quads.

Share this post

Link to post
Share on other sites
Reading the code, textures, quads and colars are in commentary so they won't be compiled. I think the right code should be like:





Note that I only use LINES just for wireframe so I may mistake as I don't know to texture them yet.

[edited by - Luya on January 22, 2003 1:51:05 PM]

Share this post

Link to post
Share on other sites
thanks rod.

I''m not concerned about the performance issues of using quads, This project wont be used for anything off this system.

Share this post

Link to post
Share on other sites

  • 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!