Re: [AD] Behavior of OpenGL on Mac OS X

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


On Sun, 2009-03-01 at 09:31 -0800, Evert Glebbeek wrote:
> 
> So I guess my main questions are:
> 1. How should I set the "format" field in the display struct? Anything  
> that matches the requested colour depth+alpha size?

I'd say, just set it to whatever the user requested. I.e. if they do:

al_set_new_display_format(ALLEGRO_PIXEL_FORMAT_XBGR_8888)

Then if they later lock the screen bitmap, a buffer will that format
will be returned then. In OpenGL it really is not relevant which
internal format is really used, in fact I'm not sure we can know that
even with GLX or WGL.

> 2. Do we care sufficiently strongly about being able to set the red/ 
> green/blue bit sizes that we should consider using AGL instead of  
> NSOpenGL? If the answer is yes, I'm not the one who is going to do  
> it. ;) Personally I don't think this is all that important.  
> Aternatively, maybe someone can suggest a way to combine an AGL- 
> created context with an NSOpenGLView?

I have no idea about AGL vs NSOpenGL - but in all OpenGL drivers, my
opinion is that we should *not* care about the color sizes and
positions. The only thing I can see making sense for a user to select is
16 vs 32 bit, as one might give better performance than the other on
some (old?) drivers.

The only relevance al_set_new_display_format should have is what format
the backbuffer bitmap will advertise (and consequently what data format
you expect when locking it).

> 3. Is it a potential problem that OS X OpenGL uses its own display  
> scoring independent of Allegro? Again, personally I don't think so.
> 

Since we now have the display_settings.c file, I think it would make
most sense if everything uses it - however I think we have to change the
way the r/g/b/a component size and shift selection works. Those only
should play a role for debugging purposes - al_set_new_display_format
however should only be a hint (at least for the OpenGL drivers).

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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