Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Yes, I should probably be working

Sign in to follow this  


Basic structure of the harness is in place. After a couple of false starts - including an attempt to write the whole thing in C++/CLI - I've settled on a three-component structure:
  • Render module DLL, written in C++ - consists of a class derived from RenderingModule, and a factory function to instantiate the class

  • Marshalling DLL, written in C++/CLI - wraps the native RenderModule in a managed interface, dealing with all DLL handling and data marshalling

  • UI app, written in C#. Provides the frontend.

Mishtair Hoxley was suggesting that I look into DirectShow for recording the AVIs - I think there's a DirectX.AudioVideoPlayback namespace under .NET that may contain what I want, but if not, I'll either find an alternative way to build the AVI or write another C++/CLI DLL to handle it all. Or maybe build the functionality into the existing one.

C++/CLI really is a horrible language. The fact that you can mix managed and unmanaged code freely is convenient, but that seems to be pretty much its only redeeming quality. I'll be quite happy to keep the marshalling DLL as thin as possible and write all the serious GUI stuff in C#.

One interesting side-effect of the way I've written the RenderModule interface is that there's actually nothing D3D10-specific in the harness itself - the module is just expected to return a pointer to an array of RGB values. The RenderModule can generate those values however it wants - D3D10, D3D9, software rasterizer, random number generator. As such I'll probably test it all using a D3D9 module, allowing me to stick to what I already know, and allowing me to do all dev and testing under XP.
Sign in to follow this  


Recommended Comments

C++/CLI is an abomination, but it is definitely an improvement over the "Managed Extensions for C++" of .NET 1.0/1.1. You should see some of the IL that thing used to spit out.

Share this comment

Link to comment
Sounds like you're making good progress. Does your code also force a fixed frame-rate so you can fake a 20-30hz movie out of the reference rasterizer?

If you can plug it into more generalised forms of output it could be a neat all-round harness for recording videos. I doubt it'd be straight-forward, but I wonder if you could hook it upto the DXUT framework and capture the SDK samples [oh]


Share this comment

Link to comment
The render modules are stateless, so 'framerate' isn't really an issue - I'm not passing delta times, I'm passing absolute times. So a fixed framerate is just a question of:

/* ... etc ... */

and presto, I've got 10FPS. When doing the AVI recording I expect there will be some kind of header value that I can use to specify the playback framerate.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!