   [.net] Strange MDX Problem
  Hi,I have written a simple tool with C# using .Net 2 and managed DirectX. It is a simple script editor, but visual, so one can create scripts in a 'visual manner' for our game.However, I'm asking if you could test something for me: The DirectX rendering works on all of my computers but one member in our team is complaining that the preview is not working for him. No messages about a missing assembly library no error messages - nothing - just a black window. Latest April 2006 runtime is installed.Maybe you could just grap the editor from the above link, run ObjEditor.exe, expand the 'Create' node on the very left of the window ('Element Collection'), drag the 'Create Animation' item from the collection and drop it in the big white control in the middle, where is says 'Visual Script Graph'. Then click 'Preview' on the newly created shape in the graph window. A window should now pop up and show you a preview of a particle system, emitting some blue stars :-)It would be great if you could try that for me and give me some feedback - telling me whether this preview renders the stars or not.Here's the link (250 kB): Editor.zip(.Net 2.0 and DirectX runtime required)Thank you very much.ZMaster[Edited by - ZMaster on June 2, 2006 4:23:18 AM]
  I get the same problem. I'm running Win98 SE maybe this is the problem?   ;  The blue stars show up nicely for me.WinXP ProLatest DirectX runtime, .NET 2.0   ;  Works here:Latest Directx, .NET 2.0   ;  Doesn't work. I get two error boxes:#1:---------------------------DirectX Failure---------------------------Failed to initialize a Direct3D device.Please make sure that the latest DirectX runtime is installed on this machine#2:---------------------------Error---------------------------The texture file could not be loadedAnd then i get the black animation preview...WinXP SP2, DX April 2006, .NET 2.0   ;  Thank you!I really don't get that... I'm actually a newbie to DirectX (have been using OpenGL ever since). What could I be possibly doing wrong?Would you mind taking a look at my rendering class (quite simple again). Maybe I'm  using some wrong flags during initialization:public class Renderer: IDisposable    {   private Control pTarget;   private Microsoft.DirectX.Direct3D.Device ddDevice;   private bool bInitialized = false;   public Renderer(Control target)   {  pTarget = target;  PresentParameters pp = new PresentParameters();  pp.Windowed = true;  pp.BackBufferFormat = Format.A8R8G8B8;  pp.SwapEffect = SwapEffect.Discard;  pp.AutoDepthStencilFormat = DepthFormat.D16;  pp.EnableAutoDepthStencil = true;  try  { ddDevice = new Device(Manager.Adapters.Default.Adapter, DeviceType.Hardware, pTarget.Handle, CreateFlags.HardwareVertexProcessing, pp); bInitialized = true;  }  catch  { MessageBox.Show("Failed to initialize a Direct3D device.\nPlease make sure that the latest DirectX runtime is installed on this machine","DirectX Failure", MessageBoxButtons.OK, MessageBoxIcon.Error); bInitialized = false;  }   }   public void BeginScene()   {  if (!bInitialized) return;  ddDevice.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);  ddDevice.BeginScene();   }   public void EndScene()   {  if (!bInitialized) return;  ddDevice.EndScene();  ddDevice.Present();   }   public void Dispose()   {  if (!bInitialized) return;  if(ddDevice != null) ddDevice.Dispose();  bInitialized = false;   }   #region Properties   public Device DXDevice   {  get { return ddDevice; }   }   public bool IsInitialized   {  get { return bInitialized; }   }   #endregion    }I'm then rendering the stars by simply drawing textured quads (4 verices, triangle fan) using the TransformedColoredTextured format.Anything obviously wrong with that?   ;  Well, at first it didn't work. The window was just black. But I went to "browse" and just selected a random picture to use as a particle texture, and obviously then I could see the animation.   ;Quote:Original post by crazyishoneWell, at first it didn't work. The window was just black. But I went to "browse" and just selected a random picture to use as a particle texture, and obviously then I could see the animation.See, this is strange again, because I'm actually grabbing the texture from the embedded resource pool:Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream(typeof(ParticleSystem), "Resources.Particle.png");texParticle = TextureLoader.FromStream(pRenderer.DXDevice, s);   ;  The tool works, but I see nothing. When I double-click on the animation box, it says "texture | /gfx/particle.tga" but I have no image files in the download.   ;Quote:Original post by BoderThe tool works, but I see nothing. When I double-click on the animation box, it says "texture | /gfx/particle.tga" but I have no image files in the download.The /gfx/particle.tga is a file in the game directory, which is _NOT_ used in the preview. As I wrote above, the preview uses some texture from the resource pool which is embedded with the executable... You can, however, click 'Browse' in the preview window and use a different texture...   