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 .NET / Antialias. Why doesn't DGDKLib.dll contain an antialias parameter in SetDisplayMode?

Author
Message
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 23rd Oct 2011 13:57
The thread title speaks for itself really.

It is not the end of the world, because the user can force antialiasing on using their graphics card control panel; and such a feature is standard nowadays.

But it would be nice to force it anyway, because by default the GPU switches it off, which is a bit of a nuisance when wanting your game to look good at low resolutions.

jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 23rd Oct 2011 17:59
I second that motion. Having some AA support built in would be very nice.

" The best slaves are the ones who think they are free. "
APEXnow
Retired Moderator
20
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 24th Oct 2011 00:20
The problem is that DGDKLib itself is a wrapper for the DarkGDK C++ libraries. If that function doesn't support the parameters, I can't expose them through the wrapper either.

I'll look to see if it's something that was missed though.

Paul.

Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 24th Oct 2011 02:44
I figured

At least I can tell players to force antialiasing on in the control panel for now.

jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 24th Oct 2011 15:43 Edited at: 25th Oct 2011 00:49
You can force AA in DX9 via multisample parameters. You have to make a call to the device to see if it supports its and if it does you can turn it on. There is a sample in the SDK folder that comes with the DX version Dark GDK was built on. The sample is C++ of course. The sample isn't really the best but it shows the basics.

" The best slaves are the ones who think they are free. "
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 24th Oct 2011 21:15
Thanks Jojoofu

I did a local search for the sample project but I couldn't find the one you are talking about.

Moving on, I should mention that I am using VB.NET, although I have no trouble translating C++ to VB 90% of the time.

I have these optional undocumented parameters in the SetDisplayMode function;

iMode, iVertexProcessing & iLockable.

Unfortunately, the antialiasing (multisampling factor) option is not in this library; it may be in the Dark GDK update, and is available in DBPRO, but the parameter was not exposed for .NET interface for some reason.

I assume iMode represents WindowMode, iVertexProcessing for various processes as illustrated here, and iLockable, not sure what that parameter is for.

I am probably not going to get around this, the players will have to set it manually outside of the game.

jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 25th Oct 2011 00:54
Sorry , let me reword my previous post. The example I am talking about is a C++ sample that comes with the DX SDK (june 2010) that Dark GDK .net was built on. Basically the developers would need to make a wrapper based of that example and implement it into the next Dark GDK .net update. If I had the time I would get back into DX but that stuff is very time consuming.

I am also looking foward to an official template for 2010 versions of VB / C#

Until then keep on gaming

" The best slaves are the ones who think they are free. "
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Nov 2011 00:31
Yeah, I've got Dx SDK here aswell; I was previously wondering if I could use some of its functions along side DGDK, but it seems like hard work, if not impossible for me.

Moving forwards with anti-alias for DGDK

Has anyone used or experienced the use of Anti-alias HLSL FX Shaders? It is obvious that it could be done with a full screen post render pixel shader; which could work in the same shader that handles bloom and HDR, but one would need to test how well this performs, between graphics cards and in different scenarios; something I will look into.

Another concept is anti-alias per object; using a shader to apply a variable amount of pixel smoothing; according to its properties and distance from the camera; or with a constant setting if required.

Over the top compared to a single function call or forcing anti-aliasing on with the control panel; but it might actually be a temporary solution to say the least, or a better solution for more control and creativity and support for GPUs that do not support much, if any automatic anti-aliasing.

Login to post a reply

Server time is: 2024-03-29 12:39:32
Your offset time is: 2024-03-29 12:39:32