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.

Dark GDK / Please Help to make AAText whith no problem!!!

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 27th Jul 2009 18:41
I use dbSetWindowOff(), for good quality of game.

I must every time reload my sprites after Alt-Tab (and Ctrl-Alt-Del in Vista). But using AAText and can not be reloaded when I maximize window back. This stoping on dbSync(); row.

How can I avoid this error???
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 28th Jul 2009 05:26
I think the device gets lost when you alt tab or press ctrl-alt-del.

To get around it for the AAText, I assume you are calling the DirectX API directly to draw it using some of Cloggy's code or a similar method ?

To get around the error, I would think that whatever you are doing to get the directx surface to draw your text onto initially , you would need to do that again after you restore the lost device, after an alt-tab etc... so pretty much run the "AAText setup"(or whatever you call your text setup functions) again, if that makes sense to you.

Note : It may not be as simple as just "Setting it up again" .. you may need to release and reassign any pointers before you try to set it up again, depending on how you are using it.

If none of what ive suggested works, would it be possible for you to post your code, or the part of it that deals with your AA text at least. Perhaps someone has had a similar problem and can point you in the right direction of fixing it if they know how you are using the text.

If it ain't broke.... DONT FIX IT !!!
Drowneath
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location: In your eyes
Posted: 28th Jul 2009 12:00
What is this 'AAText' btw?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 28th Jul 2009 14:20
DirectX Anti-Aliased Text.... Its a form of text that can be used by making calls directly to the directx api.

The DarkGDK and DarkBasic Pro 2D drawing and text commands are notoriously slow.

Cloggy, from here in the forums, made a plugin originally for darkbasic pro that provided these functions, by accessing the API directly. His plugin is now available for GDK aswell, and he has released the source code so that you can see how it all works...

Search for Cloggy's D3DFunc plugin if you want some more info about it....his functions include drawing functions for basic 2D aswell as text, all of it miles faster than the DBPro native ones.

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-10-01 08:33:50
Your offset time is: 2024-10-01 08:33:50