Jump to content

  • Log In with Google      Sign In   
  • Create Account


thomasvt

Member Since 08 Jan 2012
Offline Last Active Feb 07 2012 11:12 AM

#4909911 EffectEd - an HLSL editor

Posted by thomasvt on 05 February 2012 - 02:03 PM

Hey,

A while ago I showed my first test version for a lightweight HLSL editor for integration in daily programming.

I have been working quite a bit on it since then (in spare time), so I now proudly present:

EffectEd v0.1

Main Features:
* syntax highlighting
* waterproof error checking using the Direct3D compiler
* intelligent code completion
* support for splitting D3D 11 shaders over multiple files (= compile using shaderprofiles)

Check out codeplex for the full feature list and details and watch the videoto see it in action.

The binaries have some bugfixes that the sources don't have yet (had some big issues with an attempt to use GitHub and lost some work *grrr*)

greetings.


#4904800 first version of my Effect file editor

Posted by thomasvt on 21 January 2012 - 05:01 AM

Hey,

As I found existing HLSL editors overly complicated (FX Composer), outdated (Render Monkey) or unavailable, I decided to make a Visual Studio Code Editor inspired HLSL Editor.

Now, I don't say FX Composer is bad, but it's just very complex. I wanted something lightweight that easily integrates into the programming process with nothing but the most obvious features: syntax colouring, code completion (the more the better), visualizing errors and maybe a simple test-on-sphere renderview.

It's been like only 15 hours of work so far so it's not finished yet but thanks to the great AvalonEdit it has my priority features in it already:
* syntax highlighting
* code completion using Alt+Space for intrinsic HLSL functions (could be much better, but that requires a lot of context-parsing work)
* compiling using DirectX 10 with error listing and marking errors in the code when double clicked.
* filewatcher: EffectEd detects when you modified the open file in another application
* opens files from commandline argument: when "*.fx" is correctly associated to EffectEd, opening an effect file from Explorer or VS.NET will automatically open EffectEd with the requested file.

EffectEd v1.0

Posted Image

As I don't want to spend time yet to integrate it into VS.NET, you can associate the .fx extension in Visual Studio Solution Explorer by right clicking any fx file and choose "Open with...". In there, you can configure EffectEd to be the default for .fx files.

All is still experimental but I thought I could share it as it is to get your thoughts and ideas. Or to find out if I'm making something that already exists (and is still available)

cheers.


#4902644 SlimDX vb.net sample won't compile

Posted by thomasvt on 14 January 2012 - 08:03 AM

I have googled around a bit, and I think you're using these translated examples: http://www.ventsim.com/files/samplesvb.zip

If it's those, I looked at them for a bit, and they don't seem to compile indeed even after messing around with it for a while.

It seems like a bizarre version of SlimDX.dll he's sending with the zip package because when I use the "official" dll from slimdx for .NET 2, I get non existing methods, while the dll that's in the sample package doesn't have these errors. Then again, running with the dll provided gives the runtime problem you mentioned.
Maybe, this is fixable, but why bother?

Just follow my advice: download Visual Studio Express 2010 C# (it's free, and legal) and get the latest SlimDX. You can even consider XNA 4.0 which is even easier to get started with and is powerful too. XNA is a game framework on DirectX, so you won't have to write a lot of basic math/rendering logic yourself. XNA 4 is DirectX 9, which you are using anyway. It's really a no-brainer, you'll thank yourself in a few weeks you learned C#; trust me :)


#4902461 mouse cursor on RenderForm won't hide after alt-tab

Posted by thomasvt on 13 January 2012 - 03:57 PM

Hey,

On Win7 DirectX11 using SlimDX, i have an empty project that's fullscreen with some mousecursor-hiding code like found on this forum too. The mouse is nicely hidden initially.

When alt-tabing out and activating the app again, the fullscreen returns but with a visible mousecursor.

Whichever code i try, it won't work. I even have Cursor.Hide() in my main loop :)

Here is the code, it's messy because it's test code :)

Anyone see mistakes? When i translate to DirectX 10, i get the same problem.

var form = new RenderForm();

Device device;
SwapChain swapChain;
Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.Debug, swapChainDescription, out device, out swapChain);

using (var factory = swapChain.GetParent<Factory>())
factory.SetWindowAssociation(form.Handle, WindowAssociationFlags.IgnoreAltEnter);

form.Activated += (o, e) => { swapChain.IsFullScreen = true; Cursor.Hide(); };

var backBuffer = Resource.FromSwapChain<Texture2D>(swapChain, 0);
var renderView = new RenderTargetView(device, backBuffer);
device.ImmediateContext.OutputMerger.SetTargets(renderView);

device.ImmediateContext.Rasterizer.SetViewports(new Viewport(0, 0, form.ClientSize.Width, form.ClientSize.Height, 0.0f, 1.0f));

form.MouseEnter += (s, e) => Cursor.Hide();
form.MouseLeave += (s, e) => Cursor.Show();

MessagePump.Run(form, () => {
device.ImmediateContext.ClearRenderTargetView(renderView, Color.CornflowerBlue);
swapChain.Present(0, PresentFlags.None);
Cursor.Hide();
});

swapChain.IsFullScreen = false;

device.Dispose();
swapChain.Dispose();


PARTNERS