Hi, I'm working on a little game ( won't tell you what it is now, I'm still working on some kind of engine for it ) and I'm missing more advanced possibilities to use images.
As you're using openGL would it be too much to ask for some kind of U/V mapping and / or vertex coloring possibilities?
More possibilities for image rendering :P
Re: More possibilities for image rendering :P
Major enhancements to love.graphics in general are planned, but specifics depend om community input, so feature requests can only be a good thing.
There is usually a tradeoff between flexibility and performance, especially when dealing with data transfers between Lua and C. I assume we should take the stateful approach in this case, in order to not kill performance entirely.
How would you want the code to look like (for UV mapping, vertex coloring, etc)?
There is usually a tradeoff between flexibility and performance, especially when dealing with data transfers between Lua and C. I assume we should take the stateful approach in this case, in order to not kill performance entirely.
How would you want the code to look like (for UV mapping, vertex coloring, etc)?
Re: More possibilities for image rendering :P
Maybe something like
and point* parameters could be tables with X, Y, U, V, R, G, B and A values
Code: Select all
love.graphics.rawtriangle( style, image, pointA, pointB, pointC )
Re: More possibilities for image rendering :P
Yeah, that would be flexible, but not very fast. If we want speed, we would also need something like:
Vex, tex and clr can either be native buffers or Lua tables. The former being fast, the latter being flexible.
Code: Select all
img = love.graphics.newImage("textures/tex.png")
-- These buffers represent C arrays.
vex = love.graphics.newVertexBuffer( table )
tex = love.graphics.newTexelBuffer( table )
clr = love.graphics.newColorBuffer( table )
-- Change some values:
clr[0] = 255
clr[1] = 0
vex[0] = 255
love.graphics.drawb( love.draw_triangles, vex, tex, clr, img, start, end)
Who is online
Users browsing this forum: No registered users and 5 guests