Pure Devices and getting matrices
Why can we not use getxyz with a pure device? To me it makes it seem that using a pure device is stupid, because it stops people making a scene graph... To do a scene graph you'd need to do SceneGraph.WorldMatrix.Push(Device.Transforms.World) - or handle matrices yourself but that seems kind of dumb.
Any advice? Im tempted to just not use a pure device, but I assume I would be sacrificing a LOT then.
Thanks,
- aCiD2
The whole point of a Pure device is so you CAN'T use the Get*( ) calls [smile].
The reasoning behind this is that it minimizes the work that the Direct3D layer has to do - and effectively puts the bias more towards the driver, the net result (in theory) is that it can operate more freely and attempt to get a bit more performance.
Nothing dumb about it really... It does rely on you doing a bit more work, but then again - you know what your application-space is, and have knowledge of how to implement it efficiently.
Also, you managing a few matrix variables means that your application is only keeping track of the information that is important to you - none of the other Get*( ) calls for example.
I don't think you'll be losing a huge amount by dropping back to a standard hardware device. But, what you're saying here sounds more like picking the easy option (fair enough really) - putting a bit of work in and you can still use a PD.
hth
Jack
The reasoning behind this is that it minimizes the work that the Direct3D layer has to do - and effectively puts the bias more towards the driver, the net result (in theory) is that it can operate more freely and attempt to get a bit more performance.
Quote:To do a scene graph you'd need to do SceneGraph.WorldMatrix.Push(Device.Transforms.World) - or handle matrices yourself but that seems kind of dumb.
Nothing dumb about it really... It does rely on you doing a bit more work, but then again - you know what your application-space is, and have knowledge of how to implement it efficiently.
Also, you managing a few matrix variables means that your application is only keeping track of the information that is important to you - none of the other Get*( ) calls for example.
Quote:Im tempted to just not use a pure device, but I assume I would be sacrificing a LOT then.
I don't think you'll be losing a huge amount by dropping back to a standard hardware device. But, what you're saying here sounds more like picking the easy option (fair enough really) - putting a bit of work in and you can still use a PD.
hth
Jack
Nah, dropping the pure device would be the easy option, and I don't like the easy options ;) Plus, I've got performence available to me - why drop it? I hadn't seen that matrix stack that IFooBar mentioned but I will look into it.
Thanks for your replies lads, that's cleared a lot up for me :)
Thanks for your replies lads, that's cleared a lot up for me :)
I've set the graph up to use the MatrixStack, but if I do the following i don't get a sphere rendered at 0, 5, 5 - am I doing something wrong?
The above results in a sphere or whatever rendering at 0, 5, 0 - not 0, 5, 5 as expected. Even doing the code underneith doesn't work :(
I thought that the MatrixStack handled this for the user? Any ideas?
[Edited by - acid2 on March 2, 2005 2:23:55 PM]
// I actually use MultiplyMatrix with a matrix, but I just put it like this to make it simplemyMatrixStack.Push();myMatrixStack.MultiplyMatrix(Matrix.Translate(0, 0, 5));myMatrixStack.Push();myMatrixStack.MultiplyMatrix(Matrix.Translate(0, 5, 0));Device.Transform.World = myMatrixStack.Top;myMatrixStack.Pop();myMatrixStack.Pop();
The above results in a sphere or whatever rendering at 0, 5, 0 - not 0, 5, 5 as expected. Even doing the code underneith doesn't work :(
myMatrixStack.MultiplyMatrix(myMatrixStack.Top * Matrix.Translate(0, 0, 5));
I thought that the MatrixStack handled this for the user? Any ideas?
[Edited by - acid2 on March 2, 2005 2:23:55 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement