16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 06:59:18 +02:00

milek7/sim branch opengl 3.3 renderer import

This commit is contained in:
tmj-fstate
2019-10-26 15:17:09 +02:00
parent d24fccb4d7
commit 0fd23a53d9
90 changed files with 7629 additions and 549 deletions

View File

@@ -9,13 +9,6 @@ http://mozilla.org/MPL/2.0/.
#pragma once
#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "GL/glew.h"
#ifdef _WIN32
#include "GL/wglew.h"
#endif
#include "ResourceManager.h"
namespace gfx {
@@ -25,6 +18,7 @@ struct basic_vertex {
glm::vec3 position; // 3d space
glm::vec3 normal; // 3d space
glm::vec2 texture; // uv space
glm::vec4 tangent; // xyz - tangent, w - handedness
basic_vertex() = default;
basic_vertex( glm::vec3 Position, glm::vec3 Normal, glm::vec2 Texture ) :
@@ -53,6 +47,8 @@ struct stream_units {
using vertex_array = std::vector<basic_vertex>;
void calculate_tangent( vertex_array &vertices, int type );
// generic geometry bank class, allows storage, update and drawing of geometry chunks
struct geometry_handle {