KN4CK3R

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

128 Neutral

About KN4CK3R

  • Rank
    Member
  1. D3DX8 and D3DX9 in one project

    I ended up in this solution. Works fine and without big codechanges but is not portable.   http://stackoverflow.com/questions/10036733/modifying-a-compiled-static-library   Renamed D3DXCreateSprite in the d3dx8 header and library to D3DXCreateSprit8. Now the conflicts are gone.   Thanks for your help anyway :)
  2. D3DX8 and D3DX9 in one project

    yes, this would work but I don't want to split this part in different DLLs.
  3. D3DX8 and D3DX9 in one project

    I tested your second idea 5 minutes before because I thought it would work but now the DX8 part is ignored and the DX9 D3DXCreateSprite gets called for both. Maybe I have done something wrong with it. GetProcAddress with D3DX8 will not work (found it out yesterday) because there isn't a d3dx8_....dll. The provided file in the DX8 SDK is a static library.   I will attach the project and it would be very cool if you could check if I did something wrong.
  4. D3DX8 and D3DX9 in one project

    it is an overlay for dx apps and should work with DX8 (yeah some older programs use it ;)) and DX9. Internaly it checks which version the game uses and then uses my DX8 or DX9 renderer.
  5. Hi,   I want to use D3DX8 and D3DX9 (Sprite and Font class) in one project. Using D3D8 and D3D9 together is not a problem but the X variants have the same function and class name for DX8 and DX9. This causes problems while executing the (test) program. //D3D8 part LPDIRECT3DDEVICE8 device; .... ID3DXSprite *sprite; D3DXCreateSprite(device, &sprite); sprite->Release(); //and D3D9 part in an other file LPDIRECT3DDEVICE9 device; .... ID3DXSprite *sprite; D3DXCreateSprite(device, &sprite); sprite->Release(); The D3D8 part will run fine but the D3D9 part crashes in the D3DXCreateSprite method. I checked the generated assemblercode and it turns out that both D3DXCreateSprite methods are the same so the code tries to initialize the D3DX9 Sprite with the D3DX8 Sprite code what can't work. I hoped something like this could work but for sure it does not: namespace D3D8 { #include <d3dx8.h> #pragma comment(lib, "d3d8.lib") #pragma comment(lib, "d3dx8.lib") } D3D8::ID3DXSprite *sprite; D3D8::D3DXCreateSprite(device, &sprite); sprite->Release(); The compiler doesn't create seperate methods.   Anyone has an idea how I can include both DX versions in one project? One solution could be to dynamicly load the d3dx_....dll and use GetProcAddress for D3DXCreateSprite but I hope there is an "build in" solution.   Thanks for your help!
  6. Sphere

    I need to set D3DXMatrixPerspectiveFovLH and D3DXMatrixLookAtLH with this informations from refdef? greetz KN4CK3R
  7. Sphere

    no, I saw a video that it can be done in nonshader driven games too. greetz
  8. Sphere

    no, there are lots of games that use DX greetz
  9. Sphere

    the game uses the Quake3 Engine greetz
  10. Sphere

    I say this because it has no effect. I don't see the sphere. greetz KN4CK3R
  11. Sphere

    I have added this to the renderfunc: D3DXMATRIX mProjection; D3DXMatrixPerspectiveFovLH(&mProjection,D3DXToRadian(45.0f),1024.0f/768.0f,1.0f,100.0f); pDevice->SetTransform(D3DTS_PROJECTION,&mProjection); D3DXMATRIX matView; D3DXMatrixLookAtLH( &matView, &D3DXVECTOR3( 0.0f, 2.0f, -25.0f ), // Camera position &D3DXVECTOR3( 0.0f, 0.0f, 0.0f ), // Look-at point &D3DXVECTOR3( 0.0f, 1.0f, 0.0f ) ); // Up vector pDevice->SetTransform( D3DTS_VIEW, &matView ); but this changes nothing. This doesn't change my view. Edit: I have logged the D3DTS_WORLD matrix from every DrawIndexedPrimitve call where the game draws models and stuff. It's always the empty martrix: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Is there an other way to tell DIP where to draw the current model? Because if they don't use SetTransform they must do it an other way?! greetz
  12. Sphere

    the renderfunc from the mod is called between Begin and EndScene. I have added an output for my position and the camera (pDevice->GetTransform(D3DTS_VIEW,&camera);) The camera is always the normalized matrix: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 I have testet the other transformationtypes too (D3DTS_PROJECTION, ...). They all are normalizes matrices. I think the game uses an other method to set the camera. Can I use SetTransform with my current viewangles I can read from the game? greetz
  13. Sphere

    I think the cameraposition is the head from the player in this first person game. so if I walk and look around i change the camera or not? And if I create a sphere at a visible position in front of me (D3DXMatrixTranslation(&Position,955.f,-162.f,137.f);) i should see the sphere. greetz
  14. Sphere

    I don't have the original code. The game only calls the render func from the mod. Would it help if I post what GetTransform returns? edit: I tried this but it won't work. D3DXMATRIX Position, Scale, Matrix; D3DXMatrixTranslation(&Position,955.f,-162.f,137.f); D3DXMatrixScaling(&Scale,5.0f,5.0f,5.0f); pDevice->GetTransform(D3DTS_VIEW,&camera); Matrix = Position*Scale*camera; pDevice->SetTransform(D3DTS_WORLD,&Matrix); Mesh->DrawSubset(0); greetz
  15. Sphere

    sry, in the code it's called pDevice too. I don't positioning the viewpoint, I just use the normal ingame view. Do I need to set a different viewpoint? I think that would change the game itself. I only want to add this sphere to the point the vector shows to. Am I right and I can use D3DXMatrixTranslation with the vectors who comes from the game. (my position etc) greetz