Jump to content
  • Advertisement

Archived

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

Biberpelztrompete

Textures with other size than 64x64 / 128x128

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

Hiho, how do I map textures that DO NOT match a power of 2. So to speak 32,64,128,256 pixel ?? I have a texture sized 96x64. I load it like this : uses glaux image : PT_auxImageRec; or sth. like this glGentextures(1,dsf); image := auxDIBImageLoadA(''pic.bmp''); glBindTexture(GL_TEXTURE_2D,dsf); glTexParameteri( .... glTexImage2d(sizex,sizey,0,3,GL_RGB,GL_UNSIGNED_BYTE,imagedata);

Share this post


Link to post
Share on other sites
Advertisement
Use gluBuild2DMipMaps. This function will check for power of 2 factors, then scale up or down automatically. gluBuild2DMipMaps is part of the OpenGL1.1 spec.

Jason

Share this post


Link to post
Share on other sites
or use texsubimage
create texture of a size 128x64
then use texsubimage to replace 96x64 part of it

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
Hyho,
I couldn''t find a command called glTexSubImage. Is it a GLUT command ?? Moreover where is the difference between a standard texture and a MipMap ?
I have 1 very wide with a small height bitmap. Do I really have to scale it to 1024x1024 even if its real size is 20*800 ???

Share this post


Link to post
Share on other sites
Why do you need so textures? Make it in powers of 2 dimension.

And. Textures doesn''t necessarily be square on most modern hardware. So you may use 32x1024 (but some hardware have limitation on maximum aspect ratio, say voodoo2 can handle maximum ratio of 8:1, and it can''t handle textures larger than 256x256 too). Best use 128x1024. And, if you have several such textures, it will be better to pack them into one large texture.

Share this post


Link to post
Share on other sites
Hiho,
I want to make a layer that is above all the game screen. This Bitmap is needed to control the game. Building houses, menu and some other buttons are on it.
So it has be as wide as the screen and about 100 pixel high.
--> 128*1024. But making 4 Quads and putting a textures with that HUGE size will slow down the game or doesn''t it ?
And where''s the difference between a MipMap and a Bitmap ??

Share this post


Link to post
Share on other sites
it does exist in opengl version 1.1 (check the spec) perhaps theres something else at fault

http://members.xoom.com/myBollux

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!