Skip to main content
GameDev.net gamedev.net
🔒 Locked

problem with IDIRECT3DDEVICE8::GetTransform()

Started by dommer2029 Aug 7, 2002 at 10:58 PM 5 replies 700+ views
Original Post
dommer2029
dommer2029
I have a sample application (from "Multiplayer Game Programming") that uses DirectX 8 as the basis of the 3D rendering engine. During initialization, it sets the VIEW and PROJECTION matrices using the SetTransform function. This particular demo never calls the GetTransform function. Then I took the Pick demo application that came with the DirectX 8.1 SDK, and tried to integrate the Pick function into the existing application. Pick uses GetTransform as part of the process of generating a ray that corresponds to the location the user clicked on. But when I call GetTransform, the HRESULT returned is D3DERR_INVALIDCALL, which is supposed to mean that one of the parameters is incorrect. After some work, I found that even if I call GetTransform immediately after calling SetTransform, with the exact same arguments, the error code is still returned. (The SetTransform call is successful.) But the Pick Demo doesn''t have this problem. Does anyone know if there could be a problem with my Device that would cause this problem? Or if there''s some other initialization step that has to be done before any of the Transform matrices can be read back? (Maybe the D3DTS_WORLD matrix needs to be set?) Dunno. Thanks, --Domenic
Domenic, Underdoghttp://www.unitedunderdogs.com
niyaw
niyaw
D3DERR_INVALIDCALL can mean any number of things beside passing wrong parameters: wrong time to call a method, such as rendering method outside beginscene/endscene, or that hardware doesn''t support the feature you''re using. the debug runtime will give you something more sensible.
dommer2029
dommer2029
Okay, so I turned up the DirectX SDK debug info and checked the Debug window, and it says:

Direct3D8: (INFO) :======================= Hal HWVP Pure device selected

So I''m using a Pure device, and I''ll just use my local copies of the transformation matrix rather than reading them back from Direct3D. I see that Pure devices support minimal read-back functionality ... does this mean that they are Pure Hardware, and so MS can provide fewer helper functions, but they run faster? If that''s the case, seems like I should prefer Pure devices when available and code for them.

It also says:

Loaded ''C:\WINNT\system32\d3d8d.dll'', no matching symbolic information found.

But ... it''s giving me debug information, right? So what does that mean?

You guys rock,

--Domenic
Domenic, Underdoghttp://www.unitedunderdogs.com
Evil Bill
Evil Bill
It means that d3d8d.dll doesn''t contain line numbers etc. to allow you do debug the code inside it. If you try to trace into a function in d3d8d.dll, it''ll just show you the assembly output. If there was symbolic information in it, it''d open up the source file (which isn''t part of the sdk, it only exists on the machines where DX8 was developed) and show you the source.

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)
DrunkenHyena
DrunkenHyena

A PURE device does less validation for what you''re doing and caches less states. When you create a PURE device, you''re essentially asking D3D to let you get closer to the hardware, which can give a small boost in performance.

Of course that assumes you''re doing things "right". if you do a lot of redundant calls (as an example), the driver won''t filter them and your performance could drop.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena</FON

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.