Jump to content
  • Advertisement

SpiralGuru3d

Member
  • Content Count

    73
  • Joined

  • Last visited

Community Reputation

122 Neutral

About SpiralGuru3d

  • Rank
    Member
  1. Hi all, I am working on a small project in DX9, and it's been a while! :) It runs fine on my FX5500, but is broken on a GeForce2 card I have. float magics[4] = {1.f,1.f,0.f,0.5f}; iD3DDev9->SetVertexShaderConstantF(8, (float*)&magics, 1); produces the error in stdout: Direct3D9: (ERROR) :Invalid start register index or number of constants in SetVertexShaderConstantF Changing the register/num constants has no effect. The app only uses some simple v1_1 shaders. All the SDK samples I would expect to work on a GeForce2, do infact work, so what might be causing this call to fail on this older card? Thanks -scott
  2. SpiralGuru3d

    d3d leaks

    thanks. I just checked, I do release them in the right order. Do I need to release them with the while loop, until the ref count is zero? I only create the device once in the execution path I'm testing, why does it return so many references when I release it?
  3. SpiralGuru3d

    d3d leaks

    All the leaks lead to: iD3D9 = Direct3DCreate9( D3D_SDK_VERSION ); or iD3D9->CreateDevice(..,..,..,..,..,&iD3DDev9 ); --- I release them: iD3D9->Release() and iD3DDev9->Release() --- The device in particular returns a high number of existing references. If I do while( 0L != iD3DDev9->Release() ); I get crashes later when releaseing other resources. ??
  4. SpiralGuru3d

    d3d leaks

    Hi all, I have a d3d application here that is leaking a small amount of memory when it exits. Direct3D9: (INFO) :MemFini! Direct3D9: (ERROR) :Memory still allocated! Alloc count = 126 Direct3D9: (ERROR) :Current Process (pid) = 000004a4 Direct3D9: (ERROR) :Memory Address: 0091690c lAllocID=1 dwSize=000047f8, ReturnAddr=01eb14db (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 0218987c lAllocID=9 dwSize=00009414, ReturnAddr=01ea8044 (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 0091bad4 lAllocID=10 dwSize=00000008, ReturnAddr=01ea8132 (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 02192cc4 lAllocID=11 dwSize=00000e40, ReturnAddr=01ea970f (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 0091b144 lAllocID=22 dwSize=000006bc, ReturnAddr=01ec2f4b (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 02193b3c lAllocID=24 dwSize=00009b40, ReturnAddr=01eb4a19 (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 0091b83c lAllocID=26 dwSize=00000008, ReturnAddr=01eb4b5d (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 02180064 lAllocID=28 dwSize=00003508, ReturnAddr=01eb14db (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 0091b884 lAllocID=29 dwSize=00000198, ReturnAddr=01eb14db (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 0091ba5c lAllocID=30 dwSize=00000030, ReturnAddr=01eb14db (pid=000004a4) Direct3D9: (ERROR) :Memory Address: 021835ac lAllocID=31 dwSize=00001020, ReturnAddr=01eb14db (pid=000004a4) Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 119624 bytes 1) Given those allocIDs, or even addresses, is there any way I can find where the allocs were made? 2) Is ReturnAddr the d3d call that allocated the memory? If so, I know 5 of the leaks are of the same type.. 3) The AllocCount is given as 126, but I only get 11 leaks detailed. What does the 126 refer to? Many thanks in advance. -scott p.s boundschecker doesn't help, the app quits without report.
  5. SpiralGuru3d

    multitexturing - stage 0 not showing through

    I got it working by drawing it in two passes. As there were only two textures involved, I still don't understand why I couldn't get it going with multitexturing.
  6. SpiralGuru3d

    multitexturing - stage 0 not showing through

    thanks guys, but that didn't help. if I modulate with stage 0, I get the envmap showing through on the parts of stage 1 that are opaque. I don't want that, I just want it showing through where the alpha channel is semi-transparent. I can write a q3a shader for it, but can't get it working in directx =( Imagine stage 1 is a white square inside a larger grey one. You want the white square to be solide, but the envmap in stage 0 to blend with the grey area. How do you get that?
  7. hi guys, I've just come back to directx, and in writing some shaders, I've hit a block with the old settexturestagestate stuff! =) I have 2 stages, 0 is an environment map, 1 is a texture that I want to mask the environment map behind it depending on its alpha channel. however, in stage 1, where alpha is anything but solid, I get the stage 1 texture blended with the background - stage 0 is not coming though! here's my setup (shader not relevant I assume): // envmap writes solidly into stage 0 stss( 0, D3DTSS_ALPHAOP, D3DTA_DISABLE ); stss( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); stss( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); stss( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); // surface map blends over the envmap stss( 1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); stss( 1, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); stss( 1, D3DTSS_COLOROP, D3DTOP_SELECTARG1 ); stss( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE ); srs( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA ); srs( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); So, in stage 1, for texels with an alpha of 0, I'm not seeing the corresponding texel from stage 0. but shouldn't that be in the dest buffer by that point, having been written in stage 0? thanks -scott
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!