Results 1 to 9 of 9

Thread: power of two size

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2005
    Location
    Brazil
    Posts
    10

    power of two size

    hey, I was wondering, this rule of texture just images with "power of two size" sux.... does someone know a way to use images without this kind of size?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: power of two size

    There's an ARB extension for that. Something like ARB_NONPOWEROFTWO. Do a search on google.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: power of two size

    This extension is called ARB_texture_non_power_of_two, and it is a core feature of OpenGL 2.0. AFAIK the GF 6800 is the only card that supports this extension.

    There is another way though. With the ARB_texture_rectangle you can have arbitrary sized 2D textures, but with some limitations (no mipmapping, no repeating, no border if i remember correctly). It is supported by most modern cards.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Posts
    103

    Re: power of two size

    Just round up to the next power of 2 higher and change your texture coordinates. Pack another texture in the extra space if you are really hard up...

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2005
    Location
    Brazil
    Posts
    10

    Re: power of two size

    I heard about a function called gluScaleImage
    what this function's job ?

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    625

    Re: power of two size

    As far as I know this takes a MxN textures and scales it to WxH.
    This is what most people does when having npotd textures.
    I heard this function is often slow... I don't know if this is true but I just wanted to tell you, anyway it's not in a performance path so it really does not care.

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jun 2004
    Location
    mexico
    Posts
    125

    Re: power of two size

    whats MxN ???

  8. #8
    Senior Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    625

    Re: power of two size

    Originally posted by Obli:
    As far as I know this takes a MxN textures and scales it to WxH.
    What I meant to say is that it takes a texture which is MxN pixels and resizes it to WxH (width x height).
    Maybe WxH should be power of two dimensioned. I don't remember.

  9. #9
    Guest

    Re: power of two size

    BTW my GF 6600 just loads textures with non power of 2 sizes without any codechanges! I just discovered this fact when I tried my application on an older card where I got a GLerror. Quite nice not to think about the images sizes.

    cheers
    Boim

Similar Threads

  1. Mapping from rednerbuffer size to texture size for glow effect
    By 2Wheels in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-11-2013, 04:16 PM
  2. OpenCL Ndrange Global Size/Local Size
    By BiS in forum OpenCL
    Replies: 4
    Last Post: 01-04-2013, 07:52 AM
  3. Replies: 10
    Last Post: 01-04-2007, 12:02 AM
  4. Non power-of-2 textures
    By Jan in forum OpenGL: Advanced Coding
    Replies: 23
    Last Post: 02-20-2004, 11:05 AM
  5. Texture Size and pict size
    By morzech in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-27-2002, 12:25 AM

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