You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
1.1 KiB

#ifndef BOXCOMPONENT_H
#define BOXCOMPONENT_H
#include <GL/glew.h>
#include "Component.h"
class BoxComponent : public Component {
protected:
float vertices[20] = {
0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
0.0f, 0.0f, 0.0f, 1.0f, 1.0f,
0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f
};
unsigned char data[1][1][4];
GLuint vertexArrayObject = 0;
GLuint vertexBufferObject = 0;
GLuint elementBufferObject = 0;
GLuint texture = 0;
// FIXME: deprecate these
int initialX;
int initialY;
int initialWidth;
int initialHeight;
int initialWindowWidth;
int initialWindowHeight;
public:
BoxComponent();
BoxComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const unsigned int hexColor, const int passedWindowWidth, const int passedWindowHeight);
~BoxComponent();
void changeColor(const unsigned int hexColor);
virtual void render();
virtual void resize(const int passedWindowWidth, const int passedWindowHeight);
// FIXME: create: createVerices, updateVetices, createTexture, updateTexture
};
#endif