New answers tagged sharpdx
This typically happens when calling a D3D function with an invalid parameter (e.g. a NULL pointer where not permitted). This is exactly what the SwapChain's constructor documentation says: InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value. You need to check one by one the parameters you ...
BMFont is widely used in games industry. It outputs an ASCII or binary file describing the characters' position that you can use to calculate texture coordinates when drawing your text quads.
Assuming Z is the vertical axis, the orientation in the XY plane can be computed using atan2: float dx = target.x - position.x; float dy = target.y - position.y; yaw = atan2(dy, dx); And same for the elevation angle: float dz = target.z - position.z; pitch = atan2(dz, sqrt(dx * dx + dy * dy));
You could use a lookup texture for the alphabet. Then draw a quad for every letter and select the right letter by texture coordinates. You don't use transformation matrixes on this of course. This is a simple way to get started. Advanced font rendering is a complex topic and you might want to use a library like FreeType for that. However, the basic ...
In D3D11, there is no such thing as a global variable that's not in a constant buffer. Even if you declare variables outside of a constant buffer, the HLSL compiler will put them in a default constant buffer for you. In C++, I usually just create a struct that matches the layout of a constant buffer in the shader. That might be harder to get working in C# ...
It seems I used deviceContext in wrong way. It should have been either initialized like this: var deviceContext = (SharpDX.Direct3D11.DeviceContext)GraphicsDevice; Here is the explanation what I did wrong here: var deviceContext = new SharpDX.Direct3D11.DeviceContext(GraphicsDevice); When creating a new DeviceContext, it is actually creating a deferred ...
Top 50 recent answers are included