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

merge (with bugs)

This commit is contained in:
VB
2017-04-24 19:08:08 +02:00
53 changed files with 2340 additions and 2233 deletions

View File

@@ -16,6 +16,7 @@ http://mozilla.org/MPL/2.0/.
#include "frustum.h"
#include "ground.h"
#include "shader.h"
#include "World.h"
// encapsulates basic rendering setup.
// for modern opengl this translates to a specific collection of glsl shaders,
@@ -37,6 +38,9 @@ class opengl_camera {
public:
// methods:
inline
void
update_frustum() { m_frustum.calculate(); }
inline
void
update_frustum(glm::mat4 &Projection, glm::mat4 &Modelview) { m_frustum.calculate(Projection, Modelview); }
bool
@@ -61,7 +65,8 @@ public:
// main draw call. returns false on error
bool
Render();
#ifndef EU07_USE_OLD_RENDERCODE
bool
Render( world_environment *Environment );
bool
Render( TGround *Ground );
bool
@@ -70,13 +75,18 @@ public:
Render( TModel3d *Model, material_data const *Material, double const Squaredistance );
bool
Render( TModel3d *Model, material_data const *Material, Math3D::vector3 const &Position, Math3D::vector3 const &Angle );
void
Render( TSubModel *Submodel, glm::mat4 m );
void Render(TSubModel *Submodel);
void Render_Alpha(TSubModel *Submodel);
bool
Render_Alpha( TDynamicObject *Dynamic );
bool
Render_Alpha( TModel3d *Model, material_data const *Material, double const Squaredistance );
bool
Render_Alpha( TModel3d *Model, material_data const *Material, Math3D::vector3 const &Position, Math3D::vector3 const &Angle );
#endif
void
Render_Alpha( TSubModel *Submodel, glm::mat4 m);
// maintenance jobs
void
Update( double const Deltatime);
@@ -119,7 +129,8 @@ private:
};
// methods
bool Init_caps();
bool
Init_caps();
// members
rendermode renderpass{ rendermode::color };
@@ -130,6 +141,9 @@ private:
double m_updateaccumulator{ 0.0 };
std::string m_debuginfo;
GLFWwindow *m_window{ nullptr };
texture_manager::size_type m_glaretextureid{ -1 };
texture_manager::size_type m_suntextureid{ -1 };
texture_manager::size_type m_moontextureid{ -1 };
};
extern opengl_renderer GfxRenderer;