Thursday, August 6, 2015

c# - Transparency in XNA-4 primitives


I'm using XNA 4 with Visual Studio 2010. I'm trying to create a simple 3D world with walls and doors in which the user to free to roam around.


A wall is just a rectangle which is currently being rendered with four vertices using triangle strips. But to create a door, I'd have to split it into three rectangles as shown in the figure.


enter image description here


Four quadrilaterals if I want to have the following door-style


enter image description here


It will become more complex to have multiple doors on the same wall or if I have windows.


Is there any shorter way to handle this? I am looking for something that will just make the wall transparent wherever I want.


I found a solution but facing a problem here





No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...