View Full Version : URgent - speedometer
06-27-2001, 06:44 AM
how can i render a speedometer dial using texture mapping.
is it possible to texture a partail disk using rectangular image.
any ideas please...
06-27-2001, 07:33 AM
Sure you can, read up on alpha testing.
06-27-2001, 10:00 AM
Alpha testing ?
I want to draw the dial say figures from
0 to 130. I can store them in a texture. But the problem comes when i try to map it to a disk. how is it should be done.
06-27-2001, 10:33 AM
Yes you make your texture so that the part of the texture that you do not want drawn, has an alpha value of 0 for example, and all other pixels have a non-zero alpha. Then when you draw the speedometer, you first enable alpha testing, and set the alpha test function to reject pixels with alpha equal to 0. Then when you draw a quad with that texture, all that will be drawn is the part with non zero alpha, which would be the disk part.
[This message has been edited by DFrey (edited 06-27-2001).]
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.