74#if __cplusplus >= 201703L
81 void draw(
double x,
double y)
const;
90 [[deprecated(
"use jngl::FrameBuffer::Context::clear(Color) instead")]]
Contains jngl::Color class.
Contains jngl::Finally class.
Contains jngl::Mat3 class.
Contains jngl::Pixels class.
Contains jngl::Vec2 class.
Image framebuffer object which can be rendered on.
void draw(Vec2 position, const ShaderProgram *=nullptr) const
Draws the framebuffer image to the screen.
static void clear()
Clear the framebuffer with the color set by jngl::setBackgroundColor.
FrameBuffer(Pixels width, Pixels height)
Creates a framebuffer object with width times height actual pixels.
void drawMesh(const std::vector< Vertex > &vertexes, const ShaderProgram *=nullptr) const
Draws a list of triangles with the framebuffer's texture on it.
Context use() const
Starts drawing on the FrameBuffer as long as Context is alive.
FrameBuffer(ScaleablePixels width, ScaleablePixels height)
Creates a framebuffer object with width times height scalable pixels.
uint32_t getTextureID() const
Returns the OpenGL texture ID of the associated image buffer.
Vec2 getSize() const
Returns the size in screen pixels.
FrameBuffer(std::array< Pixels, 2 > size)
Creates a framebuffer object with size[0] times size[1] pixels.
Scale-dependent pixels, corresponds to actual pixels on the screen.
Object representing a RGB color, new version of jngl::Color (which will be deprecated in the future)
Scale-independent pixels, also called "screen pixels".
Linked vertex and fragment shaders.
jngl::Mat3 modelview()
Returns a copy of the global ModelView matrix.
Lifetime object when the FrameBuffer is in use.
void clear(Rgb color)
Clear the framebuffer with color.
void clear()
Clear the framebuffer with a transparent background.