SharpDX, DX11 and Stencil Buffers



I'm attempting to draw a shape/texture to the stencil buffer and then clip subsequent renderings to that stencil buffer. I've gone through the SharpDX forums and the section on depth stencil buffers in "Introduction to 3D Game Programming with DirectX 11", but it's still not quite clicking. Here are the two DepthStencilStates I'm switching between to attempt to accomplish this effect: var defaultDepthStencilStateDescription = DepthStencilStateDescription.Default(); defaultDept

Related to : SharpDX, DX11 and Stencil Buffers
Optimizing sorting container of objects with heap-allocated buffers - how to avoid hard-copying buffers?
Game Development

I was making sure I knew how to do the op= and copy constructor correctly in order to sort() properly, so I wrote up a test case. After getting it to work, I realized that the op= was hard-copying all the data_.


I figure if I wanted to sort a container with this structure (its elements have heap allocated char buffer arrays), it'd be faster to just swap the pointers around. Is there a way to do that? Would I have to write my own sort/swap function?


#include <deque>
//#include <string>
//#include <utility>
//#include <cstdlib>
#include <cstring>
#include
Real time soft shadows without stencil buffers
Game Development

I'm really curious how the following is done



They seem to achieve real time softish shadows on the iphone which does not have a stencil buffer available. It seems to run pretty fluid here http://www.youtube.com/watch?v=u5OM6tPoxLU


Anyone has an idea?


Rendering text with DX11
Game Development

I am trying to figure out how to draw text on screen in SlimDX.


Initial research is not encouraging. The only concrete example I found was this:


http://www.aaronblog.us/?p=36


I am trying to port this to my code, but it's proving extremely difficult, and I'm beginning to wonder after 4 hours if this is the right way to go.


Essentially it seems quite difficult to do something as simple as writing text to the screen. Aaron's method seems the only one out there which is practical at the moment. There are no other points of comparison.


Does anyone else have any advice they could offer?



“Buffers have not been created” … whilst creating buffers
Game Development

I have (what I thought was) a straightforward BufferStrategy for a JFrame. It is created like so:


// Buffer
container.createBufferStrategy(2);
strategy = container.getBufferStrategy();

However, occassionally I receive the following error (which points to the first line of the preceeding snippet as the offending item) :


java.lang.IllegalStateException: Buffers have not been created


This error is peculiar as it comes and goes - sometimes it is triggered, sometimes not. I suspect this means it's a threading issue. Does anyone have any pointers as to what might be go

LibGDX Stencil Buffers while using SpriteBatch
Game Development
This is a continuation of my previous problem and post, seen here. Thanks to the answer I received there I feel I was able to get a little closer to my goal, as well as further my learning of OpenGL, but shortly after figuring out the basics of working with stencil buffers, I've run into a problem.It seems that when I draw a sprite to the stencil buffer, it draws the entire square area, rather than just the pixels that aren't fully transparent as I had ignorantly hoped. I vaguely understand
SharpDX, DX11 and Stencil Buffers
Game Development
I'm attempting to draw a shape/texture to the stencil buffer and then clip subsequent renderings to that stencil buffer. I've gone through the SharpDX forums and the section on depth stencil buffers in "Introduction to 3D Game Programming with DirectX 11", but it's still not quite clicking. Here are the two DepthStencilStates I'm switching between to attempt to accomplish this effect: var defaultDepthStencilStateDescription = DepthStencilStateDescription.Default(); defaultDept

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .