What do framebuffers DO?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
What do framebuffers DO?
Can I, for instance, render some stuff to a framebuffer, then manipulate them? Say, render them with a mask? That'd be handy. If not, then what, exactly, is the point of using a framebuffer instead of just drawing stuff (or drawing stuff to a spritebatch)?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: What do framebuffers DO?
A SpriteBatch is a very different beast. They are useful for things like tile sets.Taehl wrote:If not, then what, exactly, is the point of using a framebuffer instead of just drawing stuff (or drawing stuff to a spritebatch)?
To a Framebuffer, you can draw anything you can draw to screen as well. What's nice is that you only have to draw this once -- which I use in AStrat, where the the map is created by drawing pixels (rectangles, actually), which would be excruciatingly slow if not for Framebuffers. And that's just the beginning.
Help us help you: attach a .love.
Re: What do framebuffers DO?
<ot>What's that?</ot>Robin wrote:which I use in AStrat
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: What do framebuffers DO?
It's a fractal animation he made which crashes after ten seconds.
So, the only difference between using a framebuffer and drawing directly to the screen is that framebuffers aren't cleared after every frame?
So, the only difference between using a framebuffer and drawing directly to the screen is that framebuffers aren't cleared after every frame?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: What do framebuffers DO?
This: And it doesn't crash any more, btw.Mud wrote:<ot>What's that?</ot>Robin wrote:which I use in AStrat
If you mean what I think you mean, then yes. They are very, very useful. I use Framebuffers in RichText as well.Taehl wrote:So, the only difference between using a framebuffer and drawing directly to the screen is that framebuffers aren't cleared after every frame?
Help us help you: attach a .love.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: What do framebuffers DO?
Okay, so, does Love have any way of letting me get at OpenGL's fragment shaders?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: What do framebuffers DO?
With the current blendmodes it is difficult. You can use the subtractive mode to have something like an inverse stencil/hole puncher:Taehl wrote:Can I, for instance, render some stuff to a framebuffer, then manipulate them? Say, render them with a mask?
1. Paint with alpha 255 (and possibly the color white) what you don't want to have on the screen to a framebuffer.
2. Paint something to the screen.
3. Set blendmode to subtractive.
4. Paint framebuffer.
5. ???
6. Profit.
Not yet, but if you can build love from source there is love-glsl. There is also a feature request.Taehl wrote:Okay, so, does Love have any way of letting me get at OpenGL's fragment shaders?
If you need help using it, just can just PM me
Re: What do framebuffers DO?
a-awesomeRobin wrote:This: And it doesn't crash any more, btw.Mud wrote:<ot>What's that?</ot>Robin wrote:which I use in AStrat
(an hour later)
best waste of an hour ever
Re: What do framebuffers DO?
Clearing the screen is done with love.graphics.clear() and love.graphics.present(). They are called from the default love.run function. The default love.run function does not draw/clear framebuffers.Taehl wrote:So, the only difference between using a framebuffer and drawing directly to the screen is that framebuffers aren't cleared after every frame?
Hello, I am not dead.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: What do framebuffers DO?
Thanks. I want to get the different nations to attack each other, but I have no idea how to do that in a way that doesn't look awful as of yet.thelinx wrote:a-awesome
(an hour later)
best waste of an hour ever
Help us help you: attach a .love.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 22 guests