Re: [AD] display option settings

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


Have a look at the way Cocoa does it - might give you some inspiration?

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSOpenGLPixelFormat_Class/Reference/Reference.html#//apple_ref/occ/instm/NSOpenGLPixelFormat/initWithAttributes:

Pete


On Tue, Mar 4, 2008 at 8:18 PM, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
> Hi.
>  There is a number of new display options I want to pull in (most of the ones
>  listed at http://allegrogl.sourceforge.net/docs/group__settings.html), and
>  originally I wanted to propose a completely new display settings API, but I'm
>  hesitant about it. I don't like having a triplet of functions for each option,
>  but I wouldn't like to change that now either, so I'll have to deal with it. :-/
>
>  So the problem remains: how to specify the new options? Originally I wanted
>  something similar to what AllegroGL has, but with some semantics changed:
>  void al_set_new_display_option(option, val, suggest|request);
>  int al_get_display_option(option);
>
>  Must-have options are:
>  - The depth of each color component (RGBA) of the framebuffer. This would allow
>  pixel formats incompatible with allegro, useful when the user wants to do his
>  own drawing with OpenGL, in some custom pixel format.
>  - z depth - the depth of the z-buffer.
>  - Initial window position, for windowed mode (could go into multimonitor API if
>  we'll have one some day).
>  - Something called AGL_SAMPLE_BUFFERS and AGL_SAMPLES in AllegroGL, which
>  enables antialiasing.
>  - Something called AGL_FLOAT_COLOR and AGL_FLOAT_Z in AllegroGL, referring to
>  floating point framebuffer and z-buffer (fancy things).
>  - Possibly some other options, because I don't know what does each and every
>  option do.
>
>  Note that, for most of these options and the ones accepted by
>  al_set_new_display_flags(), the user wouldn't want al_create_display() to fail
>  if it can't set them. Display frequency is one of them too. "suggest|request" is
>  the key feature which the current API is missing.
>
>  We could have void al_set_new_display_option(option, val, suggest|request)/
>  int al_get_display_option(option) in addition to what we have now. But that
>  would be inconsistent.
>
>  I'm out of clever ideas.
>
>
>  --
>  Milan Mimica
>  http://sparklet.sf.net
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  --
>  https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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