Jump to content

codeape

Members
  • Posts

    183
  • Joined

  • Last visited

Posts posted by codeape

  1. bool App::Loop()
    {
    //Close the window to end the program
    if (window->Closed()) return false;
    
    //Press escape to end freelook mode
    if (window->KeyHit(Key::Escape))
    {
    window->ShowMouse();
    return false;
    }
    
    context->SetColor(1,0,0);
    context->DrawLine(0,0,200,200);
    context->SetColor(0,1,0);
    context->DrawRect(0,0,100,100);
    
    Leadwerks::Time::Update();
    world->Update();
    world->Render();
    context->Sync(false);
    
    return true;
    }

     

    When I run this code (the default code) I only see the default map but no 2D Line or Rectangle:

     

    I have also tried adding Clear() from the Command reference examples (could not find any doc on Clear though, is it OpenGL context clear?):

     

    context->SetColor(0,0,0);
    context->Clear();
    context->SetColor(1,0,0);
    context->DrawLine(0,0,200,200);
    context->SetColor(0,1,0);
    context->DrawRect(0,0,100,100);
    

     

    I run Ubuntu 14:04:

    lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.1 LTS
    Release:	 14.04
    Codename:	 trusty
    

  2. Thank you DerRidda. It worked! The link you posted was not in the KS reward mail but I found the mail after you kindly posted the link.

     

    Sorry for late response but I have moved the last couple of weeks =)

  3. Hello community,

     

    I finally got around to install my kickstarter reward (PRO level, Standard edition, the c++ one). I followed the link in the email. Installed Leadwerks on my Linux machine and the editor starts (cewl!! awesome!!!). biggrin.png

     

    Ok, so far so good. But, have there been any updates to Leadwerks since the release of Linux standard editon of Leadwerks? How do I know I got the latest build/version of Leadwerks installed? How do I get the Latest build/version?

  4. Read this Nvidia presentation (page 64 - 65, "Porting Source to Linux - Valve’s Lessons Learned"):

    https://developer.nvidia.com/sites/default/files/akamai/gamedev/docs/Porting%20Source%20to%20Linux.pdf

     

    In short : Don't switch out the attachments of your framebuffers. Instead, switch framebuffers.

     

    The best explanation I found about this:

    I realize I never actually said what the optimization is, but if anybody out there is a graphics programmer and wants to know, it might be helpful to explain, since this one is a non-obvious but highly-necessary optimization for GL. The key is this: don't switch out the attachments of your framebuffers. Instead, switch framebuffers. E.g., if you need to render to a texture, don't just keep the same framebuffer and switch out the attachment. Create a new framebuffer, attach the texture, use it, then cache the new FBO. Next time you need to render to the same texture, do a cache lookup and use the same FBO. The idea is that when you change out the attachments of an FBO, it forces the drivers to do some kind of stupid validation, and, for whatever reason (probably the fact that everything related to FBOs is Evil and Bad), this validation takes a remarkable chunk of time, leading to noticeable performance degradation whenever attachment-switching is involved.

    http://forums.ltheory.com/viewtopic.php?f=12&t=2148#p28788

     

    I do not know if Leadwerks do this but it could be a good optimisation.

  5. I may have discovered a thing during browsing my projects directory structure.

     

    When I created my project I got a default map called start.map. However I created a new map directly (called test.map) because I wanted to try some things out. However, I ended up creating everything in test.map you see in the YouTube video and the start.map has never been edited. The strange thing is that start.map is 2746 kB big and my test.map is 21 kB. Should my test.map be that small? Is this a problem?

  6. Hello fellow Leadwerkers

     

    I have 2 problems:

     

    1. In the editor, I add a box shape to a box and a cylinder shape to a model mesh. I do this with the Physics tab for both visible objects (Scene tab->Physics tab). However, when I enable "VIEW->Show Physics" through the top menu both shapes are shown as cylinders.

     

    2. I have a script that creates a top-down perspective of a "Player" in the game. I place a camera over the head of the player and look down and follow the player with the camera. When I add this script to the earlier mentioned model mesh with the cylinder shape the model can go through walls. However, when I add this script on the earlier mentioned box (removing the script from the mesh model first) everything works fine, the box do not go through walls etc. Both the box and the model mesh have the same physics settings in the "Scene tab->Physics tab" with only one exception, The shape is a box for the box and a cylinder for the Model mesh. Here are the rest of the settings in the "Scene tab->Physics tab":

    • Physics mode: Character Controller
    • Mas: 1.0
    • Collision type: Character
    • Character angle: 0.0
    • Swept collision: False
    • Nav obstacle: False

    TopDownPerson.lua

    test_map.zip

×
×
  • Create New...