a question on textures

This is a discussion on a question on textures within the Game Programming forums, part of the General Programming Boards category; I have always been under the impression that in OpenGL textures must have dimensions that are a power of 2. ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    a question on textures

    I have always been under the impression that in OpenGL textures must have dimensions that are a power of 2. I have always used textures conforming to that rule.

    Today I threw in a texture with dimensions 384x256. Although 256 is a power of 2, 384 is definitely not. The texture worked, surprisingly, because I didn't expect it to even show up. When I used it on several surfaces, however, it slowed my system to a crawl.

    So anyways...why did the texture work in the first place? I thought only dimensions that are powers of 2 are allowed in OpenGL.
    My Website

    "Circular logic is good because it is."

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    According to OpenGL 2.1:

    Quote Originally Posted by http://www.opengl.org/documentation/current_version/
    Non-Power-Of-Two Textures

    * The restriction of textures to power-of-two dimensions has been relaxed for all texture targets, so that non-power-of-two textures may be specified without generating errors. Non-power-of-two textures was promoted from the ARB texture non power of two extension.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Textures
    By fighter92 in forum Game Programming
    Replies: 1
    Last Post: 03-21-2009, 11:57 AM
  2. loading textures from resources (dx8/9)
    By X PaYnE X in forum Game Programming
    Replies: 1
    Last Post: 12-25-2005, 04:44 PM
  3. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  4. Q3A textures
    By glUser3f in forum Game Programming
    Replies: 11
    Last Post: 09-04-2003, 04:40 AM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21