add crosshair

blockgen with sin
This commit is contained in:
2022-02-10 18:24:56 +01:00
parent 68f28a3294
commit 360a1cc79d
12 changed files with 93 additions and 26 deletions

View File

@ -97,3 +97,15 @@ double Camera::getxangle() const {
double Camera::getyangle() const {
return ry;
}
double Camera::getXpos() {
return x;
}
double Camera::getYpos() {
return y;
}
double Camera::getZpos() {
return z;
}

View File

@ -19,6 +19,10 @@ public:
void setPos(double x, double y, double z);
void addPos(double x, double y, double z);
double getXpos();
double getYpos();
double getZpos();
void setRotation(double rotx, double roty);
void addRotaion(double rotx, double roty);

View File

@ -12,6 +12,7 @@
#include <fstream>
#include <vector>
#include <sstream>
#include <iostream>
unsigned int Shader::compileShader(const char *source, unsigned int type) const {
unsigned int shaderid = glCreateShader(type);

View File

@ -7,6 +7,12 @@
#include <unordered_map>
#include <string>
#include <stdexcept>
#include <glm/ext/matrix_float4x4.hpp>
#include <iostream>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
class Shader {
private:
@ -31,7 +37,6 @@ public:
void Bind() const;
unsigned getHandle() const;
unsigned getUniformHandle(std::string name);
private: