Results 1 to 4 of 4

Thread: Texture: Power of 2 work around

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    6

    Texture: Power of 2 work around

    Hi all,
    Is there any work around for the power of 2 texture dimensions restriction?

    thanks,

    Malakh.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Texture: Power of 2 work around

    Look into the extension NV_texture_rectangle.
    http://www.nvidia.com/dev_content/nv..._rectangle.txt
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: Texture: Power of 2 work around

    Pad a non 2^n texture with zeros, then ratio accordingly when you attach the texture to your poly. Works fine, but can waste a fair bit of mem as in 1025 would have to be padded to 2048 and so on....

  4. #4
    V-man
    Guest

    Re: Texture: Power of 2 work around

    The easiest is gluBuild2DMipmaps which scales the image and creates mipmaps at the same time. Otherwise, use gluScaleImage but you need to figure out the widthout heightout values yourself. I personallly scale up:

    example:
    widthin=500
    heightin=200

    becomes

    widthout=512
    heightout=256

    V-man

Similar Threads

  1. How to load the texture that not power by 2?
    By 尘羽泯 in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 07-25-2011, 04:34 PM
  2. Texture map (non power of two)
    By jsmith in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-05-2009, 03:52 AM
  3. Repeat non power of two texture
    By karbuckle in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 09-13-2005, 06:30 AM
  4. Non Power Of 2 Texture
    By powerpad in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 06-05-2005, 06:41 AM
  5. How to load a non power-of-2 3D texture
    By pkuloop in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-28-2003, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean