Re: [AD] ALLEGRO_PIXEL_FORMAT_LUMINANCE_8

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 5 May 2012 12:52:39 +1000
Peter Wang <novalazy@xxxxxxxxxx> wrote:
> 
> What should we do about ALLEGRO_PIXEL_FORMAT_LUMINANCE_8, since
> GL_LUMINANCE is deprecated.
>
> It only exists so we have a single channel format suitable for indexed
> images.  Maybe it is simplest to rename the pixel format, and to say
> that it is not defined how the single channel is mapped to the G,B,A
> channels?

Yes. The name was always incorrect. (It never had anything to do with
luminance. The fact that drawing a bitmap appeared gray was that the
value simply got repeated for all channels but not because it was
converted to luminance.) We should state in the documentation that the
only intended way to use them is either with memory bitmaps or via the
shader addon.

> 
> [1] says "Luminance and intensity are not considered color-renderable.
> Therefore, you cannot bind textures of this format to a FBO."
> That means, if using OpenGL <= 2 and GL_LUMINANCE, we also need to not
> use an FBO to render to those bitmaps, yes?  Maybe it is already doing
> that.

Yeah, it may already do that if FBO creation fails but I wouldn't know.
We should mention in the documentation that drawing into it may be very
slow. Alternatively we could just disallow drawing into 8-bit bitmaps.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/