renderTargets / renderToSurface [slimDX]

Started by
6 comments, last by Slaaitjuh 16 years, 1 month ago
Hey guys, i am currently working with SlimDX and i am trying to write to a texture. To do so i created an instance of the RenderToSurface class and a renderTarget texture.

            renderTexture = Game.renderer.CreateTexture(200, 200, 1, Usage.RenderTarget, Format.A16B16G16R16, Pool.Default);
            renderTargetHelper = Game.renderer.CreateRenderToSurface(200, 200, Format.A16B16G16R16);

(the renderer is just a class between slimDX and our framework) to draw i do as following:

            SlimDX.Viewport test = new SlimDX.Viewport();
            test.X = 0;
            test.Y = 0;
            test.Width = 200;
            test.Height = 200;
            test.MaxZ = 1.0f;

            renderTargetHelper.Begin(renderTexture.GetSurfaceLevel(0), test);
            Game.renderer.ClearRenderTarget(Color.Red);
            /*batch.Begin();
            batch.DrawText("test", new SlimDX.Vector2(10, 10), Color.Red);
            batch.End();*/

            renderTargetHelper.End();

            renderTexture.SaveTexture(); // saves texture to test.jpg

but all i get is this: i thought this might sound familiar, so i posted this here, maybe someone else knows this and knows how to solve it, or someone can give me some example of how to do it correctly with SlimDX :) Thanks in advance, Jan
Advertisement
btw, my debug log from SlimDX unmanaged code

'Test_Rafa.exe': Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\Test_Rafa.exe', No native symbols in symbol file.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcr80.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\ac1e54a26519a740275744b697f1bcd8\mscorlib.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\Test_Rafa.exe', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\Framework.dll', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\d7554bd7f76c2b300eeb7f2668fcadda\System.ni.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\7d95519d4875591e76a4aa7d28df0b06\System.Drawing.ni.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\bed91ed0bcc7fe2dc7a051ee88f28380\System.Windows.Forms.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\GdiPlus.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\system32\version.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', No symbols loaded.'Test_Rafa.exe': Loaded 'D:\docks\YzDock.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\SlimDX.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\xinput1_3.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcm80.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcp80.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\SlimDX.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\rsaenh.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcm80.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\fmodex.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\system32\wdmaud.drv''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msacm32.drv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\midimap.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\dsound.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ksuser.dll', No symbols loaded.The thread 'Win32 Thread' (0x1518) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x5a4) has exited with code 0 (0x0).'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\dx9_renderer.dll', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3dx9_36.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\ICSharpCode.SharpZipLib.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\6188bcd85f3d7c96009a192c019a26d7\System.Xml.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Configuration\03a6b2603bea270b99bd12ee4b9ea483\System.Configuration.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe' (Managed): Loaded 'mmfno0kv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\hid.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ntmarta.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\samlib.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\mslbui.dll', No symbols loaded.First-chance exception at 0x7c812a5b in Test_Rafa.exe: Microsoft C++ exception: long at memory location 0x0012eef8..First-chance exception at 0x7c812a5b in Test_Rafa.exe: Microsoft C++ exception: long at memory location 0x0012eef8..
i am sorry to bump this but it will soon leave frontpage. Is there seriously no one that can help me on this one?
The first step would be to actually get D3D debug spew working so that you can see if it's complaining about something. Instructions here.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
[source syntax=csharp]'Test_Rafa.exe': Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\Test_Rafa.exe', No native symbols in symbol file.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcr80.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\32e6f703c114f3a971cbe706586e3655\mscorlib.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\Test_Rafa.exe', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\Framework.dll', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\ba0e3a22211ba7343e0116b051f2965a\System.ni.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\0e83aac37b2623f1a24c70979f31dd56\System.Drawing.ni.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\3d8c79c45aa674e43f075e2e66b8caf5\System.Windows.Forms.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\GdiPlus.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\system32\version.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', No symbols loaded.'Test_Rafa.exe': Loaded 'D:\docks\YzDock.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\SlimDX.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\xinput1_3.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcm80.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcp80.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\SlimDX.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\rsaenh.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcm80.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\fmodex.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\system32\wdmaud.drv''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msacm32.drv', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\midimap.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\dsound.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ksuser.dll', No symbols loaded.The thread 'Win32 Thread' (0x19c) has exited with code 0 (0x0).The thread 'Win32 Thread' (0xfdc) has exited with code 0 (0x0).'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\dx9_renderer.dll', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3dx9d_33.dll', No symbols loaded.Direct3D9: :====> ENTER: DLLMAIN(0446e6e0): Process Attach: 000019d4, tid=00001ea0Direct3D9: :====> EXIT: DLLMAIN(0446e6e0): Process Attach: 000019d4Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3dx9_36.dll', No symbols loaded.Direct3D9: (INFO) :======================= Hal HWVP Pure device selectedDirect3D9: (INFO) :HalDevice Driver Style 9Direct3D9: :DoneExclusiveMode'Test_Rafa.exe' (Managed): Loaded 'K:\development\Framework SLIMDX\pdxProject\Tests\Test_Rafa\bin\Debug\ICSharpCode.SharpZipLib.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\c98cb65a79cfccb44ea727ebe4593ede\System.Xml.ni.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'ImageAtBase0x64890000', No symbols loaded.'Test_Rafa.exe': Unloaded 'ImageAtBase0x64890000''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.configuration.dll', No symbols loaded.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll', No symbols loaded.'Test_Rafa.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe' (Managed): Loaded 'orhleymk', No symbols loaded.Direct3D9: (ERROR) :Discardable Z/Stencil cannot be lockable.Direct3D9: (ERROR) :Failure trying to create zstencil surfaceD3D9 Helper: IDirect3DDevice9::CreateDepthStencilSurface failed: D3DERR_INVALIDCALL'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\hid.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ntmarta.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\samlib.dll', No symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\mslbui.dll', No symbols loaded.Direct3D9: (ERROR) :Invalid flag D3DCLEAR_ZBUFFER: no zbuffer is associated with device. Clear failed.D3D9 Helper: IDirect3DDevice9::Clear failed: D3DERR_INVALIDCALL


Direct3D9: (ERROR) :Invalid flag D3DCLEAR_ZBUFFER: no zbuffer is associated with device. Clear failed.

D3D9 Helper: IDirect3DDevice9::Clear failed: D3DERR_INVALIDCALL

why does that occur?
OK, well now you have a very descriptive error describing exactly what went wrong. You are trying to clear a surface using the flag ClearZBuffer, but you don't have a Z buffer attached to the surface. Hence, there is nothing to clear, and D3D errors.

[Edited by - Mike.Popoloski on March 21, 2008 8:45:21 AM]
Mike Popoloski | Journal | SlimDX
so i ended up with a renderTarget that is transparant, but spritebatch items are not rendered on it. I also tried changing the viewPort, thought that might be the problem. But the renderTarget now is cleared, but does not receive data for some reason. thanks for helping me, by the way.

i am following textbook way of renderTarget:

- backup backbuffer
- backup depthbuffer
- backup viewport

- set renderTarget (0) (surface of renderTexture)
- set Depthbuffer
- set Viewport

- clear device with depth + target
- begin scene
- draw text with spritebatch
- end scene

- set the backbuffer back
- set depthbuffer back
- set viewport back

- save renderTarget texture to file

this should be right, right? all sites i looked up use this way of rendering to texture.

[Edited by - Slaaitjuh on March 21, 2008 2:44:40 PM]
the output after activating Debug mode and unmanaged code is as following:

'Test_Rafa.exe': Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\Test_Rafa.exe', No native symbols in symbol file.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\user32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\imm32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcr80.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\shell32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\32e6f703c114f3a971cbe706586e3655\mscorlib.ni.dll''Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ole32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll''Test_Rafa.exe' (Managed): Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\Test_Rafa.exe', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.'Test_Rafa.exe' (Managed): Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\Framework.dll', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\ba0e3a22211ba7343e0116b051f2965a\System.ni.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\0e83aac37b2623f1a24c70979f31dd56\System.Drawing.ni.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\3d8c79c45aa674e43f075e2e66b8caf5\System.Windows.Forms.ni.dll''Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'ImageAtBase0x10000000', No symbols loaded.'Test_Rafa.exe': Unloaded 'ImageAtBase0x10000000''Test_Rafa.exe': Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\SlimDX.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\xinput1_3.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcm80.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcp80.dll''Test_Rafa.exe' (Managed): Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\SlimDX.dll''Test_Rafa.exe': Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\fmodex.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\winmm.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll''Test_Rafa.exe': Unloaded 'C:\WINDOWS\system32\wdmaud.drv''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\msacm32.drv''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\midimap.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\dsound.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\version.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\ksuser.dll'The thread 'Win32 Thread' (0xde8) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x12ec) has exited with code 0 (0x0).'Test_Rafa.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\GdiPlus.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME''Test_Rafa.exe': Loaded 'D:\docks\YzDock.dll', Binary was not built with debug information.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\rsaenh.dll''Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcm80.dll''Test_Rafa.exe' (Managed): Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\dx9_renderer.dll', Symbols loaded.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\hid.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\d3dx9d_33.dll'Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.'Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\D3DX9_37.dll'Direct3D9: (INFO) :======================= Hal HWVP Pure device selectedDirect3D9: (INFO) :HalDevice Driver Style 9'Test_Rafa.exe' (Managed): Loaded 'K:\development\realityFramework\trunk\Samples\Test_Rafa\bin\Release\ICSharpCode.SharpZipLib.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\c98cb65a79cfccb44ea727ebe4593ede\System.Xml.ni.dll''Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Configuration\eee9b48577689e92db5a7b5c5de98d9b\System.Configuration.ni.dll''Test_Rafa.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Test_Rafa.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll''Test_Rafa.exe' (Managed): Loaded '3ps1sgvh''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\usp10.dll''Test_Rafa.exe': Loaded 'C:\WINDOWS\system32\mslbui.dll'Total of 30 objects still alive.The thread 'Win32 Thread' (0x1584) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x166c) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x15c4) has exited with code 0 (0x0).The thread 'Win32 Thread' (0xdc4) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x24cc) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x228c) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x1500) has exited with code 0 (0x0).The thread 'Win32 Thread' (0xe94) has exited with code 0 (0x0).The thread 'Win32 Thread' (0xf94) has exited with code 0 (0x0).The thread 'Win32 Thread' (0xe3c) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x1dd0) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x18b8) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x16f0) has exited with code 0 (0x0).


this all doesn's look suspicious to me though.

This topic is closed to new replies.

Advertisement