Search Unity

problem about direct3d's rendertexture, gfxdevice is lost

Discussion in 'Editor & General Support' started by azuretttc, Apr 29, 2011.

  1. azuretttc

    azuretttc

    Joined:
    May 8, 2009
    Posts:
    75
    messeages in output_log.txt

    Direct3D:
    Version: Direct3D 9.0c [nvd3dum.dll 8.17.12.6658]
    Renderer: NVIDIA GeForce GT 440
    Vendor: NVIDIA
    VRAM: 1024 MB
    Caps: Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 DF24=0 INTZ=1 RAWZ=0 NULL=1 RESZ=0 SlowINTZ=0
    <I> Initializing (RawInput).

    <RI> Input initialized.

    desktop: 1080x1920 60Hz; virtual: 1080x1920 at 0,0
    Non platform assembly: data-026F5C18 (this message is harmless)
    Non platform assembly: data-07660048 (this message is harmless)
    Non platform assembly: data-0275A7B8 (this message is harmless)
    Non platform assembly: data-0275BFD0 (this message is harmless)
    Non platform assembly: data-07677FE8 (this message is harmless)
    Non platform assembly: data-0768EFD8 (this message is harmless)
    Non platform assembly: data-07910020 (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\UnityScript.Lang.dll (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\Boo.Lang.dll (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\System.Data.dll (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\System.Data.dll (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\System.dll (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\System.Transactions.dll (this message is harmless)
    Platform assembly: D:\intelkiosk\intelkiosk_Data\Managed\System.Xml.dll (this message is harmless)

    Skipped rendering frame because GfxDevice is in invalid state (device lost)

    (Filename: C:/BuildAgent/work/f724c1acfee760b6/Runtime/Misc/Player.cpp Line: 1571
    )

    The problem seems is that the render to texture is not working on one machine which is a dell computer with nvidia gt 440, direct3d also installed. The same application works on other machines which has definately the same kind of equipments.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    GfxDevice in invalid state "device lost" can also come from switching to another 3d accelerated application or from letting stuff like the admin menu and screensaver appear which invalidate the gfx device as well.

    its actually more likely to come from such a thing than from RT especially as the machine supports render textures as you can see from the CAPS
     
  3. azuretttc

    azuretttc

    Joined:
    May 8, 2009
    Posts:
    75
    thanks for your quick reply. However, the problem exists while I'm not opening a screensaver, what do you mean an "admin menu"? My computer is using win7, where can I find the admin menu? In fact, the whole program is all right except that the render texture does not show anything at all. I use this render texture:

    function OnRenderImage(source:RenderTexture, dest:RenderTexture) {
    var tex : Texture2D = Camera.main.GetComponent(MainLogic).m_confirmFGRobotGUITexture.texture;
    tex.ReadPixels(new Rect(0, 250,tex.width, tex.height), 0, 0); //150
    tex.Apply();
    //File.WriteAllBytes(Application.dataPath + "/../SavedScreen2.png", tex.EncodeToPNG() );
    }