Squashed 'deps/nostalgia/' changes from 37cfa927..f847289b

f847289b [glutils] Cleanup
94b0020d [nostalgia,olympic] Cleanup
c54c0bad [teagba] Cleanup
b9ffae02 [nostalgia/gfx] Cleanup
003f3e01 [nostalgia] Update release notes
9028e74a [nostalgia/gfx/studio/tilesheet] Disable paste when nothing is selected
f5ccab5f [studio] Cleanup

git-subtree-dir: deps/nostalgia
git-subtree-split: f847289bd493e3318eb6fc1d09ea216e140899aa
This commit is contained in:
2025-06-23 20:49:01 -05:00
parent 6bbcae10cc
commit 9b5f7886ca
60 changed files with 370 additions and 345 deletions

View File

@ -89,7 +89,7 @@ struct GLObject: public Base {
return id;
}
constexpr operator const GLuint&() const noexcept {
constexpr operator GLuint const&() const noexcept {
return id;
}
@ -135,7 +135,7 @@ struct FrameBuffer {
return fbo.id;
}
constexpr operator const GLuint&() const noexcept {
constexpr operator GLuint const&() const noexcept {
return fbo.id;
}
@ -158,14 +158,14 @@ struct FrameBuffer {
class FrameBufferBind {
private:
static const FrameBuffer *s_activeFb;
const FrameBuffer *m_restoreFb = nullptr;
static FrameBuffer const *s_activeFb;
FrameBuffer const *m_restoreFb = nullptr;
public:
explicit FrameBufferBind(const FrameBuffer &fb) noexcept;
explicit FrameBufferBind(FrameBuffer const &fb) noexcept;
~FrameBufferBind() noexcept;
};
void bind(const FrameBuffer &fb) noexcept;
void bind(FrameBuffer const &fb) noexcept;
struct ShaderVarSet {
GLsizei len{};
@ -176,7 +176,7 @@ struct ProgramSource {
ox::Vector<glutils::ShaderVarSet> const shaderParams;
GLsizei const rowLen = [this] {
GLsizei len{};
for (auto const&v : shaderParams) {
for (auto const &v : shaderParams) {
len += v.len;
}
return len;
@ -187,23 +187,23 @@ struct ProgramSource {
ox::String const geomShader{};
};
ox::Result<GLProgram> buildShaderProgram(ProgramSource const&src) noexcept;
ox::Result<GLProgram> buildShaderProgram(ProgramSource const &src) noexcept;
ox::Result<GLProgram> buildShaderProgram(
ox::CStringView const&vert,
ox::CStringView const&frag,
ox::CStringView const&geo = "") noexcept;
ox::CStringView const &vert,
ox::CStringView const &frag,
ox::CStringView const &geo = "") noexcept;
void setupShaderParams(
GLProgram const&shader,
ox::Vector<ShaderVarSet> const&vars,
GLProgram const &shader,
ox::Vector<ShaderVarSet> const &vars,
GLsizei vertexRowLen) noexcept;
void setupShaderParams(GLProgram const&shader, ox::Vector<ShaderVarSet> const&vars) noexcept;
void setupShaderParams(GLProgram const &shader, ox::Vector<ShaderVarSet> const &vars) noexcept;
glutils::GLVertexArray generateVertexArrayObject() noexcept;
GLVertexArray generateVertexArrayObject() noexcept;
glutils::GLBuffer generateBuffer() noexcept;
GLBuffer generateBuffer() noexcept;
[[nodiscard]]
FrameBuffer generateFrameBuffer(int width, int height) noexcept;
@ -215,20 +215,20 @@ void resizeFrameBuffer(FrameBuffer &fb, int width, int height) noexcept;
*/
void resizeInitFrameBuffer(FrameBuffer &fb, int width, int height) noexcept;
void resizeInitFrameBuffer(FrameBuffer &fb, ox::Size const&sz) noexcept;
void resizeInitFrameBuffer(FrameBuffer &fb, ox::Size const &sz) noexcept;
struct BufferSet {
glutils::GLVertexArray vao;
glutils::GLBuffer vbo;
glutils::GLBuffer ebo;
glutils::GLTexture tex;
GLVertexArray vao;
GLBuffer vbo;
GLBuffer ebo;
GLTexture tex;
ox::Vector<float> vertices;
ox::Vector<GLuint> elements;
};
void sendVbo(BufferSet const&bs) noexcept;
void sendVbo(BufferSet const &bs) noexcept;
void sendEbo(BufferSet const&bs) noexcept;
void sendEbo(BufferSet const &bs) noexcept;
void clearScreen() noexcept;