Saving space when drawing rectangles

Post your FreeBASIC source, examples, tips and tricks here. Please don’t post code without including an explanation.
dafhi
Posts: 1641
Joined: Jun 04, 2005 9:51

Re: Saving space when drawing rectangles

Post by dafhi »

we're glad you're here :)
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Saving space when drawing rectangles

Post by marcov »

jj2007 wrote:
marcov wrote:Code size eats up ram and disk too.
Absolutely: 20 bytes to call the converter, 26 for the converter itself, that's a whopping 46 bytes.
Per location where the code is used. To save 8 bytes of data ram. So it all depends on what you have most, live data at any point , or places where you could them.

So yes, if you have a tremendous amount of live records it might save some.

P.s. in opengl you could maybe use the geometry shader to unpack rectangles. I do have a program where I write tens of thousands of rectangles (and the unit tests use 130000), but it is opengl. My original version did that iirc, converting gl_short coordinates to floats by dividing them by width/height uniforms in the geom shader.
Post Reply