Commit Graph

182 Commits

Author SHA1 Message Date
niki ef08282f0d vulkan: implement getRendererInfo 2022-07-10 19:13:10 +02:00
niki b1fb5b551e working text rendering 2022-07-10 02:25:28 +02:00
niki 73348e5012 enable alpha blending 2022-07-01 13:43:51 +02:00
niki 2a65ea5fb1 cleanup some debug code 2022-06-30 20:16:40 +02:00
niki 0cea07806f use different uniform buffers for each draw call 2022-06-30 18:42:49 +02:00
niki 7f894e5bf7 some work on drawQuads (not fully working yet) 2022-06-25 23:02:13 +02:00
niki efdc2b8ee2 fix crash on exit 2022-06-16 02:25:55 +02:00
niki b5ba2b65b5 stop hardcoding vulkan vertex layouts 2022-06-16 01:16:23 +02:00
niki 2bf7c35220 use constant color for VertexColor 2022-06-14 23:30:51 +02:00
niki c996860602 Use löve's uniform data object for vulkan shader 2022-06-13 16:50:12 +02:00
niki 3a4058d750 allow drawing more than one texture 2022-06-12 02:00:30 +02:00
niki acf0474cc8 Implement drawing very basic textures
With this commit you can draw very simple textures.
The following code will showcase it:

```lua
function love.run()
    local data = love.image.newImageData(40, 40)
    for i = 0,39 do
        for j=0,39 do
            if i <= 20 then
                if j <= 20 then
                    data:setPixel(i, j, 1, 0, 0, 1)
                else
                    data:setPixel(i, j, 0, 1, 0, 1)
                end
            else
                if j <= 20 then
                    data:setPixel(i, j, 0, 0, 1, 1)
                else
                    data:setPixel(i, j, 1, 1, 1, 1)
                end
            end
        end
    end

    local texture
    texture = love.graphics.newTexture(data)

    return function()
        love.event.pump()
        for name, a,b,c,d,e,f in love.event.poll() do
            if name == "quit" then
                if not love.quit or not love.quit() then
                    return a or 0
                end
            end
            love.handlers[name](a,b,c,d,e,f)
        end

        love.graphics.origin()
        love.graphics.clear()

        love.graphics.draw(texture, 50, 500)

        love.graphics.present()
    end
end
```
2022-06-11 20:33:44 +02:00
niki d0aaddfef6 cleanup redundant initialization code 2022-05-08 22:51:11 +02:00
niki c16c07780f use default texture when rendering primitives 2022-05-08 22:44:32 +02:00
niki 75a6bc9b5d Merge remote-tracking branch 'origin/12.0-development' into vulkan 2022-05-06 16:46:55 +02:00
niki 4e8304255d first draft of vulkan texture impl 2022-05-06 16:06:09 +02:00
niki 8f55f093a4 partially implement initCapabilities for vulkan 2022-05-04 23:43:23 +02:00
niki e6f8b465bc use vma for streambuffer implementation 2022-05-04 15:41:50 +02:00
niki 9299219977 perform prepareDraw only once per frame 2022-05-03 17:51:35 +02:00
niki 6dc12be45d fix crash on resizing 2022-03-22 14:32:41 +01:00
niki 158052c52c implement basic per frame uniform variables 2022-03-22 14:31:50 +01:00
niki 157c8f8a20 include custom vulkan shader in love source 2022-03-21 15:26:27 +01:00
niki 197dfb9738 start implementing vulkan Shader type 2022-02-06 22:56:24 +01:00
niki 4692a0490c basic functionality for indexed draw in vulkan 2022-02-06 02:11:20 +01:00
niki 7d680838b6 restructure to not hardcore draw vk commands 2022-02-05 20:44:36 +01:00
niki f39d01e940 Merge branch 'vulkan' of https://github.com/nikeinikei/love into vulkan 2022-02-05 01:53:05 +01:00
niki d09f834bf3 first draft of vulkan buffer implementation 2022-02-04 23:48:36 +01:00
niki b80ef89e8d handle resizing correctly 2022-02-04 23:48:32 +01:00
niki 65074dae15 hello world triangle 2022-02-04 23:45:58 +01:00
niki aed6595ee6 first draft of vulkan buffer implementation 2022-01-06 14:55:07 +01:00
niki 81e3bed778 handle resizing correctly 2022-01-06 01:42:50 +01:00
niki b32c5f3c4e hello world triangle 2022-01-06 01:12:16 +01:00