directx

How to programatically disable the auto-focus of a webcam.

I am trying to do computer vision using a webcam (the model is Hercules Dualpix). I know it is not the ideal camera to use, but I have no choice here. The probleme is the auto-focus makes it hard/impossible to calibrate the camera. Anyone knows a way to disable the auto-focus feature. Or, if someone has an idea to deal with it and calibr...

DirectX 9 Terrain Engine Problem C++

Hello, I'm Having a problem with my DirectX 9 Terrain Engine.. It's working fine, except for one thing, it doesn't load the heightmap in a proper way. You can see a screenshot of the problem here: as you can see there is a diagonal crack through the entire map.. one side should be mirrored to render the map properly. I'm almost sure t...

Prerequisite for learning directx

Hi All, I am from .net C# background and I want to learn DirectX. I have knowledge of C++ but I am fairly new to graphic world. I am little confused about how to start learning directx, should I start learning direct directly or buy a basic graphic book like hern and baker and then jump to directx. Which is the recommended book for l...

Shader files for hue\saturation\brightness

I am new to write a shader files(.fx), how can i write shader file to set hue\brigtness\contrast. ...

Hooking into DirectX application

Hey there :) I'm currently trying to display some information (as an overlay) to the user inside a DirectX-based game, much like the frame count which Fraps displayed, but I have no clue where to start. I don't expect a full solution to my problem, just a few hints where I can start and where to get more information about the topic ;) T...

Making a program timer-based rather than frame-rate dependent?

I have a game engine to work on as part of a class. Currently, its rendering is frame-rate dependent and one requirement is to move to a timer-based dependency. I am not sure how to determine where it is relying on frame-rates. I'm not sure what to look for. I realize I'm going to need to somehow incorporate a timer (GetTickCount?) to...

Managed DirectX running from .Net Framework 4.0 app dont hunt

I work on a product that uses Managed DirectX for data visualizations. I was trying to upgrade this product to .net framework 4.0, but I think I'm having issues with Managed DirectX and .Net 4.0 playing together. The main assembly does not reference managed directX. But when it tries to call into an assembly that does reference mana...

Can I get DirectX(any version) to callback when logging an error?

I have output like this after choosing debug version in the directx cpl: Direct3D9: (WARN) :Ignoring redundant SetTextureStageState. Stage: 0, State: 3 Direct3D9: (ERROR) :Memory Address: 008307ec lAllocID=1 dwSize=00004bc4, ReturnAddr=7248d5ea (pid=000017d4) Is it possible to define a callback which is triggered when these notificati...

Game programming book using OpenGL and DirectX

What is in your opinion the best game programming book using OpenGL and DirectX? ...

Is it possible to use a pixel shader inside a sprite?

Dear all, Is it possible to use a pixel shader inside a sprite? I have create a simple pixel shader, that just writes red color, for testing. I have surrounded my Sprite.DrawImage(tex,...) call by the effect.Begin(...), BeginPass(0), and EndPass(), End(), but my shader seems not to be used : My texture is drawn just normally. ...

Tracing unmanaged DirectX objects allocated through Managed DirectX

I have a problem where Device.Dispose() is taking a long time to execute when the application is closed. I am investigating whether this is due to unmanaged objects not being freed properly thus resulting in a long cleanup time. Is there an easy way of tracing or viewing the unmanaged DirectX objects that have been allocated? ...

D3D Performance comparison, shaders vs built in shading

Hi there. I have a running 3D engine built in D3D (via SlimDX). To avoid interupting the rendering pipeline I have batched together many objects with the same material into bigger meshes (to reduce state switching). This have worked well and gives a good performance level for my need. The issue I am running into is that I, during runti...

Good DirectX tutorials online?

I'm trying to make a bowling game simulation for college. Any ideas where to find a decent tutorial in DirectX9, using ode-0.9 and c++? ...

How do I go about implementing sprite masking?

Using DirectX I'm rendering textured polygons (orthographically) so they act as HUD sprites. Now I'm not sure how would I go about implementing sprite masking in this sytem? So basically say I have a sprite, how can I make it render only in a given portion of the screen which I define? And if a part of it moves outside this portion of t...

How can i find which DIrectX version install on my system through code

How can i find the current install version of directx on my system using code(C#). ...

Strange error with hardware picking in directx

Hi all, i am trying to get pickigng working in directx 9 and i am having some trouble. it works fine when i am rendering my mesh in software however i do get errors when rendering with a shader. i can be off of a mesh but it still detects it as a hit (see image for more detail) i am stopping animation controllers and updating frame mat...

Desktop Window Manager capture the whole screen

Hello all, I was wondering if anyone could give me a starting point of how to capture the entire screen in Windows Vista/7? I know how to do it in previous versions of Windows, but would really like to keep everything in the D3D stack, without resorting to GDI/BltBit calls. I realize that you can get a live thumbnail of a given window...

DirectX managed or unmanaged?

I need basic information about DirectX. Is it a managed API or Unmanaged? Can someone provide me some link etc. explaining this? ...

Runtime error: Access violation when using .push_back() with a std::vector?

I have a vector, defined by std::vector<LPDIRECT3DTEXTURE9> textures; Later, I am passing a LPDIRECT3DTEXTURE9 object to it, like so textures.push_back(texture); Here is a sample of this: void SpriteManager::AddSprite(float x, float y, float z, LPDIRECT3DTEXTURE9 texture) { //snip textures.push_back(texture); //snip } Th...

How to store a vector of LPD3DXSPRITE objects?

Let's say I want to store a vector of LPD3DXSPRITE objects. The line to declare this code would be std::vector<LPD3DXSPRITE> sprites; I should be able to create my sprite with: LPD3DXSPRITE sprite = NULL; D3DXCreateSprite(myRenderingDevice, &sprite); Finally, I should be able to add this to the vector like so: sprites.push_back(spr...