GUI library for D

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Apr 6 15:21:37 PDT 2011


On 07.04.2011 1:29, Adam D. Ruppe wrote:
> Dmitry Olshansky wrote:
>> Mmm, am I the only one wondering where did you guys get SetPixel in
>> OpenGL ?  It's must have been GDI.
> Oops, looks like you're right. SetPixel is GDI, and it's pretty
> slow too. Looking at my code, I used glBegin(GL_POINTS); glVertex2f
> [...] glEnd() as the opengl putpixel. Looks like in an earlier
> revision, I also used glDrawPixels at some point, but I didn't keep
> it for some reason. Don't remember why (or even what it does.)
>
> But yeah, it's been a while and my brain jumbled it all together...
> sorry about that.
Ah,  I see. No problem, and, yes, fro me OpenGL never got drawing single 
pixels this way,
  and still not fast enough even when packed in single array. DrawPixels 
is for drawing block of pixel data (2D images), technically it can draw 
1x1 image.
As for the topic of messing old school DOS-like messing with image, I 
think there was some peculiar MMX-based
code for that buried somewhere in SDL, may be it can be revived in SSE2 
world :)
Long time ago I also sought out simplistic GUI system with direct 
framebuffer, I ended up with design
Windowing System <-> GL <- blit -> software renderer should be easily 
portable as far as the wrapper around windowing system is minimalistic 
(e.g. map repaint, keys and mouse events).

-- 
Dmitry Olshansky



More information about the Digitalmars-d mailing list