Commit Graph

6 Commits

Author SHA1 Message Date
niki 7f894e5bf7 some work on drawQuads (not fully working yet) 2022-06-25 23:02:13 +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 c16c07780f use default texture when rendering primitives 2022-05-08 22:44:32 +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 77f1af598d add skeleton for vulkan texture impl 2022-05-03 18:11:31 +02:00