1. RE: Can't Run DX Demo

I have the same problem.

--> d3dxdll = open_dll( "d3dx8d.dll" ),
d3dx8d.dll doesn't exist on my system.
Isn't that a debug version anyways? Have to have the SDK to have the 
developer versions of the dll.

Chris

C. K. Lester wrote:
> I'm trying to run Matt Lewis' DirectX demo and it crashes with this 
> message:
> 
> "DXDEMO.EXE:247 in procedure matrices()
> c_proc/c_func: bad routine number (-1)"
> 
> Can I get this to run on my PC?
> 
> Win2K
> AMD Athlon 1.7GHz
> 512MB RAM
> ATI Radeon 7200 (I think)
> 
>

new topic     » topic index » view message » categorize

2. RE: Can't Run DX Demo

> -----Original Message-----
> From: bensler at mail.com [mailto:bensler at mail.com]
 
> 
> I have the same problem.
> 
> --> d3dxdll = open_dll( "d3dx8d.dll" ),
> d3dx8d.dll doesn't exist on my system.
> Isn't that a debug version anyways? Have to have the SDK to have the 
> developer versions of the dll.

That would explain why no one else has that dll.  I really know next to
nothing about DirectX, and was just following the example that comes with
the SDK.  In fact, the only reason I did anything in DirectX was to prove
that it could be done in pure Eu (with a *little* bit of asm :).

It's easy to correct, however.  Comment out the call to the dll, and poke
the matrix values manually using poke_mat.  Here's what it should look like:

procedure matrices()

    rad += 1 
    
    rotate_mat( matWorld, rad * PI/12,rad*PI/64, rad*PI/30)

-- ************* COMMENT THIS ***************    
--    c_proc( D3DXMatrixLookAtLH, 
--        {matView, vecView[1],vecView[2],vecView[3]} )
    
-- Value that occurs in VC example, which actually comes out right from
-- the DX matrix function.
-- matView
-- 1 0 0 0
-- 0 .857493 -.514496 0
-- 0 .514496 .857493 0
-- 0 0 5.83095 1

-- ********** ADD THIS*****************
    poke_mat( matView, 1,1, 1)
    poke_mat( matView, 2,2, .857493)
    poke_mat( matView, 2,3, -.514496)
    poke_mat( matView, 3,2, .514496)
    poke_mat( matView, 3,3, .857493 )
    poke_mat( matView, 4,3, 5.83095)
    poke_mat( matView, 4,4, 1)

-- **************************************

    --c_proc(D3DXMatrixPerspectiveFovLH, { matProj, PI/4, 1.0, 1.0, 100.0})
    
-- Value that occurs in VC example
-- matProj
-- 2.41421 0 0 0
-- 0 2.41421 0 0 
-- 0 0 1.01010 1
-- 0 0 -1 0
    poke_mat( matProj, 1,1, 2.41421 )
    poke_mat( matProj, 2,2, 2.41421 )
    poke_mat( matProj, 3,3, 1.01010)
    poke_mat( matProj, 3,4, 1.0 )
    poke_mat( matProj, 4,3, -1.0 )
    
    void = call_interface_ptr( device, device_vtbl,
        Direct3DDevice8_SetTransform,{ 256, matWorld})
    void = call_interface_ptr( device, device_vtbl,
        Direct3DDevice8_SetTransform,{ 2, matView})
    void = call_interface_ptr( device, device_vtbl,
        Direct3DDevice8_SetTransform,{ 3, matProj})
    
end procedure

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu