Initial commit
This commit is contained in:
commit
2193fa6696
390 changed files with 138391 additions and 0 deletions
25
classes/colors.cpp
Normal file
25
classes/colors.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "../headers/colors.h"
|
||||
|
||||
int COLORS::hexToDec(char num[]) {
|
||||
int len = strlen(num);
|
||||
int base = 1;
|
||||
int temp = 0;
|
||||
for (int i=len-1; i>=0; i--) {
|
||||
if (num[i]>='0' && num[i]<='9') {
|
||||
temp += (num[i] - 48)*base;
|
||||
base = base * 16;
|
||||
}
|
||||
else if (num[i]>='A' && num[i]<='F') {
|
||||
temp += (num[i] - 55)*base;
|
||||
base = base*16;
|
||||
}
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
// int COLORS::toRGB(char hexcode[]) {
|
||||
// std::vector rgb;
|
||||
// for(int i = 0; i < 3; i++) {
|
||||
// rgb.push_back(hexToDec(hexcode[i*2] + hexcode[i*2+1]));
|
||||
// }
|
||||
// }
|
0
classes/controls.cpp
Normal file
0
classes/controls.cpp
Normal file
21
classes/renderer.cpp
Normal file
21
classes/renderer.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "../headers/renderer.h"
|
||||
#include "colors.cpp"
|
||||
#include "../shaderloader.cpp"
|
||||
|
||||
void drawCube() {
|
||||
// here go something that make cube draw yes
|
||||
return;
|
||||
}
|
||||
|
||||
void RENDERER::render(GLFWwindow *window)
|
||||
{
|
||||
// Here's where we do the rendering itself
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor3f(1.0f, 0.0f, 0.0f);
|
||||
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);
|
||||
glEnd();
|
||||
|
||||
// This will write the current frame to the screen
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
return;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue