Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Does a png use memory equal to its size?

  1. #11

    Re: Does a png use memory equal to its size?

    I'm using FreePascal and their OpenGL header files. But I've got it working now - just had to use the glext.pas header file as well.
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  2. #12

    Re: Does a png use memory equal to its size?

    The compression ratio is not controlleable?
    Btw it would be nice if you posted some info on how you got GL_COMPRESSED_RGBA working.
    http://3das.noeska.com - create adventure games without programming

  3. #13

    Re: Does a png use memory equal to its size?

    Quote Originally Posted by noeska
    The compression ratio is not controlleable?
    Btw it would be nice if you posted some info on how you got GL_COMPRESSED_RGBA working.
    When creating your texture with glTexImage2D instead of using GL_RGBA for the internal format, just use GL_COMPRESSED_RGBA. I had a small problem with my compiler not recognizing this, but that was just because I also had to have glext.pas as a unit.

    The documentation says that you can choose between a "FASTEST" and "NICEST" compression algorithm via glHint, but they seemed equally artifacty to me and the compressed textures used the same amount of memory (maybe my setup only supported the one compression algorithm - don't know).
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  4. #14

    Re: Does a png use memory equal to its size?

    Ok but should not you use glGetCompressedTexImage or is that s3tc only?
    http://3das.noeska.com - create adventure games without programming

  5. #15

    Re: Does a png use memory equal to its size?

    As far as I understood, that's only to receive a texture from disk that has been compressed with the OpenGL compressions?
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  6. #16

    Re: Does a png use memory equal to its size?

    You know i expected GL_COMPRESSED_RBGA to work the same as s3tc, but i guess it is not.

    So with GL_COMPRESSED_RGBA the texture is compressed while sending it to the videocard. And with s3tc you send an already compressed texture to the videocard.

    So there is no way to use and already compressed texture with GL_COMPRESSED_RGBA .

    Hmm that makes that i bit less useable in my opinion. First you have to decompres your image when loading it from disk and next let opengl compres it again when uploading it to the videocard. With s3tc you can just pass on the already compressed texture in adition to the above method with compressing it on the fly. But you get at least a speed gain uploading the textures to video ram and save some video ram.
    http://3das.noeska.com - create adventure games without programming

  7. #17

    Re: Does a png use memory equal to its size?

    I suppose that's true. It's not really and issue for me, though, as I'm loading all the textures I'll need at the start of the "level", so I don't worry about image -> texture load times. I'm just glad that I can compress the textures in memory to save some precious video RAM.
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •