direct3d

Moving a 3d camera on XNA

Hello, Im doing some practices on XNA, and i created a class that represents a Camera. My objective is that when the user press some keys make a translation of the camera (not the target) 90 degrees in the X axys (to see an object that i placed in the scene from different angles). By the moment i move the camera in X, Y, and Z without...

Zooming in and out in Direct3D

Hello, I have a 3D scene and I want to be able to zoom in and out. What implementations are good, and which has some flaws? Will I be changing viewport, clipping panes? I totally don't know. Thanks ...

Not able to get stencil to work

Was trying to get Stencil to work in my app. I use Sprites to render content on to the Device. Content could be movies, pictures or text. Can I set the stencil buffer using these Sprites, which can be used in later passes to stencil out other Sprites being rendered? I'm even not able to stencil out any of the Sprites by setting Stencil...

Direct 3D low level API calls

I have an application that makes use of Direct 3D to draw several things onto the screen. I'm looking to inject a DLL and hook a low level direct 3d function so I can record the screen and eventually convert it to a video file. My question really is; what should I be hooking into? I suppose I need to do it where Direct 3D writes to the ...

Need help with Direct 3D's LookAt function ..

I need some conceptual help with Direct3D's .... function. In their official documentation, they say that the computation that takes place can be summarized with this: zaxis = normal(At - Eye) xaxis = normal(cross(Up, zaxis)) yaxis = cross(zaxis, xaxis) xaxis.x yaxis.x zaxis.x 0 xaxis.y yaxis.y ...

Direct3D: Recording to AVI files.

In follow up to my previous question, I am able to save the backbuffer of a Direct3DDevice to a surface. I already found the D3DXSaveSurfaceToFile in the DirectX SDK and it works fine! However, I want to record the obtained surfaces to an AVI file. I also found the AVIFile reference but they are obviously not straight up compatible wi...

Uninterfered Textured Quad

I want to display a textured quad that has its texture uninterfered. As I have it now, my program creates a texture of dimensions 32x32 and loads a texture into it. I created a vertex buffer with a FVF of D3DFVF_XYZRHW and D3DFVF_TEX1, and 4 vertices that make up a 32x32 quad. At first glance when it displays it looks fine, but the probl...

How to enable VSYNC in D3D windowed app?

So, Im using D3D in a windowed application. I inited D3D with the following parameters: windowed: true; backbufferformat: D3DFMT_X8R8G8B8; presentinterval: D3DPRESENT_INTERVAL_ONE; swapeffect: DISCARD Each time OnPaint is called, I render the image to the backbuffer and present it to front. As far as I know (and so does MSDN say), o...

Direct3D GUI engine development

Hi guys, I have developed direct3D video rendering library that is used for rendering video in audio/video network application. It also has simple GUI. I'm using texture with controls (draft) and ID3DXSprite interface. What I wanna do is to extend the GUI part to make it more flexible and convenient. 'Cause when I need to add some fun...

D3D Failed to generate mipmap automatically on some cards!

On most of computers my program performs fine. But on one computer it failed to generate mipmap. I created a texture with D3DUSAGE_AUTOGENERATEMIPMAP, D3DCAPS2_CANAUTOGENMIPMAP says yes and CheckDeviceFormat says D3D_OK(not D3DOK_NOAUTOGEN) too. then I use LoadSurfaceFromMemory to fill the texture. But on that particular computer, ...

Does someone know of some fixed pipeline shader tutorial or samples?

I am making a game with 3d gamestudio a8 free edition. The free edition doesn't support shader, it only supports fixed pipeline shaders. There are some samples in the wiki of 3d gamestudio (click here) but I want to know of there are more samples or tutorials. ...

DirectDraw better than Direct3d for streaming?

Let me specify little background. I currently use an open source program to run my TV Tuner (DScaler). The final version for the software has some support for Direct3D output, the problem with this is that it lags. I have been going through the code and reading through DirectX documentation trying to find a place to optimize the code so...