The external API LÖVE exposes mirrors the one it makes use of internally (which in turn mostly mirrors the OSX/Windows/X11/etc. APIs). I suppose it could lazy-load system cursors and cache them, but there isn't a really great reason to do that in my opinion.Santos wrote:I'm wondering, why do new Cursors have to be created from CursorTypes rather than passing the CursorType to setCursor, since only one style of Cursor can be made from each CursorType?
Testing the new things in 0.9.0
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Testing the new things in 0.9.0
Re: Testing the new things in 0.9.0
I'm wondering, what are use cases for color masks?
I assume the effects which could be achieved with it would be somewhat limited since there are only so many permutations of the four color components, and couldn't the same effects also be achieved using shaders?
Also, why is the color mask state reset after ever frame, like coordinate transformations?
I assume the effects which could be achieved with it would be somewhat limited since there are only so many permutations of the four color components, and couldn't the same effects also be achieved using shaders?
Also, why is the color mask state reset after ever frame, like coordinate transformations?
Re: Testing the new things in 0.9.0
Color masks are just there, whether you can see use for them or not. They don't introduce extra overhead, so why don't have them. Someone might find a good use for them.
It does not necessairly have to. It's just after every love.draw ( ), love.graphics.present ( ) is called, which IIRC (could be wrong) also resets everything to configured identity. Internally on low level, this is not mandatory, but this is generally what you want one way or another.
It does not necessairly have to. It's just after every love.draw ( ), love.graphics.present ( ) is called, which IIRC (could be wrong) also resets everything to configured identity. Internally on low level, this is not mandatory, but this is generally what you want one way or another.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Testing the new things in 0.9.0
The color mask compliments shaders, without it every color component in the framebuffer is written to when you draw. It's usually used for pretty advanced techniques, like (re-)using different color components of a canvas for completely different things, or modifying the way things get blended into the active canvas.Santos wrote:I'm wondering, what are use cases for color masks?
I assume the effects which could be achieved with it would be somewhat limited since there are only so many permutations of the four color components, and couldn't the same effects also be achieved using shaders?
You can also use it inside a stencil function to draw while you stencil (since all color components are normally disabled right before the stencil function is called.)
It doesn't for me. Are you sure it does for you?Santos wrote:Also, why is the color mask state reset after ever frame, like coordinate transformations?
It doesn't - LÖVE resets the coordinate transformations every frame right before love.graphics.draw (when love.graphics.clear is called.)Raidho36 wrote:love.graphics.present ( ) is called, which IIRC (could be wrong) also resets everything to configured identity.
Re: Testing the new things in 0.9.0
will löve get microphone input?
i need it for my game called 9891 (9891)
for the multiplayer part in it.
i need it for my game called 9891 (9891)
for the multiplayer part in it.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Testing the new things in 0.9.0
It'd be cool to eventually get microphone input support, but last I heard some implementations of the audio library LÖVE uses had a lot of issues with it.
https://bitbucket.org/rude/love/issue/1 ... hone-input
https://bitbucket.org/rude/love/issue/1 ... hone-input
Re: Testing the new things in 0.9.0
so will it never be added?slime wrote:It'd be cool to eventually get microphone input support, but last I heard some implementations of the audio library LÖVE uses had a lot of issues with it.
https://bitbucket.org/rude/love/issue/1 ... hone-input
Re: Testing the new things in 0.9.0
Using Boolsheet's latest build, this affects the drawn image:
and this does not:
Code: Select all
function love.load()
image = love.graphics.newImage('image.png')
end
function love.draw()
love.graphics.setColorMask(false, true, false)
love.graphics.draw(image)
end
Code: Select all
function love.load()
image = love.graphics.newImage('image.png')
end
function love.draw()
love.graphics.draw(image)
love.graphics.setColorMask(false, true, false)
end
Re: Testing the new things in 0.9.0
Well duh, you're setting color mask after you completed the blitting.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Testing the new things in 0.9.0
love.graphics.setColorMask affects love.graphics.clear as well (which is called right before love.draw).
Here's what's happening.
Run loop in the first example:
Run loop in the second example:
Here's what's happening.
Run loop in the first example:
Code: Select all
1. clear r,g,b,a of screen
2. disable r,b channels for future draws/clears
3. draw image's g,a channels
4. present screen, only the g,a channels have anything in them
5. clear screen's g,a channels
6. draw image's g,a channels
7. present screen
repeat 5-7
Code: Select all
1. clear r,g,b,a of screen
2. draw image's r,g,b,a channels
3. disable r,b channels for future draws/clears
4. present screen
5. clear screen's g,a channels, leaving the previously drawn r,b of the image still there
6. draw image's g,a channels
7. present screen, including the "old" r,b of the image as well as the new g,a of the image
repeat 5-7
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests