Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Blog Comments posted by shadmar

  1. how to initialize gui?, this draws a button all over my screen (with a small text)

     

    --Create a GUI
    local gui = GUI:Create(context)
    
    --Create a new widget
    local button = Widget:Create(20,20,300,50,gui:GetBase())
    
    --Set the widget's script to make it a button
    button:SetScript("Scripts/GUI/Button.lua")
    
    --Set the button text
    button:SetText("Button")

  2. From my own experience I do combine sometimes. Lua is very good for the object script system and you can with some planning get a tidy scripted game.

    However lua sucks on math and other procedural stuff like simplex noise (which are all math)

     

    So what you can do, is to write the intensive parts in c++ and just expose yourself to lua.

     

    The drawback is that you can't deploy on the player, but need and download and installation, which might scare away some players.

  3. Ok I added this function which I know nvidia accepts and intel does not:

     

    float testfunc(float x, float y=1.0)
    {
    return x*y;
    }

     

    it compiles ok using F6, but using F5 it now shows an error in line 28

     

    Validating vertex shader...
    Validating pixel shader...
    Error validating pixel shader.
    Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
    ERROR: 0:28: '' :  syntax error
    ERROR: 1 compilation errors.  No code generated.
    0 errors, 0 warnings

    • Upvote 1
×
×
  • Create New...