Results 1 to 8 of 8

Thread: Size of an image?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Ireland
    Posts
    21

    Size of an image?

    Could anyone tell me what is the maximum size of image that opengl can work with? Also I heard that it could only work with images that are in a power of 2? Does this mean that the image will have to be a square? Or can it work with say 1k by 2K?

    Thanks

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Size of an image?

    If you mean texture images:
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &i);
    implementation specific value. Minmum supported resultion must be 64. Power of two is meant for each side separately. Any combination 2^n * 2^m should work if you don't exceed the GL_MAX_TEXTURE_SIZE.
    For non-power of two textures have a look for the texture_rectangle extension.

    (If you meant screen size look for GL_MAX_VIEWPORT_DIMS.)

    [This message has been edited by Relic (edited 12-06-2002).]

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Ireland
    Posts
    21

    Re: Size of an image?

    Relic,

    Thanks.

    You say resolution must be 64. what does 64 mean?

    Originally posted by Relic:
    If you mean texture images:
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &i);
    implementation specific value. Minmum supported resultion must be 64. Power of two is meant for each side separately. Any combination 2^n * 2^m should work if you don't exceed the GL_MAX_TEXTURE_SIZE.
    For non-power of two textures have a look for the texture_rectangle extension.

    (If you meant screen size look for GL_MAX_VIEWPORT_DIMS.)

    [This message has been edited by Relic (edited 12-06-2002).]

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jun 2002
    Location
    Philadelphia, PA, US
    Posts
    108

    Re: Size of an image?

    the minimum width and height of a texture image is 64. it must be at least 64 X 64 pixels.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    London, England
    Posts
    160

    Re: Size of an image?

    Originally posted by SThomas:
    the minimum width and height of a texture image is 64. it must be at least 64 X 64 pixels.
    So many people seem to think this. There is no minimum size for a texture.
    What there IS however, is an implementation dependent maximum texture size. OpenGL requires that THIS is at least 64.

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Ireland
    Posts
    21

    Re: Size of an image?

    So ff I code:
    int I;
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &I);

    'I' should tell me the max integer value that my texture can hold? I have tried this and it gives me the value of 84? Also could anyone give me a briefing on what a texture is? Is it related to my graphics card?


    Originally posted by SThomas:
    the minimum width and height of a texture image is 64. it must be at least 64 X 64 pixels.

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jun 2002
    Location
    Philadelphia, PA, US
    Posts
    108

    Re: Size of an image?

    Originally posted by Bakery2k:
    So many people seem to think this. There is no minimum size for a texture.
    What there IS however, is an implementation dependent maximum texture size. OpenGL requires that THIS is at least 64.
    of course, how retarded of me. thanks for the correction.

  8. #8
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Size of an image?

    Well, 84 is definitely not correct. Probably a typo?

    The max_texture_size value is the maximum edge length of a full RGBA texture with all mipmap levels plus borders your OpenGL implementation (driver | graphics card) can handle.

    Search for the RedBook.pdf on the web and download it (it's only 8MB). Read chapter 9 for texture mapping.

Similar Threads

  1. Vulkan maximum image size ?
    By Ronniko in forum Vulkan
    Replies: 9
    Last Post: 09-16-2016, 11:48 AM
  2. best/better texture image file size
    By Mryamz in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-18-2011, 12:59 PM
  3. How to increase size of an Image
    By shivukumar in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 02-22-2010, 10:45 PM
  4. Replies: 10
    Last Post: 01-04-2007, 12:02 AM
  5. texture mapping - Image size
    By sarahippo in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-14-2003, 12:49 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