Browse Source

move indicies out, reduce texture size, initial info vars, move pointToViewport/distanceToViewport/resize out, default constructor

pull/2/head
Odilitime 5 years ago
parent
commit
84a069adb0
  1. 19
      src/graphics/components/BoxComponent.h

19
src/graphics/components/BoxComponent.h

@ -12,22 +12,23 @@ protected: @@ -12,22 +12,23 @@ protected:
0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f
};
const unsigned int indices[6] = {
0, 1, 2,
0, 2, 3
};
unsigned char data[1024][1024][4];
unsigned char data[1][1][4];
GLuint vertexArrayObject = 0;
GLuint vertexBufferObject = 0;
GLuint elementBufferObject = 0;
GLuint texture = 0;
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 int passedWindowWidth, const int passedWindowHeight);
~BoxComponent();
void render();
void resize();
void pointToViewport(float &rawX, float &rawY, const int passedWindowWidth, const int passedWindowHeight) const ;
void distanceToViewport(float &rawX, float &rawY, const int passedWindowWidth, const int passedWindowHeight) const ;
virtual void render();
//void resize(const int passedWindowWidth, const int passedWindowHeight);
};
#endif

Loading…
Cancel
Save