-
Notifications
You must be signed in to change notification settings - Fork 5
Frame Buffers
Vlod edited this page Nov 28, 2023
·
1 revision
A frame buffer is just a texture that you can render into, and also because it is a texture, render it back into a quad!
Initialization:
gl2d::FrameBuffer fbo(width, height);
You can also resize it but you will lose your current data!
The clear() method clears the screen. The cleanup() method clears the resources allocated by the frame buffer.
To draw to a frame buffer, you just call flushFBO() instead of flush()!
To use the frame buffer's texture, you can just access it directly as a member!