Results 1 to 2 of 2

Thread: DirectX LostDevice ID3DXFont?

  1. #1

    DirectX LostDevice ID3DXFont?

    Hello

    Using ID3DXFont to draw a simple text in the screen when i press the return key "enter" i put this code:

    if (ssAlt in Shift) and (Key=VK_RETURN) then
    begin

    SwitchFullScreenWindowed();

    end;

    and when i switch the window mode for windowed or fullscreen the renderization disappear...

    when i free the font first.... reset the device and recreate the font its works....

    but dont have a other way to do it?

    Greets
    Knowledge is power.

  2. #2

    DirectX LostDevice ID3DXFont?

    AFAIK there is no other way to do it

    What's wrong with the 'destroy.. reset.. recreate' method? When you change your displaymode from fullscreen to windowed, windows GDI takes control of all video-memory. Therefore it erases all data it doesn't know... your textures, meshes font's etc... just to free mem for windows tasks. That 's why you need to re-create your resources every time.

    You said it worked for you, so i would use that method, instead of wondering whether there is another way to do it.

    Greets Chronozphere.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •