#pentagram@irc.freenode.net logs for 23 Nov 2002 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[00:15:54] --> Dark-Star has joined #pentagram
[00:17:57] --> Kirben has joined #pentagram
[00:17:57] --- ChanServ gives channel operator status to Kirben
[01:01:08] <-- Dark-Star has left #pentagram ()
[05:55:48] --- Darke|zzZ is now known as Darke
[05:56:21] --- ChanServ gives channel operator status to Darke
[05:57:09] <Darke> Colourless: So we need to let openGL do all the scaling for us? Or will we have to do some sort of 'resizing' of the shapes beforehand?
[05:57:46] <Darke> Colourless: In any event, it certainly seems like a good excuse to 'hand resize' the u8 font to something easier to read. *grin*
[10:01:10] --> Colourless has joined #Pentagram
[10:01:10] --- ChanServ gives channel operator status to Colourless
[10:01:25] <Darke> Hi!
[10:01:40] <Colourless> HIí
[10:02:59] <Colourless> Darke: about scaling... i have ideas on how to get around the problem.
[10:03:54] * Darke nods.
[10:04:28] <Colourless> the idea, which i've partly mentioned on the mailing list is to render models into the high res buffer, and paint shapes into the low res buffer
[10:05:55] <Colourless> it wont be 'hard' to do, just a little messy
[10:06:14] * Colourless has actually been thinking about the problem a lot
[10:07:47] <Colourless> with opengl it's a much nicer idea to render in as high res as you can handle and of course let opengl just do the scaling. 320x240 with 3x scaling should look half decent
[10:08:35] <Colourless> btw 3x scaling will give you a res of 960x720 which is generally supported my most graphics cards
[10:10:58] <Colourless> the trick to do high/low res drawing in software is to use the 'depth' buffer to indicate which buffer a pixel belongs to. if the depth buffer is 0 for a pixel, it needs to come from the lowres buffer, if it's nonzero then it's needs to come from the highres buffer
[10:15:44] <Colourless> the issue is when drawing into the low res buffer you need to zero out the depth buffer (not exactly difficult, but annoying none the less), when drawing into the high res buffer you'll need to 'upscale' the low res buffer (only if the shape is transparent) and after drawing to the high res buffer
[10:16:03] <Colourless> you will need to downscale the modified region of the high res buffer because something trans may be painted into the low res buffer that is over high res.
[10:17:45] * Darke nods. Bit of a pain to keep switching between them, but it makes sense.
[10:18:24] <Colourless> of course the 'trans' related problem isn't that much of an issue since when sorting shapes it will be easy to tell if the upscaling/downscaling actually needs to be done
[10:20:00] <Colourless> of course, the final alternative option is to have a 2x point scaled shape drawing option.
[10:21:00] <Colourless> that would be the easiest, but it wouldn't allow you to use any of the other scaling methods
[10:23:28] * Darke nods. Yup.
[11:14:56] --- Colourless is now known as Cless|Away
[11:14:57] <Cless|Away> bbl
[11:44:44] --> wjp has joined #pentagram
[11:44:44] --- ChanServ gives channel operator status to wjp
[11:54:26] <-- wjp has left IRC (Read error: 54 (Connection reset by peer))
[12:03:41] --> wjp has joined #pentagram
[12:03:41] --- ChanServ gives channel operator status to wjp
[12:15:39] --- Cless|Away is now known as Colourless
[14:55:14] <Colourless> ok, small design idea for pentagram here to make things easier. For each class that inherits from another class we add in a typedef INHERITED_CLASS Inherited; line at the top of the class. What it will allow is a simple unified way to access a member in the Inherited class, and will allow us to make minimal changes should the inheritance of a class be changed
[14:57:23] * wjp nods; interesting idea
[14:57:39] <wjp> emulates the way Delphi does this, IIRC
[14:59:46] <Darke> So if you have something like `class Bar : public Foo {};` you put `class Bar : public Foo { typedef Foo Inherited; }'`?
[15:00:14] <wjp> maybe make it a #define
[15:00:36] <Colourless> wjp, think about that for a second :-)
[15:00:39] <wjp> class Bar : public Foo { INH(Foo); } or someting
[15:00:44] <Colourless> Darke: yes
[15:00:46] <wjp> s/ting/thing/
[15:00:54] <Colourless> wjp, that would work
[15:01:01] <wjp> I didn't mean #define Foo Inherited :-)
[15:01:14] <Colourless> good
[15:01:55] <Colourless> the Inherited type probably should be private. You wouldn't really want someone doing Inherited::Inherited or something :-)
[15:02:34] * Darke considers `#define CLASS_INHERIT(X, Y) class X : public Y { typedef Y Inherited;` and does his best to look innocent.
[15:03:00] * Colourless sees code that beings to look like COM
[15:05:20] <Darke> Admittedly, I can't see any situation I might have a use for such a typedef'ed construct, but I'm sure there's a use somewhere out there. *grin*
[15:07:06] <wjp> are you sure? :-)
[15:07:27] <Darke> One thing, what about multiple inheretance?
[15:07:41] <Colourless> well, it breaks then :-)
[15:07:48] <Darke> wjp: Well... it's possible to do, so there has to be at least one use for it somewhere. *grin*
[15:08:33] <wjp> How about avoiding multiple inheritance where possible? :-)
[15:08:52] <Darke> Colourless: Admittedly I can't really see us abusing^Wusing multiple inheretance to such an extent that we might actually care. I don't forsee us adding a GC library to things.
[15:26:11] * Darke considers overloading new to have an object pool for his cute little nodes. Would make it easy to keep track of them, faster to allocate them too for the 2nd+ functions he's decompiling. And it's just a neat hack. *grin*
[15:27:15] <Colourless> but it's not a hack :-)
[15:28:06] <Colourless> well, not entirely :-)
[15:28:29] <Darke> It certainly would be for me, since I've not written something like that before. People would look at it and run screaming. *grin*
[15:29:14] <Darke> Unless I just borrowed the code from somewhere else anyway, it's not as if it's not been done a million times before. *grin*
[15:39:23] <-- wjp has left IRC ("brb")
[15:42:39] --> wjp has joined #pentagram
[15:42:39] --- ChanServ gives channel operator status to wjp
[17:05:42] <-- Kirben has left IRC (Read error: 54 (Connection reset by peer))
[17:40:01] <-- wjp has left IRC ("Lost terminal")
[18:12:49] --- Darke is now known as Darke|zzZ
[18:40:34] --> Dominus has joined #pentagram
[18:46:43] <-- Dominus has left #pentagram ()
[20:04:50] <-- Colourless has left IRC ("casts invisibility")
[21:39:04] --> wjp has joined #pentagram
[21:39:04] --- ChanServ gives channel operator status to wjp
[22:57:02] --> Kirben has joined #pentagram
[22:57:02] --- ChanServ gives channel operator status to Kirben
[23:06:46] <-- wjp has left IRC ("brb")