LukeSkyRunner

Members
  • Content count

    120
  • Joined

  • Last visited

Community Reputation

136 Neutral

About LukeSkyRunner

  • Rank
    Member
  1. When I create an object using "new" wich has an std::list as member I always get memory leaks. Why? Eg.: struct BLA { std::list <int> List; // that wont be destroyed! } BLA *bla = new BLA; delete BLA; How can I avoid those leaks?
  2. With VC++ 6.0 I have found a way to detect when a memory leak is happening in my program, but is there a way to find out in wich line of code the unfreed memory is allocated?
  3. How can I set up the alpha blending with Direct3D in order to multiply the pixel alpha component with the vertex alpha component to obtain the final alpha value?
  4. I updated my DirectX SDK to the October 2004 version but I'm having problems while recompiling my projects. The compiler message is: --------------------Configuration: MyFramework - Win32 Debug-------------------- Linking... d3dx9.lib(cfxlprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cshaderprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(c30program.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cpslegacyprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cpsprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cvsprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(trees.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cbaseprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cprogram.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cparse.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(jdcoefct.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(jdhuff.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(jchuff.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(jcdctmgr.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cpreprocessor.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(ctokenize.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cassembler.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(ccompiler.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(pngerror.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(d3dx9shader.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(pngwutil.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(pngrutil.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(ssefasttable.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(d3dxmathx3d.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(jdmarker.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(jerror.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cpudetect.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cimage.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(ccodec.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cfile.obj) : error LNK2001: unresolved external symbol ___security_cookie d3dx9.lib(cfxlprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cshaderprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(c30program.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cpslegacyprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cpsprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cvsprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(trees.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cbaseprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cprogram.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cparse.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(jdcoefct.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(jdhuff.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(jchuff.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(jcdctmgr.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cpreprocessor.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(ctokenize.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cassembler.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(ccompiler.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(pngerror.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(d3dx9shader.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(pngwutil.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(pngrutil.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(ssefasttable.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(d3dxmathx3d.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(jdmarker.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(jerror.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cpudetect.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cimage.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(ccodec.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 d3dx9.lib(cfile.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 Debug/MyFramework.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. MyFramework.exe - 61 error(s), 0 warning(s) Can someone help me?
  5. Ok, if I have a 3D vertical (Y-axis parallel) segment, and I want to discover its projected size in pixels, how can I do that in Direct3D? The problem is that we need to consider viewport size and projection matrix.
  6. Multiple Texture Coords?

    If I understood your question, you can add another pair of uv coordinates, like: struct MY_VERTEX { vector3 pos; vector3 normal; vector2 uv0, uv1; }; And then use the follwing FVF: (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX0|D3DFVF_TEX1). But what I would do is to use vertex shaders copying the first stage coordinates to the oT0 and oT1 registers, unless you wish to use diferent values for the both textures.
  7. Light scissors example

    Where can I get a light scissors example (source code) for point light volumes? The problem is that with Direct3D we have projection matrix, what can change sphere radius. My difficulty is to create the RECT (obtaining the values).
  8. stencil shadows problem

    You are using z-pass technique, wich doesn't require a closed shadow volume but if viewport is inside the volume or it intersects the near plane you will have problems. There is another technique called z-fail, that always work even if viewport is inside of it. To let it work, your shadow volume must be capped (closed in the both sides). Read this article http://www.gamedev.net/reference/articles/article1873.asp and after google for some examples and another topics about z-fail at GDN.
  9. OpenGL per-pixel lighting without normal maps?

    That tutorial doesn't shows per-pixel lighting, but per pixel attenuation. Per pixel attenuation do not require normalmaps because there is no DOT3 against every pixel normal. We can say that this tutorial shows a flat lighting. So, if you want per-pixel lighting and attenuation you will need normalmaps.
  10. ps_2_0 versus ps_2_x

    ps_2_0 and ps_2_x: wich is faster? Every videocard that supports ps_2_0 also supports ps_2_x?
  11. Good precision for post proc depth

    Oh, you are right! Thanks.
  12. I'm writing a deferred shading engine that runs on a Geforce FX (wich does not support render target surface types like D3DFMT_R32F for good depth precision), so, I have to use a format like A8R8G8B8 (the ONLY format supported for RTs). The question is: how can I get a good depth precision with it? This way we have four elements (x/y/z/w), so, maybe it can be used to store a better precision depth, I just don't know how.
  13. Vertex Tweening arbitrary models

    I THINK as long as the both model have the same number of vertices it will be ok, they will be blended (almost) with no problem. Be carefull on inversing the order of some triangle vertices. The best way to be sure that the blending will be OK is on making the deformantion from the same original mesh. It is very hard to do blending between two diferent models. If you want do that, you will need to write code outside the shader and use dynamic models (to be ready to change the polycount at every frame).
  14. How are you setting the billboard's geometry? How bilboards are aligned with the camera? Are you sure the billboards are not beeing back/front face culled? Aren't you forgeting SetFVF and SetStreamSource calls before rendering?
  15. depth via pixel shader

    Yes, I'm on a geforce FX.