This commit is contained in:
2026-11-02 19:35:36 -05:00
parent a6103e453d
commit 7b32ad674e
52 changed files with 3285 additions and 1488 deletions
+3 -9
View File
@@ -8,6 +8,7 @@
#include "QuadVertices.h"
#include "shaderClass.h"
#include "texture.h"
#include "SurfaceTexture.h"
#include "t2d.h"
#include "font.h"
#include "RenderSystem.h"
@@ -190,7 +191,7 @@ public:
class ImageBox : public Box {
public:
Texture* tex = nullptr;
SurfaceTexture surface;
ImageBox() {
shadertype = ShaderType::ImageBoxShader;
@@ -208,14 +209,7 @@ public:
ShaderProgram.Set2F("pixelScale", t2d.pixelsize);
ShaderProgram.Set2F("pixelPos", t2d.pixelposition);
ShaderProgram.Set1F("rounding", rounding);
glActiveTexture(GL_TEXTURE0);
if (tex) {
glBindTexture(GL_TEXTURE_2D, tex->ID);
ShaderProgram.SetInt("tex", 0);
}
else {
glBindTexture(GL_TEXTURE_2D, 0);
}
surface.Apply(ShaderProgram, 0, glm::vec3(t2d.pixelsize, 0.0f));
boxVAO.Bind();
glDrawArrays(GL_TRIANGLES, 0, 6);
boxVAO.Unbind();