Search Forums
-
try the setpixel function although thats also most likely not what you want to do.
-
Try reading the section Creating Blending Stages (Direct3D 9) because you are setting your alpha and color stages in a wrong way.
From the docs.
#define SetTextureColorStage( dev, i, arg1, op, arg2 ) \
dev->SetTextureStageState( i, D3DTSS_COLOROP, op); \
dev->SetTextureStageState( i, D3DTSS_COLORARG1, arg1 ); ...
-
Shader make blending operations just easier to write. For example a modulation operation is just written as color1 * color2, additional blending will be color1 + color2, thats why we are asking please use shaders. So the question is do you have to support pre DX9.0 hardware if not you can just aswell do all this using shaders.
For the picking ...
-
The D3DLOCKED_RECT is a structure that contains a pointer to the bitmap data and a pitch value. The pitch value tells you how many bytes there are in one row, the format tells you how long one pixel is so from there on you can calculate how many pixels are in one row and how much is padding. Padding data has no value and you dont have to give it a ...
-
You can create a cube map with IDirect3DDevice9::CreateCubeTexture, then once you created the cube map, you lock the face with the following function IDirect3DCubeTexture9::LockRect and upload the texture into the D3DLOCKED_RECT struct this gives back.
In DX 10 you use ID3D10Device::CreateTexture3D with a misc flag saying its a textureCube.
-
It does this for a good reason reading back from the GPU is slow, the GPU is designed to accept data not to send it back to the CPU. For this reason DX never checks any render state before setting it, it will just set it. Batching is up to the developer although the driver does some optimizations as well.
-
You should batch your rendercalls on the transforms, you shouldn't read back from the device if it's not nessecary. In this case you could more easily achieve this by having a current transform in your render class and check against that instead of reading back from the device.
-
[quote user="LightStriker"]At work, PerForce is what we use.
At home, I'm alone. :)
Heard Alien Brain (?) also work well.
[/quote]
AlienBrain is a bag of ***, i have to work with perforce and AlienBrain and perforce wins everytime. AlienBrain is nice when you are not a programmer but as a programmer you want better ...
-
What you want to do is in world space move the object away from it's origin by the amount it's a way from the camera. Then rotate it arround the Y axis, once that is done you translate the object to the spot you want it to be on.
-
You can't cast a class to a handle. The C in MFC infront of a name is telling you its a class.
I couldn't give you a link before as i forgot which it was but i used this to find that HWND stuff.
http://www.codeguru.com/forum/archive/index.php/t-364852.html