Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Posts posted by shadmar

  1. Leadwerks.log?

     

    ..
    Loading texture "D:/Documents/Leadwerks/Projects/Planets/Models/Trees/pine01_billboard1_normal.tex"...
    Loading texture "D:/Documents/Leadwerks/Projects/Planets/Models/Trees/pine01_billboard1_emission.tex"...
    Loading shader "D:/Documents/Leadwerks/Projects/Planets/Shaders/PostEffects/sslr.shader"...
    Deleting shader "D:/Documents/Leadwerks/Projects/Planets/Shaders/PostEffects/sslr.shader"
    Loading shader "D:/Documents/Leadwerks/Projects/Planets/Shaders/Drawing/drawimage.shader"...
    Uploading package (115909 bytes)...
    Saving settings...
    Shutting down Steam...
    Closing program...
    ..
    

     

    I can make you a CO-author and you can update it using the zip file in the first post?

  2. Quick updated code:

     

    --Initialize Steamworks (optional)
    Steamworks:Initialize()
    
    --Set the application title
    title="test"
    
    --Create a window
    local windowstyle = window.Titlebar
    if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end
    window=Window:Create(title,0,0,System:GetProperty("screenwidth","1024"),System:GetProperty("screenheight","768"),windowstyle)
    window:HideMouse()
    
    --Create the graphics context
    context=Context:Create(window,0)
    if context==nil then return end
    
    --Create a world
    world=World:Create()
    world:SetLightQuality((System:GetProperty("lightquality","1")))
    
    --create buffer, acamera and material
    buffer = Buffer:GetCurrent()
    camera = Camera:Create()
    light = DirectionalLight:Create()
    light:SetRotation(45,45,45)
    box1 = Model:Box()
    mat1 = Material:Create()
    shader = Shader:Load("Shaders/model/diffuse.shader")
    mat1:SetShader(shader)
    shader:Release()
    box1:SetPosition(0,0,3)
    box1:SetMaterial(mat1)
    
    mybuffer = Buffer:Create(100,100,1,1)
    
    while window:KeyDown(Key.Escape)==false do
    
       box1:Turn(1,1,1)
    
       --If window has been closed, end the program
       if window:Closed() then break end
    
       --Update the app timing
       Time:Update()
    
       --Update the world
       world:Update()
    
       --Render the world
       world:Render()
    
    
       --draw context to buffer
       Buffer:SetCurrent(mybuffer)
    		    context:SetBlendMode(Blend.Alpha)
    		    context:SetColor(.1,.1,.1,1)
    		    context:DrawRect(0,0,100,100)
    		    context:SetColor(1,.5,0,1)
    		    context:DrawText(string.format("FPS: %.2f",Time:UPS()),15,40)
    		    tex = mybuffer:GetColorTexture(0)
    		    mat1:SetTexture(tex,0)
       Buffer:SetCurrent(context)
    
       --Refresh the screen
       context:Sync(true)
    end
    
    
    

     

    Pic

    post-747-0-74911700-1468018516.jpg

    • Upvote 1
×
×
  • Create New...