Rectangular Textures
I posted something simular earlier about mipmapping just figured out what I was doing wrong.
The question should be this.
Does anyone know how to texture a rectangular plain?
Thanks
I'm sorry, but I'm not sure exactly what problem you're having. Maybe you could post some screenshots?
If all you want is to texture quads with non-standard texture sizes, there are several options. Using gluBuild2DMipmaps does not let you use non-standard sizes per se. All it does is scale the image data for you before making a texture out of it. If you were expecting a particular aspect ratio, it could still be distorted.
There is an extension that allows you to use image sizes that are not powers of 2 Clicky. Maybe that's what you want?
[edited by - UnIcron on September 27, 2003 5:09:07 PM]
If all you want is to texture quads with non-standard texture sizes, there are several options. Using gluBuild2DMipmaps does not let you use non-standard sizes per se. All it does is scale the image data for you before making a texture out of it. If you were expecting a particular aspect ratio, it could still be distorted.
There is an extension that allows you to use image sizes that are not powers of 2 Clicky. Maybe that's what you want?
[edited by - UnIcron on September 27, 2003 5:09:07 PM]
Thanks for the response
I do want to be able to use textures with dimensions that are not to the power of 2 and the extension you mentioned sounds very promising; I will read tomorrow when I''m a little more awake. If oyu have anymore solutions I am interested to hear about them.
I''m curious, is there a way in which I can copy a bitmap, or part of a bitmap to another bitmap this could also cure my problem?
Thanks
I do want to be able to use textures with dimensions that are not to the power of 2 and the extension you mentioned sounds very promising; I will read tomorrow when I''m a little more awake. If oyu have anymore solutions I am interested to hear about them.
I''m curious, is there a way in which I can copy a bitmap, or part of a bitmap to another bitmap this could also cure my problem?
Thanks
Only thing of know of to do this is if you own a Mac. The OpenGL extension set present with Apple extensions supports non power of 2 textures and they are FAST. =p
~Graham
~Graham
----
Senior Rendering Engineer @ Frostbite
Previously at BioWare
Author of Game Engine Toolset Development
http://www.frostbite.com/2016/03/optimizing-the-graphics-pipeline-with-compute/
http://blog.bioware.com/2013/07/25/staff-blog-graham-wihlidal-senior-software-engineer/
Nope, no Mac.
Is it me or do NPOT textures still have to be square? If they do thats as good as having POT textures(ie not very)!
I got a feeling that pasting a smaller bitmap to a larger one is the way forward for me.
I''m trying to simplify using textures in a 2D environment so I can create and show sprites (textured plains) with 2 function calls.
ie
load_image(1, "pointer.bmp");
sprite(1,x,y,1);
if ya get my meaning. Any way Pasting a bitmap onto a larger bitmap, anyone know how to do it?
Thanks
Trager
Is it me or do NPOT textures still have to be square? If they do thats as good as having POT textures(ie not very)!
I got a feeling that pasting a smaller bitmap to a larger one is the way forward for me.
I''m trying to simplify using textures in a 2D environment so I can create and show sprites (textured plains) with 2 function calls.
ie
load_image(1, "pointer.bmp");
sprite(1,x,y,1);
if ya get my meaning. Any way Pasting a bitmap onto a larger bitmap, anyone know how to do it?
Thanks
Trager
gluBuild2DMipmaps Just scales an image so it meets the 2^n requirement. Nvidia and ati have their own extention that doesn''t use 2^n textures, but i dont recomend using it if your hoping for a wide rang of people to use it.
Don''t use gluBuild2DMipmaps if you want as fast as lodaing as you can get. It''s faster to use the standard texture build and save it from resizing textures.
I would try it before being to concerned about loss of quality. I was working with a GUI that had textures of all sorts of odd sizes. I would just resize them to meet the required 2^n (round up) and they looked great.
Don''t use gluBuild2DMipmaps if you want as fast as lodaing as you can get. It''s faster to use the standard texture build and save it from resizing textures.
I would try it before being to concerned about loss of quality. I was working with a GUI that had textures of all sorts of odd sizes. I would just resize them to meet the required 2^n (round up) and they looked great.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement