Jump to content
  • Advertisement

Archived

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

subnet_rx

Question about an example

This topic is 6018 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 (xIdx = 0; xIdx < 36; xIdx++)				// x-direction

		{
			for (yIdx = 0; yIdx < 18; yIdx++)			// y-direction

			{
				// calculate texture coordinates for current quad

				texLeft = float(xIdx) / 35.0f;			// left texture coordinate

				texBottom = float(yIdx) / 18.0f;		// bottom texture coordinate

				texRight = float(xIdx+1) / 35.0f;		// right texture coordinate

				texTop = float(yIdx+1) / 18.0f;			// top texture coordinate    
Why are they dividing by 35 and 18? This is a flag using a 36x20 array of points. subnet_rx

"There are two types of langages, those that everyone bitches about, and those that no one uses."

Standardized C++ Libraries
C++ Programming help
The only news site on the web Edited by - subnet_rx on January 3, 2002 2:21:42 AM

Share this post


Link to post
Share on other sites
Advertisement

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