feat(render): style, GLSL line/text pipelines, staging batches, bitmap font
This commit is contained in:
1 parent
9a086b7d69
commit
7cbc1c9955
22 files changed
+1535
No files matched your search
@@ -139,6 +139,7 @@ enum : GLenum {
|
||||
X(void, glUniform1i, (GLint, GLint)) \
|
||||
X(void, glUniform1f, (GLint, float)) \
|
||||
X(void, glUniform2f, (GLint, float, float)) \
|
||||
X(void, glUniform4f, (GLint, float, float, float, float)) \
|
||||
X(void, glUniform1fv, (GLint, GLsizei, const float*)) \
|
||||
X(void, glUniform2fv, (GLint, GLsizei, const float*)) \
|
||||
/* buffers */ \
|
||||
@@ -153,6 +154,7 @@ enum : GLenum {
|
||||
X(void, glBindVertexArray, (GLuint)) \
|
||||
X(void, glEnableVertexAttribArray, (GLuint)) \
|
||||
X(void, glVertexAttribPointer, (GLuint, GLint, GLenum, GLboolean, GLsizei, const void*)) \
|
||||
X(void, glVertexAttribDivisor, (GLuint, GLuint)) \
|
||||
/* drawing */ \
|
||||
X(void, glDrawArrays, (GLenum, GLint, GLsizei)) \
|
||||
X(void, glDrawArraysInstanced, (GLenum, GLint, GLsizei, GLsizei)) \
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <plot/core/color.hpp>
|
||||
#include <plot/core/status.hpp>
|
||||
#include <plot/core/types.hpp>
|
||||
#include <plot/gl/api.hpp>
|
||||
@@ -103,6 +104,13 @@ class Program final : public Handle<Program> {
|
||||
|
||||
/// Sets a two-component float uniform.
|
||||
void set_uniform(const char* name, Vec2 value) const noexcept;
|
||||
/// Sets a four-component float uniform, e.g. the colour of a pipeline.
|
||||
void set_uniform(const char* name, Color value) const noexcept;
|
||||
|
||||
/// Sets an integer uniform, e.g. a sampler's texture unit. Deliberately not
|
||||
/// an overload of the float setter: an untyped literal such as `0` must not
|
||||
/// turn a float uniform into a `glUniform1i` call.
|
||||
void set_uniform_int(const char* name, i32 value) const noexcept;
|
||||
|
||||
/// Exposed for the CRTP base.
|
||||
static void destroy(GLuint id) noexcept;
|
||||
|
||||
Reference in new issue
Block a user