0
votes
1answer
58 views

Simple shader for sprite interface [closed]

I have been looking for any examples for a long time, I cant get anything to work (from the examples). I have tried using vertex/pixel shaders, effects files, but they never have any effect on the ...
3
votes
1answer
129 views

How do I render from one render target to another?

I have two render targets: a fake backbuffer; a special render target where I do all my rendering. a light render target; where I render my light fx. I'm sure I'm rendering correctly on both. The ...
0
votes
0answers
40 views

DX9 system crash on Intel Atom CPU Z530 with Intel GMA 500

our project has to run on a very specific hardware, which is listed below: WinXP Professional 32bit Intel Atom CPU Z530 with Intel GMA 500 (2 CPUs, 1.6Ghz, 512 MB RAM) DX 9.0c 800 MB swap memory ...
1
vote
0answers
70 views

AddFontMemResourceEx and D3DXCreateFont corruption

I'm trying to load a font from a buffer using AddFontMemResourceEx and then creating a D3D font with D3DXCreateFont. This works fine on every platform except Windows XP, where it causes the wrong ...
0
votes
2answers
112 views

Directx9, FBX sdk and indices problem

So I've set up my program, know how to get everything going except for one thing: indices. I've been stumped as to how I retrieve that set of data. Does anyone know what I function I need to get them? ...
1
vote
1answer
54 views

Do I need to call Release() on D3D objects when I use them in another function?

For example, I have an IDirect3DSurface9 * Surface and IDirect3DSurface9 *BackBuffer. If I were to use them directly in the render_frame function, I would need to release them on the closeD3D ...
2
votes
0answers
73 views

How can I load an image into the back buffer? [closed]

How can I load and display an Image?... I have tried something but it didnt.. worked.. this is what I've tried.. File : StrikeOps_main.cpp .. void : render_frame : Intro::DisplayIntro(d3ddev, ...
4
votes
1answer
233 views

Radiosity: Integrating Hemicubes

I'm working on a radiosity processor in DirectX 9. I have efficiently rendered hemicubes from the perspective of texels within a lightmap. Now, as I try to integrate the hemicubes (to sum the incident ...
0
votes
1answer
224 views

Converting Projected Vertex Positions to Normalized Device Coordinates

I'm using directx 9 and vertex shaders to rasterize triangles...I have vertex shader input structs like this: struct VS_INPUT_Quad { float4 Position : POSITION; float2 UV : TEXCOORD0; }; and ...
0
votes
0answers
132 views

DirectX 9 Blank Screen after Window Loses Focus

I have an application that uses DirectX9. I have 2 viewports( device swapchains ) to which I render geometry. If, during runtime, I click on a different application's window and then later try to ...
0
votes
1answer
76 views

Why would I lose the D3D device during an HLSL unroll?

I have a pixel shader that downsamples a texture from one size to another. The downsample shader uses a nested 'for' loop to traverse the uv coordinates. When the for loop executes more than four ...
2
votes
1answer
192 views

How does the Direct3D 9 rasterizer determine triangle coverage?

I'm working on a software rasterizer to use in my project. I have implemented one that works well, however, often my rasterizer under or over estimates triangle coverage. I need perfect emulation of ...
0
votes
0answers
153 views

Radiosity using a hemisphere

I'm working on a radiosity processor. I'm projecting scene geometry onto a hemisphere at a high order of tessellation during a visibility pass onto a 1024x1024 render target. The problem is that the ...
0
votes
1answer
38 views

What does this FVF value in the FVFData block of an .X file equate to?

I'm trying to read and ultimately write a mesh from/to file. This mesh has 2 sets of texture coordinates. The second set I know are held within the FVFData{} block of the .x file. The second set of ...
1
vote
2answers
282 views

UV Atlas Generation and Seam Removal

I'm generating light maps for scene mesh objects using DirectX's UV Atlas Tool( D3DXUVAtlasCreate() ). I've succeeded in generating an atlas, however, when I try to render the mesh object using the ...
1
vote
1answer
359 views

Light Map Generation using DirectX

I'm trying to build lightmaps for an engine I'm working on. I'm using DirectX 9 w/c++ but my questions are related to the methodology behing the generation of light maps. I have a scene built from ...
1
vote
2answers
513 views

how to set image resource path for D3DXCreateTextureFromFileEx method?

I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it ...
0
votes
2answers
1k views

FPS limit function

I try to cap the animation at 30 fps. So I design the functions below to achieve the goal. Unfortunately, the animation doesn't behave as fast as no condition checking for setFPSLimit() function when ...
1
vote
0answers
241 views

2D Camera transformation sidescroller

i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
-3
votes
1answer
117 views

Undefined fireball movement behavior

Demonstration video I try to do after the player shoot 10 times of fireball, then delete all the fireball objects and recreate a 10 new set of fireball objects. I did it but there is a weird bug ...
1
vote
1answer
980 views

How to set orthgraphic matrix for a 2d camera with zooming?

I'm using ID3DXSprite to draw my sprites and haven't set any kind of camera projection matrix. How to setup an orthographic projection matrix for camera in DirectX which it would be able to support ...
1
vote
1answer
389 views

Flip the whole Directx output horizontally (mirror the output)

I would like to flip the whole fullscreen directX output horizontally so that the final output is presented mirror inverted. Is there a way to create a IDirect3DDevice9 instance which produces ...
3
votes
2answers
433 views

Clipping a windows draw area - Direct x 9 and c++ - 2D using D3D

DirectX 9, C++... Let me set the scene: I have a 16:9 image. I have a 16:10 screen. I want the 16:9 image to be drawn so that it is vertically centred within my 16:10 screen. My 16:9 image is 1920 x ...
-1
votes
1answer
397 views

Changing map 0,0 origin to top left while using D3DXMatrixOrthoLH

Thanks to Tetrad (for pointing out D3DXMatrixOrthoLH ) I have figured out how to set it up in DirectX9. However, the problem I am now facing is my 0,0 mouse position is now in the middle. What I ...
1
vote
1answer
87 views

Select display adapter in D3D9

I have a notebook that has 2 graphics card one Intel and one nvidia graphics cards. When I want to start my game I right click on the exe file and select run with graphics processor->Nvidia but my ...
0
votes
1answer
165 views

How do I make multiple instances of an object?

In a game I am working on, I am having an issue with making the player's ship shoot multiple bullets. The bullets have individual X and Y coordinates and velocity for X and Y. When I press "SPACE" to ...
0
votes
2answers
372 views

Problem reseting device when using render target

How can I reset the device when I am rendering to a surface, and then stretching that surface to the back buffer. If i don't change the render target everything goes well, but when i change the render ...
1
vote
0answers
328 views

tex2dlod and tex2d giving different values [closed]

I've been having trouble with vertex texture fetch for a terrain system I am implementing. I'm using C++/DirectX9. I have already implemented exactly what I want as a prototype in C#/XNA and now ...
0
votes
1answer
287 views

Making a DX9 game resolution independent

How can I change the resolution and stretch my entire game to the new resolution? I want my game to have a base resolution, and when I change it to stretch to that new resolution. I saw a few similar ...
1
vote
1answer
676 views

How can I render multiple windows with DirectX 9 in C++?

I'm trying to render multiple windows, using DirectX 9 and swap chains, but even though I create 2 windows, I only see the first one that I've created. My RendererDX9 header is this: #include ...
1
vote
1answer
420 views

2D Matrix Transformation (with a Player and Ground)

I have a simple game that I'm trying to do for learning purposes, but Matrices are a bit hard, especially in DirectX. I currently have a tilesystem that renders tiles at the screen and a character ...
3
votes
3answers
1k views

DirectX 9 - model rendering from .obj files issues

Well I can clearly tell that what rendered is close to what I wanted, but there seems to be a few problems. The .obj files contained values like "f", "v", "vt". Image Of Problem: ...
1
vote
1answer
164 views

Direct3d - Code structure

I'm learning directx in a master's degree and they taught us to have a GraphicsLayer class which is the one connecting with the direct3d library. That way this class is completly independent from the ...
1
vote
0answers
266 views

DX9 Deferred Rendering, GBuffer displays as clear color only

I'm trying to implement Catalin Zima's Deferred Renderer in a very lightweight c++ DirectX 9 app (only renders a skydome and a model), at this moment I'm trying to render the gbuffer, but I'm having a ...
3
votes
3answers
663 views

CreateRenderTarget returns 0x80070057 in big surface resolution

I have created the SLI merged desktop of three 1920x1680 monitors, so the desktop resolution is 5760x1080. There is a 0x80070057 error, while calling CreateRenderTarget to create the RT_Surface: ...
1
vote
2answers
317 views

Reducing the level of detail of a mesh

I am importing an extremely detailed mesh (provided by a client) and it consists of something like 16 million triangles. For rendering performance I've been using the ID3DXMesh interface's Optimize ...
0
votes
1answer
343 views

How do I make camera move at same speed when rotating and moving forward

I made a camera in DX9. To move forward I press the Up arrow. To rotate on the Y axis I use the mouse. When I perform these movements on their own the camera moves at the speed I want. However, if I ...
2
votes
1answer
522 views

How can I get the front buffer into a texture on the GPU? [closed]

I'm attempting to write a small screen capture utility that writes captured video to disk. First, I get the front buffer surface. I've written a shader that takes this surface and through render to ...
1
vote
3answers
353 views

How to remotely debug a D3D9 application

I've got a D3D9 application, which works fine on my machine. But when I send it to a friend, his machine won't render any of the 3D content. I already changed the build to enable all error-code ...
0
votes
1answer
112 views

Calculating other objects based on the transform of another

What I want to do is create my graphics to be independent of the game framework. So basically the graphics won't know anything until it is told where things are. so the thought was that every ...
1
vote
1answer
194 views

How can I set the world matrix from an array of floats in D3D9?

I have objects that hold their own transform matrix (calculated every frame by the physics system) held in a linear array of floats as follows: [m0, m1, m2, m3] [m4, m5, m6, m7] [m8, m9, m10, ...
1
vote
1answer
181 views

Present fails randomly on mixed C++ Direct3D9 app

I have a mixed .NET application (managed and unmanaged code bridged by C++/CLI wrappers) which uses unmanaged Direct3D9 9.0c to do rendering inside a control which is wrapped inside a C++/CLI class ...
1
vote
1answer
172 views

Why would anti-aliasing work for the debug runtime but not the retail runtime?

I'm experimenting with setting various graphical settings in my Direct3D9 application, and I'm currently facing a curious problem with anti-aliasing. When running under the debug runtime, AA works as ...
1
vote
1answer
684 views

Drawing lines in 3D space

When attempting to draw a line in 3D space with D3DPT_LINELIST, then Direct3D gives me an error about an invalid vertex declaration, saying that it cannot be converted to an FVF. I am using the same ...
2
votes
2answers
223 views

Why does my win32 call, contained in a Class method, fail?

Using a Direct3D Tutorial, I took the knowledge and encapsulated it into a class. The code builds in MSVC 2010 fine, and I've handled all compiler warnings pertaining to my project with the highest ...
2
votes
2answers
783 views

About Alpha blending sprites in Direct3D9

I have a Direct3D9 application that is rendering ID3DXSprites. The problem I am experiencing is best described in this situation: I have a texture that is totally opaque. On top of it I draw a ...
-3
votes
2answers
326 views

What are some good combinations of libraries? [closed]

Lately I have been working on a game that i plan to make online. I have used different libraries to make this game as far as i could, but I feel that I should rethink on how Im sertting this game up, ...
1
vote
1answer
673 views

terrain grid rendering problem

I'm using DirectX 9 and attempting to write a simple terrain generation object. I'm running into trouble with the rendering - I'm hoping that this is a common problem, and someone could spot the ...
4
votes
4answers
2k views

How to implement transition between screens

Last night I showed my game to my friends and they said it was a bit jumpy. The example he gave was in the pokemon games when a battle starts music plays, the screen flashes then pixels out then the ...
1
vote
2answers
792 views

Creating a full-screen window in Windows API

I've got a Windows API Window. I've managed to make it windowed, and "fullscreen windowed". But I can't seem to make the window just full-screen- for example, even if I specify WS_POPUP, I can still ...