Jump to content

bandrewk

Members
  • Posts

    215
  • Joined

  • Last visited

Posts posted by bandrewk

  1. Hello,

     

    the active context is not resizing correctly when changing the window layout without rendering a world.

     

    Resizing while rendering a world:

    post-7919-0-76873200-1408546579_thumb.png

    post-7919-0-34735300-1408546585_thumb.png

     

    Resizing without rendering a world:

    post-7919-0-19333300-1408546605_thumb.png

    post-7919-0-14956000-1408546615_thumb.png

     

    Example code:

     

    bool App::Loop()
    {
    //Close the window to end the program
    if (window->Closed()) return false;
    
    if (window->KeyHit(Key::J))
    {
    window->SetLayout(window->GetX(), window->GetY(), 1920, 1080);
    }
    if (window->KeyHit(Key::K))
    {
    window->SetLayout(window->GetX(), window->GetY(), 1024, 800);
    }
    //Press escape to end freelook mode
    if (window->KeyHit(Key::Escape))
    {
    if (!freelookmode) return false;
    freelookmode=false;
    window->ShowMouse();
    }
    
    //if (freelookmode)
    //{
    // //Keyboard movement
    // float strafe = (window->KeyDown(Key:) - window->KeyDown(Key::A))*Leadwerks::Time::GetSpeed() * 0.05;
    // float move = (window->KeyDown(Key::W) - window->KeyDown(Key::S))*Leadwerks::Time::GetSpeed() * 0.05;
    // camera->Move(strafe,0,move);
    // //Get the mouse movement
    // float sx = context->GetWidth()/2;
    // float sy = context->GetHeight()/2;
    // Vec3 mouseposition = window->GetMousePosition();
    // float dx = mouseposition.x - sx;
    // float dy = mouseposition.y - sy;
    // //Adjust and set the camera rotation
    // camerarotation.x += dy / 10.0;
    // camerarotation.y += dx / 10.0;
    // camera->SetRotation(camerarotation);
    // //Move the mouse to the center of the screen
    // window->SetMousePosition(sx,sy);
    //}
    Leadwerks::Time::Update();
    //world->Update();
    //world->Render();
    context->SetColor(0, 0, 0, 1);
    context->Clear();
    
    context->SetColor(1, 1, 1, 1);
    context->SetBlendMode(Blend::Alpha);
    context->DrawText("10x10", 10, 10);
    context->DrawText("100x100", 100, 100);
    context->SetBlendMode(Blend::Solid);
    context->Sync(false);
    
    return true;
    }
    

     

    Comment / Uncomment the world update and rendering and press J and K a few times to resize.

  2. Hello everyone,

     

    I am experiencing some issues with the Window::Show/HideMouse methods. When calling both of them multiple times they basically stop working. For example:

     

    bool App::Start()
    {
    //Initialize Steamworks (optional)
    /*if (!Steamworks::Initialize())
    {
    System::Print("Error: Failed to initialize Steam.");
    return false;
    }*/
    //Create a window
    window = Leadwerks::Window::Create("cc");
    window->ShowMouse();
    //Create a context
    context = Context::Create(window);
    
    //Create a world
    world = World::Create();
    
    //Create a camera
    camera = Camera::Create();
    camera->Move(0,2,-5);
    
    //Hide the mouse cursor
    window->HideMouse();
    
    std::string mapname = System::GetProperty("map","Maps/start.map");
    Map::Load(mapname);
    
    //Move the mouse to the center of the screen
    window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2);
    
    window->ShowMouse();
    window->HideMouse();
    return true;
    }
    

     

    In the above example the mouse pointer will be visible, but it should be hidden.

  3. Hello,

     

    we are experiencing a quite critical bug that concerns the scene browser, it for some reasons stops drawing new entries and just displays a large white area. This occurs on the latest steam and standalone build, tested on multiple computers. We are hoping for a fast fix as this basically stops us from working on the level design. Here is a picture of the problem:

     

    post-7919-0-55349500-1407748494_thumb.png

     

    Thank you!

  4. Hello,

     

    since the last update the camera clipping range in the editor is too low. We are not able to work efficiently on our level with a size of 2048x2048 as some parts of the level are always clipped. Please increase it or make it an option in the settings dialog.

     

    Cheers,

    Bryan

×
×
  • Create New...