The Allegro Wiki is migrating to github at

Allegro Hack Day/2008 March 1

From Allegro Wiki
Jump to: navigation, search
Name Can attend
trentg  ???
elias yes
Matthew Leverton  ???
mimix yes
Peter Hull yes
pw yes


  • In AllegroGL we had more GFX options: Do we want some of these? The code is there and working. Will our screen be limited to ALLEGRO_PIXEL_FORMAT color format?
  • Specify how does al_create_display() behave when it can't honor all the flags set by al_set_new_display_flags(). Do we want/need something like AllegroGL's REQUIRE, SUGGEST and DONTCARE flags to each option?
  • Do we want a public function which would return bit shifts and sizes for each color component of the specified ALLEGRO_PIXEL_FORMAT? OpenGL drivers are going to need one anyway.
  • Licensing? now that we are mixing in AllegroGL code.
  • need some help on getting POT textures working


[11:37] You were granted voice by ChanServ.
[11:57] You left the chat by being disconnected from the server.
[13:10] You rejoined the room.
[13:10] You were granted voice by ChanServ.
[13:16] tjaden: hello
[13:16] mimix: hello
[13:16] Typosu: echo
[13:16] Typosu: *hello
[13:17] tjaden: hmm, is there anything we can start without elias and or trent?
[13:18] Typosu: start thinking about whats needed in a multi monitor query api.
[13:18] Typosu: ?
[13:19] tjaden: i've never had a multi monitor setup, so..
[13:19] Typosu: howmany, what modes they each support and where they are relative to each other.
[13:20] tjaden: i'll start: int al_get_num_monitors()  
[13:20] Typosu: heh
[13:20] Typosu: I suppose its pretty straight forward, except I have no idea what OSX and D3D actually supports
[13:21] Typosu: xinerama and XRandR are pretty featurefull
[13:21] Typosu: though XRandR drops having separate depths on each screen...
[13:21] Typosu: they share the same fb
[13:21] mimix: ChangeDisplaySettingsEx() does the job in win
[13:22] Typosu: Change lets you manage and query settings?
[13:22] Typosu: for all screens?
[13:22] Typosu: can we rotate? 
[13:22] mimix: no, that would be EnumDisplaySettingsEx
[13:22] Typosu: ah
[13:22] Typosu: another issue is having one screen fullscreen, but the other not, does DX allow that?
[13:23] Typosu: X honestly doesn't give a rats ass, it doesnt really "know" what fullscreen is
[13:23] Typosu: but DX seems to treat is specially
[13:24] peterhull: hello
[13:24] Typosu: with allegro and its 3d and YUV support it could be made to be a kick ass platform for PVR software.
[13:24] Typosu: so handling multi mon would be nice...
[13:25] Typosu: and then theres spanning across screens
[13:26] peterhull: Does multiple windows on the same monitor work yet?
[13:26] Typosu: yes iirc
[13:26] peterhull: I've never dared try it.
[13:26] mimix: it does
[13:27] mimix: isn't window position used to set at which monitor the window should appear?
[13:27] Typosu: it can
[13:27] Typosu: but then if its X with multiple connections, no 
[13:28] peterhull: On OSX you can specify which screen when you create the window
[13:28] peterhull: I don't know what happens if you try and drag  one across to another window
[13:28] Typosu: I think on X you can also "hint"
[13:34] tjaden: i managed to hack things so that the GL driver works on my video card which doesn't support NPOT textures
[13:34] Typosu: thats good, whatd you do?
[13:35] Typosu: just create a larger texture? or split up into smaller ones?
[13:35] mimix: we said will use just next POT texture
[13:35] tjaden: just a larger texture
[13:35] Typosu: ah
[13:35] tjaden: mimix ?
[13:36] mimix: that what you've done
[13:36] Typosu: easy enough, but not quite complete.. I think I remember that thread on the list now
[13:36] Typosu: may need to support creating pot textures as large as possible to create a larger bitmap than pot textures support
[13:37] You have returned from away.
[13:37] tjaden: anyway, i added a 'pitch' field to ALLEGRO_BITMAP but left the true width and true height out of ALLEGRO_BITMAP. not sure
[13:38] mimix: to handle to too-large bitmaps we will split the it, but not at the driver level
[13:40] Typosu: it would make sense to provide it as an internal api that the drivers can use...
[13:42] mimix: in AGL it is proved to be a mess on driver level, i'd rather push that upward
[13:43] Typosu: better to be in one place than 3 or more
[13:44] mimix: yeah, that's why it would be done in 3 different drivers, but in blitter routines
[13:44] mimix: s/would/won't
[13:44] Typosu: I would think that it'd have to be a core part of the ALLEGRO_BITMAP, so in a way, the drivers would all just use the "split textures" api...
[13:45] Typosu: but I suppose it could be used inside the blitter functions instead
[13:48] mimix: something like: next = bitmap->next; while (next) { blit(bitmap, bitmap->offset); next = bitmap->next; }
[13:48] Typosu: I would have just thought that the bitmap would have an associated list of texture ids
[13:49] tjaden: what about drawing primitives? won't it be hard in general to support split textures?
[13:49] Typosu: instead of a list of bitmaps
[13:49] Typosu: probably...
[13:49] mimix: drawing primitives is even easier, just draw it on every bitmap, clipping handles the offset
[13:50] Typosu: hmm
[13:50] mimix: rotation may be the problem, i'm not sure
[13:50] Typosu: true
[13:50] mimix: do he have pivot in the API?
[13:51] tjaden:
[13:53] mimix: hm, i guess it can be done with some math
[13:53] mimix: a list of textures may not be enough, because we probably need info as x/y_offset for each BITMAP segment
[13:54] tjaden: yup
[13:54] mimix: this system can also handle NPOT textures, but i'm hesitant about it
[13:55] mimix: it is slow for some reason
[13:55] Typosu: uploading mutliple textures? I though that was normally slow 
[13:55] mimix: lots of state changes in OpenGL probably
[13:56] mimix: you upload them just once
[13:56] tjaden: btw, is exnew_membmp slow to start for you?
[13:56] Typosu: mimix: not if you have to update them without support for drawing on textures
[13:56] Typosu: afaik
[13:56] tjaden: it's all the locking/unlocking of the accelerated bitmap when grabbing the font
[13:57] mimix: tjaden: ~0.5s delay
[13:57] mimix: even less
[13:57] tjaden: hmm, it's more like 5 secs here
[13:58] mimix: and i'm running debug version
[13:58] tjaden: well anyway, a5font locks and unlocks the bitmap for each char that it grabs
[13:58] tjaden: and the ogl driver does a full copy from the texture to memory each time
[13:59] Typosu: that seems a little unoptimal...
[14:00] mimix: does it do that even if texture_framebuffer_EXT is supported?
[14:00] mimix: ie drawing directly to textures?
[14:00] tjaden left the chat room. ("Leaving")
[14:00] tjaden joined the chat room.
[14:00] tjaden was granted voice by ChanServ.
[14:00] tjaden: oops
[14:01] mimix: exnew_blend takes a couple of secs to start here
[14:01] tjaden: it takes maybe a minute here 
[14:02] tjaden: i didn't time it
[14:03] tjaden: ok, not that long. 25 s
[14:03] mimix: still way too long
[14:04] tjaden: yup.
[14:06] tjaden: do you think we could get the allegrogl authors to relicense the code under giftware? i read that was the plan anyway
[14:06] Typosu: I thought it was already agreed upon
[14:07] mimix: all the people who ever contributed? or just the main ones?
[14:07] tjaden: whatever it takes?
[14:07] mimix: there was also a thought a5 won't be giftware
[14:08] tjaden: yeah, i wouldn't mind that option either
[14:08] mimix: but i'm not sure if elias was serious 
[14:09] tjaden: even if we don't do anything we'd still be okay
[14:09] tjaden: just a bit messy
[14:09] mimix: who is Bertrand Coconnier?
[14:10] tjaden: former developer
[14:10] Typosu: whats the current licence?
[14:10] mimix: so, former 
[14:10] Typosu: and how much of the actual code is being placed verbatim into 5.x?
[14:12] Typosu: Mesa 7.0.1 implementation error: User called no-op dispatch function (an unsupported extension function?)
[14:12] Typosu: Please report at
[14:12] Typosu:
[14:12] tjaden: sounds like the framebuffer object ext is missing
[14:13] mimix: um, most of the AGL now in A5 was edited
[14:13] mimix: and it is mentioned in the header
[14:13] Typosu: tjaden: probably, it starts up exnew_blend and its really messed up
[14:14] Typosu: starts in a couple seconds though, not bad on this laptop
[14:14] tjaden: glxinfo | grep -i framebuf will tell you
[14:15] mimix: something crashes because the FBO is not available?
[14:15] Typosu: nope no framebuffer
[14:15] Typosu: it doesnt crash I just get mesa erros and rendering errors
[14:15] mimix: well, the func should never be called
[14:16] Typosu: I do have: GL_ARB_vertex_buffer_object
[14:16] Typosu: but thats no fbo
[14:16] Typosu: the error seems to say its a mesa error or driver error
[14:17] Typosu: if it helps its a mobility radeon U1 in the 320M chipset
[14:17] mimix: what does exnew_opengl display?
[14:18] tjaden: yeah, that's the same problem on my machine. the code in svn uses fbo unconditionally
[14:18] mimix: where?
[14:18] Typosu: mimix: it renders a spinning square, but I still get that message from mesa
[14:19] tjaden: opengl/ogl_display.c, calls to glBindFramebufferEXT
[14:19] mimix: tat means that al_get_opengl_extension_list()->ALLEGRO_GL_EXT_framebuffer_object is true
[14:20] Typosu: why would that be?
[14:20] tjaden: specifically, in _al_ogl_set_target_bitmap, in the else branch
[14:20] Typosu: if the extension doesnt seem to be supported by my card and/or drivers
[14:20] mimix: tjaden: yep, that looks wrong
[14:21] tjaden: Typosu, does your card support NPOT textures?
[14:22] mimix: Typosu: oh, does the spinning square have a triangle in it?
[14:22] Typosu: mimix: no
[14:22] Typosu: tjaden: um, Im not sure
[14:22] mimix: it's ok then
[14:23] Typosu: I have a couple of older cards I can test with as well, TNT2 and a raeon 9200
[14:23] tjaden left the chat room. ("Leaving")
[14:23] Typosu: and a couple newer cards, 9800 and a gf 8800gts
[14:23] tjaden joined the chat room.
[14:23] tjaden was granted voice by ChanServ.
[14:24] tjaden: that's pretty annoying. i forget i'm not in vim and hit ^W which closes the tab in xchat
[14:25] Typosu: heh
[14:25] Typosu: thatll teach you to use vim! 
[14:25] Typosu: or to not use emacs, which can have an irc client in it!
[14:25] Typosu: how do I check to see if I have npot textures?
[14:25] Typosu: I cant really find much on the net about this card
[14:26] tjaden: my eyes are looking at vim but the input focus was elsewhere
[14:26] Typosu: but exnew_blend is seriously messed up on here 
[14:26] mimix: glxinfo | grep texture_non_power_of_tw
[14:27] mimix: glxinfo | grep "OpenGL version"
[14:27] Typosu: I have texture rectangle...
[14:28] elias_ joined the chat room.
[14:28] elias_ was granted voice by ChanServ.
[14:28] Typosu: but nothing with "texture_non" in it
[14:28] mimix: if the version is >=2.0 then you have NPOT textures
[14:28] Typosu: thats not guaranteed unfortuneatly
[14:29] mimix: it is afaik
[14:29] mimix: the OGL specs require so
[14:29] Typosu: its supposed to be
[14:29] Typosu: but sometimes I Think some cards claim 2.0 but miss an old ext here and there
[14:29] Typosu: or do it wrong...
[14:29] Typosu: but anyhow, with the stuff I have, it says gl 1.3
[14:29] mimix: texture_rectangle is another way around NPOT textures, yes
[14:30] mimix: textures get promoted to core, and are allowed to be missing in the extension string
[14:30] Typosu: yeah, I know, and it annoys KittyCat to no end 
[14:31] mimix: which means you can't call the suffixed function and that's a PITA
[14:39] tjaden: hi elias
[14:42] elias_: hi
[14:43] elias_: had a storm and 4 hours of power outage here
[14:45] tjaden: well we didn't discuss much anyway 
[14:45] Typosu: incase you're wondering, this is what exnew_blend looks like here:
[14:46] mimix: qute
[14:47] tjaden: i'll post my hacks tomorrow and you can test it then
[14:49] elias_: hacks for non-pot?
[14:50] tjaden: hacks for pot
[14:50] elias_: yeah, what i meant 
[14:50] tjaden: not non-pot
[14:51] tjaden: maybe you can finish it off for me 
[14:51] elias_: the harder problem will be exceding the maximum texture size
[14:51] Typosu: going to try texture rect support?
[14:51] elias_: but didn't get around yet to do any work on the combined bitmaps idea yet
[14:51] Typosu: or does it suck more than just allocating a larger texture?
[14:52] elias_: texture rect is bad i think..
[14:52] elias_: since it makes it harder to use Allegro for OpenGL-only apps
[14:52] mimix: texture rectangle requires special handling when blitting, because its coordinates are absolute
[14:52] Typosu: hmm
[14:52] elias_: likely you want al_get_bitmap_texture() to always return a normal etxture for that use
[14:53] elias_: since you might use them for actual 3d
[14:54] elias_: well, at least I was annoyed that with AllegroGL, i had to do my own texture uploading
[14:54] elias_: it's not a very big problem of course, if you use OpenGL, you could be expected to do that
[14:55] mimix: allegro_gl_extensions_GL.texture_rectangle = 0 would solve it
[14:57] elias_: i see
[14:57] Typosu is now known as TomasuDlrrp.
[14:57] tjaden: i just had an idea for solving the slow font loading problem
[14:57] mimix: but then you would have multiple textures
[14:57] TomasuDlrrp: I'm off
[14:58] elias_: ah, yes, AllegroGL has this multi-texture solution to non-POT
[14:58] elias_: it also seemed to do some kind of scaling sometimes
[14:58] mimix: for bitmaps yes, for plain texture uploading ti resizes
[14:59] elias_: yeah. that was unacceptable as well
[14:59] elias_: it made everything look blurry
[14:59] mimix: well, it has to do something
[14:59] elias_: (maybe i had a broken driver)
[15:00] mimix: not using npot textures is the best solution
[15:00] elias_: anyway, using my own uploading (using next biggest POT) worked fine
[15:00] elias_: hm, did you agree on a new license?
[15:00] mimix: ah, agl does all except that
[15:00] mimix: no
[15:01] mimix: we didn't even start the topics
[15:01] elias_: ah, ok
[15:01] mimix: except for POT textures
[15:02] tjaden: would it be hard to support simultaneous read-only locks on a bitmap?
[15:04] elias_: guess a lock in al_lock_bitmap_region would be all that's needed
[15:04] elias_: since it's the only way we support writing
[15:05] elias_: but maybe I misunderstood
[15:05] elias_: hm, away now for some minutes
[15:06] tjaden: current the a5font loading locks the bitmap to be imported from, scans it to find the next char, unlocks it, then locks it to blit the char to the destination
[15:06] tjaden: so it's repeatedly locking and unlocking, whereas it should only need to lock once before the loop
[15:07] tjaden: i thinnk the only reason it unlocks is because the blit needs to lock as well
[15:07] tjaden: so if we allow multiple regions to be locked for reading at once, we could do that
[15:20] elias_ left the chat room. (Read error: 104 (Connection reset by peer))
[15:24] tjaden left the chat room. ("sleep")
[15:27] elias_ joined the chat room.
[15:27] elias_ was granted voice by ChanServ.
[15:29] elias_: hm
[15:29] elias_: maybe just convert it to a memory bitmap
[15:29] elias_: (the bitmap to import from)
[15:30] elias_: then locking should take no time
[15:40] mimix: can we go with the topics?
[15:40] mimix: In AllegroGL we had more GFX options: Do we want some of these? The code is there and working. Will our screen be limited to ALLEGRO_PIXEL_FORMAT color format?
[15:43] mimix: we have to provide some of those options: depth of the z-buffer for example
[15:44] mimix: and sample buffers
[15:46] elias_: maybe it can also be combined with al_get_display_mode
[15:46] elias_: so you could query beforehand what is available
[15:46] elias_: seems cleaner to me than REQUIRE/SUGGEST and then a surprising result
[15:47] mimix: yes, sound better
[15:49] mimix: it could also return the pixel format (bit shifts), and a flag telling if the format is compatible with allegro
[15:49] elias_: yes, pixel format would be nice
[15:49] mimix: hm, but then it would return hunderds of entries
[15:50] elias_: and yeah, i think there's no real reason to require compatible formats
[15:50] elias_: hm
[15:50] mimix: it wuold be difficult to choose, that's why agl had a scorer
[15:51] mimix: non-allegro-compatible format means you can't use allegro bitmaps, while you can still use ogl
[15:51] mimix: that's fine
[15:52] mimix: i have to go now