feat: basic improvements, unused includes
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#include "renderer/debug.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void MessageCallback(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
@ -19,4 +21,4 @@ void MessageCallback(GLenum source,
|
||||
// std::cerr << "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
|
||||
// (type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : ""),
|
||||
// type, severity, message);
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,6 @@
|
||||
#include "renderer/engine.h"
|
||||
#include "window/event.h"
|
||||
|
||||
#include "IO/file_manager.h"
|
||||
#include "renderer/shader.h"
|
||||
#include "renderer/wavefront.h"
|
||||
|
||||
std::unique_ptr<IApplication> Engine::s_app = nullptr;
|
||||
|
@ -1,6 +1,10 @@
|
||||
#include "renderer/mesh.h"
|
||||
|
||||
Mesh::Mesh() {
|
||||
m_vao = 0;
|
||||
m_vbo = 0;
|
||||
m_ebo = 0;
|
||||
|
||||
glGenVertexArrays(1, &m_vao);
|
||||
glGenBuffers(1, &m_vbo);
|
||||
glGenBuffers(1, &m_ebo);
|
||||
@ -21,8 +25,7 @@ Mesh::Mesh() {
|
||||
glBindVertexArray(0);
|
||||
}
|
||||
|
||||
void Mesh::Upload()
|
||||
{
|
||||
void Mesh::Upload() const {
|
||||
glBindVertexArray(m_vao);
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, m_vbo);
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <iostream>
|
||||
#include <GL/glew.h>
|
||||
#include "renderer/shader.h"
|
||||
|
||||
Shader::Shader()
|
||||
|
Reference in New Issue
Block a user