OpenGL texture format

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Posts: 1
Joined: Sun Jun 06, 2010 12:14 am

OpenGL texture format

Post by visinoz »


Would it be possible for us to specify the texture's format for loading pictures? That way, we could optimize memory depending on our pictures format (I'm using 8 bits picture, so I could save a lot of memory using another format than RGBA8).

Something like would be nice (where TextureFormat could be a string representing the format).

Ex.:'RGBA8') -- would be the default format'RGBA2') -- what i would probably use for my 8 bits image i guess

Thanks for your great engine!
User avatar
Posts: 45
Joined: Sat Jul 04, 2009 9:17 am
Location: Australia

Re: OpenGL texture format

Post by Elvashi »

The idea has potential, though I personally wouldn't endorse this particular implementation (not that I'm in a position to endorse anything...). Perhaps as an extra optional param to or maybe Image:setPixelFormat(fmt)?
I'm also concerned about exposing too much of the underlying implementation here, though careful choice of the format identifiers should solve that.
"We could make a program for doing this for you, but that is for the LÖVE IDE, planned to be released in March 2142." ~mike
Networking with UDP uLove Proposal CCG: Gangrene
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 44 guests