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

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
Programming Languages

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?

Mobile Programming

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?


Programming Languages

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

Programming Languages
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
Programming Languages
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
Game Development

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow