Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Antialiasing?

Author
Message
kuban
21
Years of Service
User Offline
Joined: 13th Mar 2004
Location:
Posted: 6th Apr 2004 16:08 Edited at: 6th Apr 2004 16:17
How can I enable antialiasing within Darkbasic? Is it possible?

In worst case, I only need to do non animated gfx. So the method can also be slow. Is it possible to render the gfx at hi-res bitmap, and then scale it down to screen? any ideas greatly appreciated...

I especially need antialised fonts. But I don't want to go for bitmap fonts, I want my code to be flexible, and use system fonts.

kuban altan
discreet inferno* artist
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Apr 2004 17:00
I think you probably want to check out the following (sorry, not near the help files at the moment):

1. Ensure your images are not being Mipmapped - there is a setting to prevent this. You will then get exactly what you expect, so you can anti-alias your image when you create it in your gfx package.

2. BLUR BITMAP. If you are creating text on the fly (or even using screen-shots), blurring the bitmap will "take the edge" off the resulting image, and make it look more natural.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
kuban
21
Years of Service
User Offline
Joined: 13th Mar 2004
Location:
Posted: 6th Apr 2004 20:27
Thanks BatVink. I have to antialias the text, but blurring would be somewhat different. I need nice edges for the fonts.

What I am thinking for now:

1. I will draw all my gfx onto a 1280x960 bitmap, which is just in memory and not drawn onto screen

2. Open a 640x480 screen.

3. Average 2x2 matrix into one pixel in 1280x960 map

4. copy the resulting pixel to screen

This way I can have 4 samples antialiasing for each pixel. But if I do this averaging with CPU, I guess it will be somewhat slow. Is there a hardware accelerated method for something like this?

kuban altan
discreet inferno* artist

Login to post a reply

Server time is: 2025-05-23 06:14:46
Your offset time is: 2025-05-23 06:14:46