The SharedMemory class library provides a set of C# classes that utilise a non-persisted memory-mapped file for very fast low-level inter-process communication (IPC) to share data using the following data structures: buffer, array and circular buffer (also known as a ring buffer).
The library abstracts the use of the memory mapped file, adding a header that includes information about the size of the shared memory region so that readers are able to open the shared memory without knowing the size before hand. A helper class to support the fast copying of C# fixed-size structures in a generic fashion is also included.
The project source can be found on GitHub, with binaries available via Nuget.
What is a memory mapped file?
A memory-mapped file is an area of virtual memory that may have been mapped to a physical file and can be read from and written to by multiple processes on the same system. The file or portions thereof are accessed via views to one or more processes as a contiguous block of memory. Each view can then be read/written to using a memory location.
A memory-mapped file can be created as one of two types:
persisted: mapped to a physical file, and
non-persisted: in-memory only, commonly used for inter-process communication (IPC).
A memory-mapped file is referenced using a unique name, unlike named pipes however a memory-mapped file cannot be accessed directly over a network.
Having fallen in love with C# some years ago, and more willing to lose my favorite toe than go back to C++ ever again, this book is exactly what I needed. SharpDX makes it possible to continue with XNA type graphics development in C# and DirectX 11, but it’s not easy to get help or anything besides reference docs at the time of this review. This book serves as a comprehensive manual for SharpDX development that is timely and sorely needed. It’s the only book of it’s kind and fills an important and useful purpose, what else needs to be said? If you’ve been messing with SharpDX, buy this book and read it cover to cover.
I am impressed by the writing style. From start to finish, each topic is explained clearly in detailed step-by-step instructions…Good introduction for those new to DirectX 11, and also covers some topics that will be of interest to more experienced coders.
I loved this book, even if you are not a C# developer, you can port/include these techniques to/in your C++ engine. If you are just starting out, this may not be the book for you, if you have been working with earlier versions of DX and looking for an interesting read, then I don’t think you can go wrong with this book.
…Direct3D Rendering Cookbook is a great starting point for those looking to jump into 3D rendering, and even remains relevant once the basics have been covered by providing reference information about advanced shaders and techniques that you may want to make use of later…
…I would recommend this book to anyone who is interested in having a solid resource for 3D development that will last them past the basics…
After 8 months of hard work, I am now a published author! It has been a challenging but rewarding experience and I’m really excited to finally see it published. I hope people find it as enjoyable to read as I found it to write.
In this post we will look at how to use the graphics content pipeline for C# in both Visual Studio 2012 and Visual Studio 2013 for Desktop and Windows Store apps.
Since Visual Studio 2012 there has been a new graphics content pipeline and graphics debugger – including a DirectX frame debugger and HLSL debugger. The graphics content pipeline provides a number of build targets for converting common 3D and graphics assets into a usable format for DirectX applications, this includes the compilation of common mesh formats such as Collada (.dae), AutoDesk FBX (.fbx), and Wavefront (.obj) into a compiled mesh object (.cmo) file, and converting regular images into .DDS files.
Unfortunately the graphics content pipeline tasks don’t work out-of-the-box with C# because the MSBuild targets are not compatible.
Here are the links required to prepare a Silverlight 5 development environment for those that need to target Silverlight 5.1.20513.0 even when Microsoft remove the links to the downloads from their download site(s). Both the Developer runtime and normal runtime for 32-bit and 64-bit are included. Note: this release of Silverlight uses the same SDK and Tools version as for the previous release – links have been included for convenience. Continue reading Where to download Silverlight 5.1.20513.0 Tools/SDK/Developer Runtime→
I have long wanted to build an ambient lighting solution (e.g. like Ambilight) and at last it is starting to take shape with Afterglow, a solution built by myself and Jono.
Afterglow provides a framework to perform image capturing, colour extraction, post processing and colour output – primarily for use with lighting systems such as for ambient lighting.
The Afterglow project is designed to be an input and output agnostic framework, allowing users to create their own plugin’s to read images from the screen or perhaps a camera and to output to their own hardware solution. One idea, unrelated to existing ambilight-type solutions, is to build a sound analysis plugin that provides mood lighting for a room.
The hardware solution we used is a LED pixel string driven by an Arduino Uno. You can see how to build the hardware here, and see images of the output at the Afterglow Gallery. This uses a small Arduino program listening for serial input sent by an output plugin within Afterglow.
The reason I am interested in building an ambient lighting solution is to drive the lighting by images captured while playing a game. Traditionally ambient lighting systems have been designed to work with movies / TV whereas Afterglow is a more flexible environment that can accept any input source. This is beginning to be realised within Afterglow with the recent addition of a DirectX capture plugin.
It is still early days for the project with a long to do list and plenty of issues, but if you are after an easy to build, extensible ambient lighting solution Afterglow is a good start! Anyone interested in participating in the project or building custom plugin’s is welcome!