Windows 8

So I’m trying out Windows 8 (yes, it’s not released to the public, and yes I have it legally).

Dear God, what a mess this whole Metro/desktop thing is.  Someone over at Microsoft must have split personality disorder or something.  How in hell did they think that was a good idea??

Anyway, the OS does have some really nice improvements and it’s very responsive (except when it’s not… I get random freezes once in a while, apparently it’s something to do with my Intel SSD).  And more importantly, after installing VS2010, and the June 2010 DirectX SDK, the new (and presumably old since I haven’t tried it yet) Gorgon works fine.  What I knew, and was hoping I was wrong, is that they took out the D3DX library for the new DirectX, and as such things broke horribly under Gorgon because SharpDX uses the D3DX libraries to load/save textures.  After installing the June 2010 DXSDK, everything worked again, so there’s that.

I really really really don’t like this metro thing.  It’s just horrible with a mouse/keyboard and while I was ambivalent towards the Start Menu in previous versions, I really miss that I can’t group my applications (and I have a lot) under folders.  This made everything really horrible to organize, especially with how obsessive I am about organization on my machine.

That said, the desktop is real nice.  Love the new task manager, love the new copy/delete dialogs.   I even like the new look they put in (they got rid of Aero, or probably more likely, the glass effect).

Sadly, I now have to figure out how in hell I’m going to make Gorgon work without relying on D3DX (yes, I know, I could keep with developing for the June 2010 SDK, but at some point you know they’re going to drop that).  Apparently I can use WIC (Windows Imaging Component), but it looks pretty convoluted and I need something that’ll give me AnyCPU support.

All in all, the awfulness of Windows 8 outweighs its benefits in my opinion.  Someone really needs to kick Ballmer (I blame him wholeheartedly for this mess) out of that company and install someone with a fucking clue (i.e. we don’t all use/want a tablet, nor do we all want to develop for them).

Anyway, I am not dropping support for Windows 7/Vista from Gorgon.  So don’t ask about it.

That’s all for now.  Gorgon is still being worked on, a little, here and there.  It’ll be ready by 2213.

Dual monitor stuff

So here’s a screenshot of the dual monitor code in action:

It’s not much to look at, but it was a major pain in the ass to get working, and does indeed work.  Basically you create 2 forms, and 2 swap chains and set both swap chains to full screen and then add some special code to handle cases where focus is lost/restored on the primary form.

Gorgon would normally handle focus loss to reset your full screen mode for you when focus is returned (this is due to a bug in WinForms and DXGI).  And that’s all well and good, but this code really doesn’t work well with multiple monitor situations.  So, there’s a flag to tell Gorgon to turn off the automatic mode reset on focus, and that will let you, the user, handle the transition when dealing with multiple monitors.  It’s not an ideal situation, but it works

It’s a bit complicated to set up, but there’ll be an example included with Gorgon on how to use dual monitor setups that’ll guide you through the process.

Look at my balls

So, I’ve been quite busy lately with a new job and such.  And as a consequence I haven’t had any time for Gorgon recently.  But I finally sat down this evening and did a little work (not much mind you, and certainly nothing of note) on Gorgon 2.x.

I’ve uploaded the Ball Demo to the site so people can have a look at it.  I’d appreciate any feedback (please post the feedback to the forums, thank you).

Please note the following before running it:

  1. It’ll probably crash.  It’s in development after all.
  2. You NEED Windows Vista Service Pack 2, or Windows 7 (Windows 8 -might- work, but don’t count on it).
  3. It will run on Direct 3D 9 capable video devices.  However, it requires Direct X 11 be installed on the system (hence the OS requirements).

To run it, just run the BallDemo.exe and pray (oh, and ensure that the zip file isn’t ‘blocked’ by Windows, .NET assemblies hate that shit).  It defaults to windowed mode with a resolution of 1280×800 although you can modify the BallDemo.config file to change to a resolution you like.

Let me know what your performance is like.

Issues with installing SlimDX Mar 2009 (2.0.7.41)

Apparently there’s an issue with Gorgon installing SlimDX.  When the installer runs, it is supposed to detect whether the March 2009 SP1 (v2.0.7.41) SlimDX assemblies are installed.  If they are not, then it will install SlimDX for you.  However, it has come to my attention that the Gorgon install has not been installing SlimDX.

The issue is with the March 2009 SP1 SlimDX end user runtime installer (Gorgon runs this when it installs).  Apparently it’s not working, and even though I’ve tried to download it from the SlimDX site it still refuses to run (for me) and claims that the installer is invalid.

If you’re having issues running Gorgon applications because it can’t find the v2.0.7.41 SlimDX assemblies:
Could not load file or assembly ‘SlimDX, Version=2.0.7.41, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9’ or one of its dependencies. The system cannot find the file specified.

Then install the SlimDX March 2009 SP1 Developer SDK from here and all should be well again.

Gorgon – 1.1.4529.31450

There’s a new version of Gorgon uploaded.  There’s not a huge amount in this release regarding the actual graphics library, just a few bug fixes.

However, there are two important changes:

  1. The project/solution files for the library source code were converted to Visual Studio 2010.  This means that in order to compile the Gorgon library, you will need Visual Studio 2010.  The library still uses .NET 3.5 SP1, so Visual Studio 2008 will continue to work when using the library assembly.
  2. Most important of all: There’s been a new library added called GSound (Gorgon Sound).  Written by ShadowDust702.  New forums have been added to reflect this new addition.

You can download Gorgon from here.

Font editor

So the font editor is nearly complete.  Here’s a few screen shots:

More text stuff.

Here’s a sample of text rendering in Gorgon 2.0 (Dorian).  It’s rendering 16,019 characters, animated with shadowing (which doubles the character count), plus the FPS counter.  When it renders the text, it renders with kerning information (provided the font has any) so the output should be properly spaced.  And while it’s doing this, it’s scaling the text to pump up the fill rate.

(The video has since been deleted)

All that at ~75 FPS, that’s not too bad hey?

In this particular “demo” you can see that I’m able to compress and expand the lines of text.  This is possible because of the new “LineSpacing” property in the text object.  This allows the user to set line spacing by setting a multiplier.  For example, a LineSpacing of 2.0 will give you double spacing and 0.5 will only move the lines half way.

Anyway, I’m still plowing through all of this.  And I’m pretty happy with the results.

Gorgon v1.x – Visual Studio 2010

I’m updating the solution and projects for Gorgon 1.x in the Subversion respository to use Visual Studio 10 .  The current binary release still uses Visual Studio 2008 and will continue to do so until a new release is put up.

If you are freaking out over this because it’ll somehow be the end of everything you love and hold dear, stop whining and get the express version of VS 2010 here.

Please note Gorgon still uses .NET 3.5 SP1 and you can use the binaries with Visual Studio 2008.  Again, you only need Visual Studio 2010 to compile the source for Gorgon.  I cannot stress that enough.

Text output and Fonts

Sweet merciful fuck.  That was painful.

I just spent the last 4 evenings/nights writing Gorgon’s font system and it was not fun.  And, of course, I’m still nowhere near done (still have to create the TextSprite object, and other the font effects like gradients and GDI+ image brushes).  But, I got it working.  Not only that, unlike the previous incarnation, it actually implements kerning properly (well, approximated kerning, I’m not dicking around with actual kerning.  Fuck that.)    One of the things about the 1.x font/text rendering that I absolutely hated was while it was worked, every now and again (especially on smaller fonts), it’d screw up and a letter would appear slightly (or not so slightly) shifted.  Quite annoying.   Here’s a screen shot showing how awful it was compared to GDI+ and how awesome v2 is going to be (click to expand it):

Gorgon/GDI+ text comparison

Gorgon/GDI+ text comparison

Note that all text is the same font:  Arial, 9.0 point, Bolded and Antialiased.  Also note that v2.0 is nearly (but not quite pixel perfect) identical to the GDI+ DrawString version.  I think that’s a slight improvement.

Continue reading

Gorgon Shaders

So I got custom shaders up and running in Gorgon 2.0.  The new version has always had shader ability because it’s using Direct3D 11, so it’s required to use them.  However, up until now the shader code has been hardcoded to use 3 default shaders.  But after today, there’s an ability to use customized shaders:

In this little sample, there’s a new system at work.  It’s basically a mini effects framework that can do multi-pass rendering and in this video there’s a wave shader and an embossing shader at work on the sprite.  If you want to learn more, click the stupid link below

Continue reading

Does anyone really want Direct3D 9 video card support?

I am sick as a pig. I hate having a fucking cold.

So, I figured out the issue that prompted all of this and it took damn near forever. Apparently feature level 9.x devices can’t copy GPU data to resources (e.g. textures) that have a shader binding flag set to CPU accessible resources. And apparently the D3DX functions to save the texture does exactly that. It copies the GPU texture to a CPU staging texture and writes that out (makes sense, reading from the video device is a no-no). Unfortunately my device object just says “fuck it” and promptly dies when this happens, which seems like a driver problem. Anyway, it’s fixed now. Not that it matters, but it was painful and could have meant the end to Direct3D 9 video card support in Gorgon (which no one probably really cares about anyway).

Unfortunately the fix comes at a price. Part of that price is increased memory usage. It’s painful enough to have to create temporary textures when converting to a format that’s not able to accept anything by standard RGBA 32 bit formatting, but with the feature level 9.x there needs to be another temporary texture that doesn’t have a shader binding flag. It’s kind of gross. The other part is that the only way to get it without a shader binding is to create the texture as a render target (unordered access views would have been nice, but they’re for Direct3D 11 devices only), so that limits the number of formats that can be used when saving.

Anyway, thought I’d throw that out there.