Removed some useless files
This commit is contained in:
parent
7449434f5c
commit
372867de67
@ -1,7 +1,6 @@
|
||||
#include "Batch2D.h"
|
||||
#include "Mesh.h"
|
||||
#include "Texture.h"
|
||||
#include "Sprite.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
@ -284,23 +283,6 @@ void Batch2D::rect(
|
||||
vertex(v1, glm::vec2(0, 0), r2,g2,b2,1.0f);
|
||||
}
|
||||
|
||||
void Batch2D::sprite(Sprite* sprite) {
|
||||
glm::vec2 position = sprite->position;
|
||||
glm::vec2 size = sprite->size;
|
||||
glm::vec2 origin = sprite->origin;
|
||||
texture(sprite->texture);
|
||||
rect(
|
||||
position.x, position.y,
|
||||
size.x, size.y,
|
||||
origin.x, origin.y,
|
||||
sprite->angle,
|
||||
sprite->region,
|
||||
sprite->flippedX,
|
||||
sprite->flippedY,
|
||||
sprite->color
|
||||
);
|
||||
}
|
||||
|
||||
void Batch2D::sprite(float x, float y, float w, float h, const UVRegion& region, glm::vec4 tint){
|
||||
rect(x, y, w, h, region.u1, region.v1, region.u2-region.u1, region.v2-region.v1, tint.r, tint.g, tint.b, tint.a);
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
|
||||
class Mesh;
|
||||
class Texture;
|
||||
class Sprite;
|
||||
|
||||
class Batch2D {
|
||||
float* buffer;
|
||||
@ -40,7 +39,6 @@ public:
|
||||
void texture(Texture* texture);
|
||||
void untexture();
|
||||
void sprite(float x, float y, float w, float h, const UVRegion& region, glm::vec4 tint);
|
||||
void sprite(Sprite* sprite);
|
||||
void sprite(float x, float y, float w, float h, int atlasRes, int index, glm::vec4 tint);
|
||||
void point(float x, float y, float r, float g, float b, float a);
|
||||
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
#include "Sprite.h"
|
||||
|
||||
#include "Texture.h"
|
||||
|
||||
Sprite::Sprite(glm::vec2 position, glm::vec2 size, Texture* texture)
|
||||
: position(position),
|
||||
size(size),
|
||||
origin(0.5f, 0.5f),
|
||||
color(1.0f, 1.0f, 1.0f, 1.0f),
|
||||
angle(0.0f),
|
||||
texture(texture),
|
||||
region() {
|
||||
}
|
||||
|
||||
Sprite::~Sprite() {
|
||||
}
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
#ifndef SRC_GRAPHICS_SPRITE_H_
|
||||
#define SRC_GRAPHICS_SPRITE_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "UVRegion.h"
|
||||
|
||||
class Texture;
|
||||
|
||||
class Sprite {
|
||||
public:
|
||||
glm::vec2 position;
|
||||
glm::vec2 size;
|
||||
glm::vec2 origin;
|
||||
glm::vec4 color;
|
||||
float angle;
|
||||
bool flippedX = false;
|
||||
bool flippedY = false;
|
||||
Texture* texture;
|
||||
UVRegion region;
|
||||
|
||||
Sprite(glm::vec2 position, glm::vec2 size, Texture* texture);
|
||||
virtual ~Sprite();
|
||||
|
||||
void setTexture(Texture* texture) {
|
||||
this->texture = texture;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* SRC_GRAPHICS_SPRITE_H_ */
|
||||
Loading…
x
Reference in New Issue
Block a user