directx

c++ directx muliti textures

How can I set set more than one texture on a cube like the front of the cube has different texture from the back of it.... I tired to use the stages but it didn't work. for example, if i wanna make a dice i would have top would be 1 side be 2.............. D3DXCreateTextureFromFile(d3ddev, //Direct3D Device ...

(Directx)Directx Draw My Image in wrong size!

Hi,i'm new using directx. I was hooking a game and then,i used the directx to draw a own image,using ID3DXSprite.Draw. Its Draw the image,but,its too more big than the original! I'm are handling click in this image using X,Y Size from the image,but its big then its not matche and then its handling the clicks wrong. Anyone know how to pri...

DirectX alpha blending (deferred rendering)

I'm having a major issue which has been bugging me for a while now. My problem is my game uses a deferred rendering engine which makes it very difficult to do alpha blending. The only way I can think of solving this issue is to render the scene (including depth map, normal map and diffuse map) without any objects which have alphas. Th...

WPF and DWM for redirecting output over the network

Im writing a large WPF app (large as in screen res), running with some basic controls, basic video playing, etc... I have been researching how to broadcast/redirect the WPF window to other monitors over a local network. In essence, trying to show a select region of the WPF app on seperate monitors in real time. I have been reading abou...

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...

Vector handling bullets in DirectX

I have a vector to hold objects of a bullet class. Is this the correct way to add bullets to the vector structure? std::vector<Bullet> bullets; Bullet newbullet(thisPlayer.x+PLAYERSPRITEWIDTH,(thisPlayer.y-(PLAYERSPRITEHEIGHT/2))); bullets.push_back(newbullet); I don't think the bullets get added this way. ...

Texture/Geometry Memory Availability

Suppose a discrete video card has N megabytes of gpu ram. Typically how much of that is usable as texture/geometry memory? ...

Rendering depth in HLSL

Hi folks this should be an easy task but for some reason I do not get it worked out... I just want to get a visualization of the depth in my scene using a shader: float4x4 matViewProjection; float4x4 matWorld; float4 eyePos; struct VS_OUTPUT { float4 position : POSITION0; float depth : TEXCOORD0; }; VS_OUTPUT vs_main( VS_INPUT i...

unexpected change of wchar variable

Okey this is driving me crazy now... I'm working on a directX game in c++ and I got a global wchar variable called FpsString witch i declared like this: WCHAR * FpsString; And in my initialization code i initialized it like this: WCHAR a[100]; FpsString = a; Okay, here is the prob... FpsString suddenly changes to some Japanes...

directx 9 stop/play animated mesh c++

ok im not expecting to get answer fast. does directx 9 have function that will stop or pause animated mesh. i need an example how the function works or it is useless. thanks in advancee ...

DirectX Primitives equivalent in WPF ?

There are Primitives types enum in DirectX that contains Point, Line, LineList, LineStrip, Triangle, TriangleFan, TriangleStrip... I can find only Triangle in WPF 3D. Then how to draw point, line , or wired object. If I do not supply material then I cannot see anything Thanks ...

Why is my char[] storing garbage?

I'm trying to render text to the screen but keep getting garbage symbols and i can't figure out what is so different in my approach. This code will work in my main program: char vectorText[80]; sprintf(vectorText, "vector%i = [%f, %f, %f]", 1, vector[0]->x, vector[0]->y, vector[0]->z); char* newText = vectorText; Text* finalText = NUL...

GetKeyState doesn't work in Windows 2000 (C++)

Hello. I have just tested my DirectX game on a Windows 2000 SP4 system but it won't receive any mouse clicks! This is how I check for mouse clicks : unsigned int mButtons = 0; if (GetKeyState(VK_LBUTTON) < 0) mButtons |= HIDBoss::MOUSE_LEFT; if (GetKeyState(VK_RBUTTON) < 0) mButtons |= HIDBoss::MOUSE_RIGHT; if (GetKeySt...

How to render DirectX mesh file *.x in WPF application?

Hi! I have mesh file in DirectX format. For example 'dog.x'. I want to render it in WPF application. Could You please help me to load it in the application. I must convert in in XML format or smth else? How to use this file with MeshGeometry3D class? -- Best regards, Ivan. ...

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. ...

Cg: Proper way to write/read from a floating point texture

I currently have a R8G8B8 floating point render target and want to use it as a R24 target. The code //cg out = float4(v, v, v, v); seems to clamp out between 0 and 1. What's the proper way to write/read to a floating point texture in Cg? ...

about asynchronous draw method

Please teach the method to draw in 2D image by the asynchronous (each method of Windows API and DirectX). ...

What do I have to learn to create Mafia 3 ?

I am a newbie C++ developer for Ubuntu and Windows. I want to know, what other things ( what 3d engine for example ) I have to learn to create a game like Mafia 2 or GTA IV. ...

can't find references Microsoft.DirectX.AudioVideoPlayback and Microsoft.DirectX

Hello ! I've installed .net 4.0 as well as XNA 4.0 . A while ago i used Microsoft.DirectX to play some music and now when i try to redo the work, i can't find the reference . Did the new changes on the platform modify or moved something in the references ? Regards, Alexandru Badescu ...

Strange problem with ID3DXSprite Draw method

Hello guys, I use ID3DXSprite interface to draw gui controls in my app. I have a 512x512 texture with all controls and use sprite->Draw() telling the exact RECT of control. Everything works fine except a strange bug on only one(!) machine. Normally, the control looks: And on that strange machine: Moreover, some controls look fine ...