Re: [AD] SF.net SVN: alleg:[11675] allegro/branches/4.9/src/macosx |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] SF.net SVN: alleg:[11675] allegro/branches/4.9/src/macosx
- From: Milan Mimica <milan.mimica@xxxxxxxxxx>
- Date: Mon, 23 Feb 2009 19:27:20 +0100
eglebbk@xxxxxxxxxx wrote:
<snip>
+ { ALLEGRO_FLOAT_DEPTH, NSOpenGLPFAColorSize, 1}, // Correct?
ALLEGRO_FLOAT_DEPTH specifies a float format depth buffer, it has nothing to do
with colors.
+ { ALLEGRO_DOUBLEBUFFERED, 0, 0}, // Only have inverse of this
Use this value instead of the display flag. Eventually we'll remove the flag
internally and make set_new_display_flags(ALLEGRO_SINGLEBUFFER) set the
ALLEGRO_DOUBLEBUFFERED setting. We'll do the same for display color format.
That's how I imagined it.
+
+ /* Should we set double buffering? There are two ways to specify this:
+ * Either the flags indicate we want one buffer, or the options indicate
+ * we require a double buffer. If it's not required we don't care and go
+ * with the default.
+ */
+ if (dpy->parent.flags & ALLEGRO_SINGLEBUFFER) {
+ want_double_buffer = false;
+ }
So just remove this bit.
+
+ /* Now go through all other options, if set */
+ for (n = 0; n < number_of_settings; n++) {
+ i = allegro_to_osx_settings[n][0];
+ if (allegro_to_osx_settings[i][1] && extras &&
Um what? You are using the value of the allegro setting as an index in the
array? It just happens to work because you've started with ALLEGRO_RED_SIZE
which is 0 and didn't reorder anything later.
One thing you're missing is setting ALLEGRO_DISPLAY::extra_settings. You should
set it to values that were accepted by the driver so that user can query them.
If you won't do this now, then at least set ALLEGRO_COMPATIBLE_DISPLAY to 1,
indicating that a context suitable for allegro has been chosen.
So something like
dpy->parent.extra_settings.settings[ALLEGRO_COMPATIBLE_DISPLAY] = 1;
--
Milan Mimica
http://sparklet.sf.net