Requesting 1.0.0 instead of 0.10.0
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Requesting 1.0.0 instead of 0.10.0
I think the current graphics api style is the most new user friendly. I don't think switching it up will make it anymore nice. Especially considering this is a framework that is used by a ton of noobs.
Re: Requesting 1.0.0 instead of 0.10.0
You really dont want to mess around with audio and openal!zorg wrote:And an expanded (better) audio API in generalbobbyjones wrote:Love can't become 1.0 until is has HTTPS and microphone support lol.
Twitter: https://twitter.com/Murii5
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
Believe me, i intend to!Murii wrote:You really dont want to mess around with audio and openal!zorg wrote:And an expanded (better) audio API in generalbobbyjones wrote:Love can't become 1.0 until is has HTTPS and microphone support lol.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Requesting 1.0.0 instead of 0.10.0
What are the reasons for these changes? What do they achieve that can't be done now?kikito wrote:
- The graphics library will be separated. Object creation (like newCanvas, newQuad), window functions (like setCaption) and system stuff (like getRendererInfo) will remain in love.graphics. Drawing (line, circle) as well as state (push, pop, etc) will be moved to the Canvas object. So you will do canvas:circle(...) instead of love.graphics.circle(...).
- Related to the previous one, love.draw will receive the "default canvas" as a parameter, just like love.update receives dt. The default canvas will be "special" in the sense that the LÖVE loop is the one which maintains it, and also will expand/contract if the window size changes.
Re: Requesting 1.0.0 instead of 0.10.0
slime, I have a question: I remember you saying that the new Mesh Attributes will be able to solve the following problem of texture distortion (AKA the resulting image not having perspective correctness), when drawing "textured polygons":
How would that look in code? Also, would it be theoretically possible to use the attribute system in order to have a sort of depth-buffer?
How would that look in code? Also, would it be theoretically possible to use the attribute system in order to have a sort of depth-buffer?
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
Main reason is removing global state. The fact that LÖVE has a "global current canvas" makes all drawing-related code not pure. Yes, this means that all drawing functions would get a 'canvas' param. That's worth it in my mind. "update" functions already get a "dt" parameter and that's ok. Pure functions are always prefearable to non-pure ones (Don't take my word for that).adnzzzzZ wrote:What are the reasons for these changes? What do they achieve that can't be done now?
I also suspect that the LÖVE internal code would get simplified if it didn't have to keep track of the global state. At the very least you would remove set/getCanvas.
The interface would also look similar to what you find in other environments like javascript and the browser, where the "canvas" abstraction is the one used to draw.
When I proposed this change I didn't know that OpenGL needed a "current canvas" for performance reasons though.
When I write def I mean function.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
On the contrary, it probably requires more work since OpenGL is very stateful itself.kikito wrote: I also suspect that the LÖVE internal code would get simplified if it didn't have to keep track of the global state. At the very least you would remove set/getCanvas.
Although I would like a more explicit API, it's very easy to make things very expensive without noticing. If you keep having to change (practically) all state between two alternating calls, the code itself may hide this.
- slime
- Solid Snayke
- Posts: 3172
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
kikito wrote:When I proposed this change I didn't know that OpenGL needed a "current canvas" for performance reasons though.
In this case it's not just OpenGL that has this state – GPUs themselves only operate on one (set of) render targets / Canvases at a time, and switching that set to a different one can be very expensive in the hardware. That will remain true even if DirectX 12 or Vulkan or Metal is used.bartbes wrote:On the contrary, it probably requires more work since OpenGL is very stateful itself.
Those newer APIs do have ways to schedule different lists of commands at once to be executed for different sets of render targets, by having 'command list' / 'draw pass' objects you can create and pass around. But the order that those command lists will be executed in still needs to be determined at some point, so exposing that capability would make the API more complicated.
Re: Requesting 1.0.0 instead of 0.10.0
Or, make a pseudo-canvas :slime wrote:pgimeno wrote:Code: Select all
function Canvas:circle(...) love.graphics.setCanvas(self) love.graphics.circle(...) end
Code: Select all
-- In a a file :
local GlobalCanvas = Object:new ()
function GlobalCanvas:circle (...)
love.graphics.circle (...)
end
function love.graphics.getCanvas ()
-- Code for checking if a real canvas is setted
-- If no canvas is setted :
return GlobalCanvas
end
- The current usage, so with love.graphics.* functions ;
- The "new" usage, so with canvas:* functions ;
Code: Select all
-- In a file lol
-- A tracking variable
local currentCanvas = nil
function love.graphics.setCanvas(canvas)
if canvas == currentCanvas then
return
end
-- Set the current Canvas.
end
-- In another file
function Canvas:circle (...)
love.graphics.setCanvas (self)
love.graphics.circle (...)
end
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
github / linkpy
Who is online
Users browsing this forum: No registered users and 2 guests