Author Topic: Texture color depth and memory usage  (Read 1390 times)

Offline doimus

  • Dr. Type
  • ****
  • Posts: 284
    • View Profile
Texture color depth and memory usage
« on: 2010-May-10 »
Is there any difference in performance when using images/textures of lesser bit-depths?
I did some tests with both 32-bit and indexed 8-bit colour images and there seems to be no difference at all in memory usage and drawing speed. Obviously, 8-bit images loaded faster but that's just because the smaller file size.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10780
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Texture color depth and memory usage
« Reply #1 on: 2010-May-11 »
They all get converted to an internal format. Just the space on the disk changes.

Offline doimus

  • Dr. Type
  • ****
  • Posts: 284
    • View Profile
Re: Texture color depth and memory usage
« Reply #2 on: 2010-May-11 »
Does transparency/alpha matter? Is it faster to draw with one 'transparency' color than with alpha values?


EDIT: One more question...

About huge images... is there a limit to texture size? IE, is the texture size limited to graphic card's memory or there is a limit in GLB. I've noticed that I can load 5000x5000 image without problem on my machine with modern card.
Does GLB take care that this runs on older cards as well or should I cut that image in smaller parts myself just to be sure?

My old Mac Mini G4 doesn't display anything above 1024x1024 but I'm not sure if that's graphic card issue or OSX/GLB issue.
« Last Edit: 2010-May-11 by doimus »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10780
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Texture color depth and memory usage
« Reply #3 on: 2010-May-13 »
No, you can't use bigger textures as the card allows. On iPhone I think it's 1024x1024 or so!