View Full Version : Mappig Textures to Polygons

02-13-2003, 09:27 AM
I think I might just be having a brain hiccup. Here痴 my question:

I知 writing a 3D application and I知 trying to figure out how to choose the ideal pixel size of a bitmap to use for level 0 mip mapping. The problem is that I知 not exactly sure how to match the size of a texture to fit the size of a polygon. I want to be able to do a close zoom up of the textured polygon, with minimal blur.

Is it as simple as a 256x256 "unit" polygon requires a 256x256 pixel bitmap?


02-13-2003, 02:21 PM
I think it actually is :polygons that get rasterized to 256x256 pixels need a 256x256 texture(as you might have expected).I mean that texture minification/magnification depends on the final(2d rasterized) size of the polygon wich in turn depends on your resolution,modelview and projection matrices etc.The best I can think of is that using an apropriate ortho projection (like glOrtho(0, 640, 0, 480, -1, 1) for a 640x480 window) you can map gl units to screen pixels and do what you propose.

[edit]:damn smilies

[This message has been edited by zen (edited 02-13-2003).]

02-14-2003, 07:46 AM

I really appreciate you taking the time to consider my question, and I agree with your answer.