• Content count

  • Joined

  • Last visited

Community Reputation

109 Neutral

About BaSSraf

  • Rank
  1. Transparent Windows

    You can simply extract the regions from your "parent" window around the controls (the children) and you will have the effect you are after. I think I remember you can even invert a region, in which case it gets even easier since you simply extract the control boundings from the parent region and then invert that region to be the parent's region. Anyway :) hope this helps, good luck!
  2. Warning error for DX

    if you keep track of its current state and make sure you dont set it when it already has the same value, yes it will go away.
  3. OpenGL Polygon Tessellation

    There are no d3dx tesselation functions, I simply use the gluTesselation stuff in combination with dx :) Cant you do that as well ?
  4. OpenGL Help need to speed up engine

    Be careful not to leave directx in debug mode, I personally forget to switch it back once in a while and wonder why things are slow or behave a little different. So, check if you are not running dx in debug mode. hth.
  5. for more extensive stuff including leak detection have a look at: (not free though)
  6. As far as I know you will have to define a HLSL structure and send the/a the light data to the shader yourself. As far as i'm aware you cannot access the fixed function lights from within the shader with hlsl.
  7. The Clone function is a method of the Mesh object to which you pass the desired FVF. (lol, again sorry for the confusion, i'm a bit rusty :P) Mesh->CloneMeshFVF(); edit: which I notice nik02 already wrote.. :)
  8. Yes, i'm sorry, its the texture coords they come without. sorry for the confusion.
  9. The utility functions work on Mesh objects, but before you pass a mesh object into them you need to make sure the initial mesh object actually has a "vertex" format which can hold the normals/tangents etc.. (D3DX has clone functions to do so). You dont have to use multiple streams for the shaders, you can have 1 "vertex" stream which holds interleaved positions-normals-texcoords, the vertex declaration will do the binding (together with the semantics used for the vertex shader's input) - if you want to use multiple streams you will have to generate parallel streams of positions, normals etc.. and adjust your vertex declaration to reflect this. In the first case your data will look like Position followed by a normal followed by a texture coord. The second method you refer to uses separated lists of Positional data, Normals, Tex coords which makes it possible to combine data streams at will. The utility functions described, wont generate seperated streams, but will create 1 vertex structure holding each component. hth :)
  10. No, but the D3DX utility library has some ready-to-go functions for generating them. Hope that helps.
  11. Hey guys.. I'm seeing some weird artifacts in overlapping geometry, like small pieces of a polygon suddenly appear in front of something which should actually stay behind it. It stays in the same place and only seems to happen where the geometry is quite dense.. - after reloading the scene it will happen in exactly the same place and it seems to depend on the camera position but still it will happen at the same location. This ONLY happens when anti-aliasing is enabled (4x) AND when updating the desktop, like dragging scrollbars or minimizing/maximizing windows etc.. I'm thinking its some driver/hardware related issue since the engine has been rather stable for a long time, but we dont know when it was introduced. Did anyone see this before, any pitfalls we dont know of?, any hints? thanks a lot. (we just noticed it also happens when presenting the offscreen buffer to an onscreen window instead of dumping the offscreen buffer to host memory as we normally use)
  12. It seems to me the only possible way to do this is when you "duplicate" part of the mapping code into the application to detect page faults - which would mean you'd have to transform some abstract form of the model to approximate the needed texture pages (abstract since a complete transform would put the HW accell in the trash). I can imagine some projection to an abstract encapsulating model is done at load time, or maybe even included with the models by the artist (yikes..). Anyway, I hope someone makes it into an easy to use package for the joy of all of us :P
  13. Matrix Decomposition (non uniform scaling)

    Thanks :) Just to make sure, since i'm using DX (left handed, row vecs), I only need to transpose the input matrix before passing to the decomposition function correct ?
  14. Matrix Decomposition (non uniform scaling)

    Quote: Ken Shoemake's decomp_affine() source code. Is there a reason why you post the link, I mean, I will try it of course (thx), but it would be nice to know if my current example is not supposed to work (and why) Also I tried using Polar decomposition and SVD decomposition as well - but weird enough when non uniform scaling is used in combination with rotation.. they all screw-up.. (grrrr!!!) Quote: Your code sample looks like it should work. This may be a silly question, but are you sure the original quaternion is unit length and otherwise constructed correctly? To make sure, I checked and normalized the input quaternion, doesnt make a difference :( Quote: The only thing I found that might be slightly relevant is this: Thanks, i'll check it out :)
  15. I can't seem to recreate the same matrix after decomposing it. I have excluded most of the other code in a little test setup: // first I create a world matrix for some object D3DXMatrixScaling( SM, 1, 1.5, 1 ); // note: when I use 1,1,1 everything is fine D3DXMatrixRotationQuaternion( RM, Rotation ); D3DXMatrixTranslation( TM, Translation.x, Translation.y, Translation.z ); orgMatrix = SM * RM * TM; // now we will decompose the orgMatrix into its scaling, rotation and translational part D3DXMatrixDecompose( &Scale, &Rotation, &Translation, orgMatrix ); // recreate the indiviual matrices D3DXMatrixScaling( SM, Scale.x, Scale.y, Scale.z ); D3DXMatrixRotationQuaternion( RM, Rotation ); D3DXMatrixTranslation( TM, Translation.x, Translation.y, Translation.z ); // recreate the orgMatrix called decMatrix after decomposition decMatrix = SM * RM * TM; when using uniform scaling or no rotation, the orgMatrix will yield the same result as the decMatrix but when combining rotation with non-uniform scaling, things go wrong.. :( Can anyone tell me if its possible to decompose the matrix into its correct components when using rotations combined with non-uniform scaling ?