stuff
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user