directx-9

Triangle rendering problem in directX

I am working with directX 9. I have a problem while rendering triangles using drawprimitive. The problem is - When I am rendering the whole object made of several triangles, the triangle having all points on a single line shows gap in a whole closed object. I am showing the image below. The white dashed line is the problem. ...

What approaches are available to revert an IDirect3DDevice9 instance to its default render state?

Given an instance of IDirect3DDevice9, what approaches are available to put it in its original render state (i.e. the state it was in when the device was initially created)? The cleanest way that I've come across is to create a state block via IDirect3DDevice9::CreateStateBlock just after the device has been created so that it can be ap...

Is there any way to access the compiled shader code from a D3DXEffectCompiler

I'm currently writing a tool for pre-compiling our D3D9 shader code (will be using the ID3DXEffect in-game). I'm doing this through the ID3DXEffectCompiler interface and calling CompileEffect and I can do all of this without creating a IDirect3DDevice9 object (or even linking against d3d9.lib). The only problem is that I would like to a...

How do I make d3d use my vertex alpha values?

I'm trying to render a textured quad in d3d, and its not using the alpha values of the VERTICES of the quad the texture is being rendered to. Rather it is using the alpha of the TEXTURE. I want d3d to use the alpha of the VERTICES of the polygon it is placed upon. I have an idea it has to do with SetTextureStageState, but I can't quit...

directx rotation c++

Okay this is a hard question. I'm creating a cube and a pyramid in one vertex array. My problem is to rotate only pyramid vertex not the cube vertex but I don't know any function that can rotate some vertex. If I try to rotate the vertex I'll get pyramid and cube rotated. ...

directx tutorials c++

im searching for full directx tutorials i found directxtutorial.com but it only gave me the basic. couldn't find others that were full tutorials. have you find any or know any? ...

DirectX 9 "Loading textures" progress bar

It doesn't need to look like a progress bar. All I need it to say is "Loading images..." while the texture is loading, then saying "Done" when it's done loading. I have no idea, how to do it? ...

directx apply texture

i found some examples how to apply texture on 2d object but nothing on 3d. if you know any tutorial or you can give me an example that would be greate. ...

directx 9 advance tutorials c++

i don't need tutorials talking about fvf or how to draw a triangle.... i need some advance stuff like meshes shadering........ that are free. ...

applying texture have HUGE problem. directx 9 c++

i don't get any errors when i compiile my game the only problem is that it won't apply the texture it will apply a color, i know it is werid. like if texture has two colors white and red than white will be applied. here is my code // Monopoly.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "Monopoly.h...

applying texture another problem directx c++

ok i got everything working. the texture only applys for two sides only of the cube the other sides won't display the correct texture. here is my code // Monopoly.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "Monopoly.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; ...

why does directx 9 lack of resources? c++

directx 9 is most library i have found that doesn't have any free tutorials or resources. why is that? ...

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

c++ directx 9 mesh texture

ok so i can load a mesh perfectly but loading its texture is not working. im not sure what im doing wrong. here is my code.. //render a single frame void RenderFrame(void) { d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); d3ddev->Clear(0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); d3...