DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio.
0
votes
3answers
304 views
Why am I seeing this assertion error during Collada DOM loading?
D3DXMATRIX ColladaFileLoader::processMatrix(daeElement* node)
{
D3DXMATRIX matWorld;
daeTArray<daeElementRef> nodeChildren = node->getChildren();
for (int i = 0; i < ...
8
votes
1answer
566 views
How can I implement a renderer that can draw many kinds of primitives?
This is somewhat linked to a question I previously asked concerning the drawing of indexed primitives.
My problem was that I was only drawing one cube when I wanted to draw many. I was told that the ...
1
vote
2answers
631 views
How do I use D3DXVec3Normalize()?
It accepts two parameters, the first is an out parameter - a pointer type, so a referenced variable or a pointer to a variable - the second parameter is an in parameter of the same type but const.
...
2
votes
2answers
300 views
How can one access the depth buffer for Unreal Tournament 2004?
I'm looking for a way of getting depth buffer data for a virtual 3D sensor.
Currently the method used is raycasting (implemented in UnrealScript), but I want to use the depth buffer data instead for ...
1
vote
1answer
838 views
How can I draw many objects on screen instead of just one?
Like many beginner graphics programmers I followed a tutorial which showed me how to set up buffer descriptions and fill out the vertex buffer etc... - the steps involved in drawing a simple indexed ...
4
votes
2answers
3k views
Does Unity for PC use Direct3D or OpenGL?
I am a mac developer using Unity and I hardly use a PC. When you build a Unity game for Windows, does it use Direct3D or OpenGL?
P.S. I'm not sure if it's called Direct3D or DirectX
3
votes
2answers
760 views
Where have the cross and dot products gone in DirectX10?
In D3D9 there were functions to deal with D3DXVECTOR3's in order to calculate dot and cross products. However these have disappeared from the math library in D3D10.
I assume they must have gone ...
6
votes
2answers
569 views
How to get the maximum installed version of DirectX?
Okay, So I would like my engine to detect weather or not it can use DirectX 10, if it can't it defaults to DirectX 9.0c but, the function DirectXSetupGetVersion() will only return Versions 5 through ...
4
votes
1answer
1k views
How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?
Currently, I create a vertex buffer in SlimDX like so:
SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription();
Description.BindFlags = ...
0
votes
1answer
314 views
DirectXCollision.h missing
I am using DirectX10, June release and I am trying to
#include <DirectXCollision.h>
so that I can use the bounding objects, however it does not seem to be there. Am I missing something ...
3
votes
2answers
1k views
How does one write to another process's OpenGL/DirectX context?
I want to write a short of chat client that display the messages in-game (OpenGL/DirectX), but I really don't know how to handle this.
It is easy to write my client in my graphic context... but what ...
1
vote
1answer
126 views
How to prevent a certain textured quad from the effect of the pixel Shader at the run time in slimdxdirect3d9 or directx9?
I am having a video and and image slide show being rendered simultaneously. Both video and the image is being rendered by the help of texture and two different quads. Video is being rendered on the ...
0
votes
1answer
774 views
How to resize an image texture according to the size of a sprite in directx9 or slimdxDirect3d9?
I want to know that is there any way of resizing our texture to the size of a sprite in slimdx direct3d9 or directx9. That is if my image size is 1024x768 and sprite size is 500x500, how can i resize ...
3
votes
2answers
1k views
What is the “DirectX for Managed Code Update”?
I came upon this site while looking for information about working with DX in managed code and saw that MS released something containing a 'DirectX for Managed Code Update'.
This sounds promising but ...
-2
votes
2answers
331 views
ID3D10Device pointer problem
sorry in advance for the large chunk of code. Basically when placed in the same file this works fine, but if placed in separate files (and I have tested this) just after Init() is called, the pointer ...
5
votes
2answers
252 views
What use does the unary & operator have in this piece of C++ code?
In an example for a little game framework (that does work), there are the lines:
ID3D10Device* device;
ID3D10Buffer* pBuffer;
followed by the line
device()->CreateBuffer(&bd, NULL, ...
1
vote
0answers
1k views
Directshow VMR9 Allocator presenter present image problem
I am working with DirectShow for video playback and trying to get the video displayed on a D3D9 texture via SlimDX. I am using IVMRSurfaceAllocator9, IVMRImagePresenter9 for getting a surface from the ...
18
votes
3answers
4k views
For voxel rendering, what is more efficient: pre-made VBO or a geometry shader?
Given a fairly static voxel array, what is more efficient: using the CPU to pre-generate a VBO to render the voxel faces (ignoring more advanced forms of rendering like marching cubes for now) or ...
1
vote
1answer
523 views
Zoom to mouse cursor DirectX
I have a DirectX scene. I want zoom in using mouse wheel to the mouse location. I am able to zoom the view to center of screen but I need to zoom to mouse location. Please suggest how it can be done. ...
0
votes
1answer
165 views
How fill gutter using ID3DXTextureGutterHelper interface?
Using UVAtlas (Direct3D 9) Packed charts are separated by a
user-specified gutter width. The gutter width is the amount of
separation between charts, and allows for bilinear interpolation and
...
0
votes
1answer
550 views
How to not-unroll loops in Shader Model 3 HLSL
I'm working on raycaster in HLSL, unfortunately it have to be in DX9. But it cannot be compiled
I did similar raycaster in DX11 and i know that there is always problem with FXC compiler that it tries ...
34
votes
1answer
1k views
How do I create particles that react to the player and enemies?
I'm currently making a game with my own game engine which I've written in C++ and I'm using the most recent directx SDK.
The game is a top down space shooter (with a pretty interesting twist) and ...
2
votes
1answer
453 views
Direct3D11 feature level
If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics ...
2
votes
0answers
461 views
Problem of tearing in Slimdx and DirectShow video
I have written a video player using SlimDX and DirectShow which is displaying the video on a SlimDX texture.
I am extracting the video frames using the ISampleGrabberCB interface from DirectShow and ...
6
votes
3answers
1k views
Direct3D and OpenGL Matrix representation
As I read in OpenGL matrices are column major. It means that if I create a 16 element array first four elements are the first column in matrix. Is it the same for Direct3D or any transformation's ...
2
votes
1answer
307 views
What is an OpenGL equivalent to ID3DXSprite?
As a Direct3D developer I can use the ID3DXSprite class (in D3DX library) for drawing 2D graphics. What's the best way to implement this functionality in OpenGL?
0
votes
1answer
158 views
Under what circumstances will a PIX 'Render' be different to the actual 'render'?
I am trying to implement dual-pass alpha sorting using Ogre material scripts, as part of my debugging attempts I want to compare two PIX captures, but when I attempt to debug a pixel in PIX, ...
3
votes
2answers
2k views
How can I draw multiple lines connected via “nodes” with SlimDX?
I currently read out XML data with the following scheme: Position x,y,z
I try to add one new Vertex for each position node and add it to a Vertex array.
Then I try to render this list of vertices so ...
3
votes
2answers
3k views
Mapping a Vertex Buffer in DirectX11
I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, ...
1
vote
3answers
468 views
What should I use to handle input?
What should I use to handle input? I am wanting to use OpenGL so that my games are cross platform. DirectX provides input libraries, and OpenGL does not. Because my games need to be cross platform, I ...
-2
votes
1answer
224 views
Stop rendering to lessen amount of resources used?
Also posted on StackOverflow, hope this isn't a problem.
Recently I've been writing a bot for a game which uses a DirectX backend for its rendering. I have managed to 'hack' the game into allowing ...
2
votes
2answers
656 views
implementing multi pass rendering in a game engine
I have done multi pass rendering before and understand how it works. I did a simple example which rendered a basic scene with shadows. This was all done in one file. Now I am trying to figure out is ...
5
votes
1answer
877 views
Render to Texture2DArray slices in DirectX11?
I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this.
What I'm looking for is the DirectX equivalent of glFramebufferTextureLayer(), ...
0
votes
0answers
438 views
Loading a sub resource for a texture array
I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources. Any time I try loading the data, I just get junk as output. The code below is only set ...
0
votes
2answers
685 views
Graphics capabilities differences between mobile and desktop/console platforms?
I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a ...
2
votes
1answer
456 views
How can I convert .X files from text to binary form?
Is there a tool for Linux (preferably a command-line tool) that can convert from the .x text format to the binary format? I wish to use this format with Irrlicht but the text format is loading very ...
4
votes
2answers
450 views
Material vs Material Pass
I am trying to figure out the difference between a "Material" and a "Material Pass" (in theory). Is it basically that a Material will have multiple "Material Pass"'es, along with a name. Then the ...
1
vote
0answers
239 views
GetRasterStatus usage in direct3d
I am interested if anyone has had used GetrasterStatus in direct3d application to control application vsync behaviour in high precision timing? What set of techniques are to be implemented to do the ...
3
votes
3answers
2k views
Non blocking Vsync in direct3d
I have direct3d application with a direct3d PRESENTATION_INTERVAL_ONE implementation. Pitty, its blocking and eating my CPU waiting for a Present. I ended up searching for Raster scan solutions, ...
2
votes
1answer
3k views
Loading a Texture2D Array in DirectX11
How does one create a Texture2D Array in DirectX11? The texture I am trying to create is not multisampled, and I want only one mip level. I can't find a working example of a Texture2D Array. I have a ...
4
votes
2answers
796 views
Real time reflections
I just had a quick look at the new Crysis 2 DX11 update, and was quite surprised by some of the new features, especially the real time reflections on moving models. From what I could gather, there are ...
5
votes
3answers
1k views
Draw contour around object in Opengl
I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use ...
1
vote
2answers
177 views
Hidden operations of the Direct3D pipeline
I'm curious- what operations are there in Direct3D that aren't controlled directly through shader, or directly to do with shader manipulation- i.e., that occur behind the scenes.
So far, I've got ...
0
votes
1answer
109 views
Outputting wrong colours from pixel shader in Direct3D
The output from the pixel shader in Direct3D is four floats, normalized 0-1 for each channel (RGBA). But what happens if these floats haven't been normalized correctly and are above 1?
3
votes
2answers
437 views
loading 3d model data into buffers
I am using assimp to load 3d model data. I have noticed that each loaded model is made up of different meshes. I was wondering should each mesh have it's own vertex/index buffer or should there just ...
2
votes
1answer
153 views
DirectX the same across platforms?
Various versions of DirectX are available on both Windows and Xbox. Are the libraries the same on both platforms? Obviosly I'm talking about the interfaces — such as the ones for working with ...
4
votes
3answers
1k views
Loading and using an HLSL shader?
I've been looking everywhere and all I can find are tutorials on writing the shaders. None of them showed me how to incorporate them into my scene.
So essentially:
Given an hlsl shader, if I were to ...
6
votes
3answers
2k views
Tool for editing .X
This is probably the zillionth place where I try to get help in this, so please do bear with me, if I missed something with the local search engine - just need a short answer: a short suggestion.
I am ...
1
vote
2answers
256 views
Different types of memories which a graphics card has
I've been googling this around and yet nothing showed up but some articles from middle ages which were talking about Gforce mx and ... . My question is just this: what are the different memories in a ...
3
votes
2answers
939 views
Proper asset management?
I am unable to wrap my mind around designing a good way to manage resources in my game.
For instance, a vertex buffer in DirectX or OpenGL would lead me to believe I should have one central buffer in ...