mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 13:39:18 +02:00
merge (incomplete)
This commit is contained in:
27
renderer.h
27
renderer.h
@@ -14,6 +14,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "lightarray.h"
|
||||
#include "dumb3d.h"
|
||||
#include "frustum.h"
|
||||
#include "world.h"
|
||||
#include "memcell.h"
|
||||
#include "ground.h"
|
||||
#include "shader.h"
|
||||
#include "World.h"
|
||||
@@ -42,7 +44,7 @@ public:
|
||||
update_frustum() { m_frustum.calculate(); }
|
||||
inline
|
||||
void
|
||||
update_frustum(glm::mat4 &Projection, glm::mat4 &Modelview) { m_frustum.calculate(Projection, Modelview); }
|
||||
update_frustum(glm::mat4 const &Projection, glm::mat4 const &Modelview) { m_frustum.calculate(Projection, Modelview); }
|
||||
bool
|
||||
visible( bounding_area const &Area ) const;
|
||||
bool
|
||||
@@ -59,6 +61,9 @@ class opengl_renderer {
|
||||
public:
|
||||
// types
|
||||
|
||||
// destructor
|
||||
~opengl_renderer() { gluDeleteQuadric( m_quadric ); }
|
||||
|
||||
// methods
|
||||
bool
|
||||
Init( GLFWwindow *Window );
|
||||
@@ -69,6 +74,12 @@ public:
|
||||
Render( world_environment *Environment );
|
||||
bool
|
||||
Render( TGround *Ground );
|
||||
bool
|
||||
Render( TGroundRect *Groundcell );
|
||||
bool
|
||||
Render( TSubRect *Groundsubcell );
|
||||
bool
|
||||
Render( TGroundNode *Node );
|
||||
bool
|
||||
Render( TDynamicObject *Dynamic );
|
||||
bool
|
||||
@@ -76,9 +87,17 @@ public:
|
||||
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);
|
||||
Render( TSubModel *Submodel );
|
||||
void Render(TSubModel *Submodel, glm::mat4 m);
|
||||
void Render_Alpha(TSubModel *Submodel);
|
||||
void
|
||||
Render( TMemCell *Memcell );
|
||||
bool
|
||||
Render_Alpha( TGround *Ground );
|
||||
bool
|
||||
Render_Alpha( TSubRect *Groundsubcell );
|
||||
bool
|
||||
Render_Alpha( TGroundNode *Node );
|
||||
bool
|
||||
Render_Alpha( TDynamicObject *Dynamic );
|
||||
bool
|
||||
@@ -144,6 +163,8 @@ private:
|
||||
texture_manager::size_type m_glaretextureid{ -1 };
|
||||
texture_manager::size_type m_suntextureid{ -1 };
|
||||
texture_manager::size_type m_moontextureid{ -1 };
|
||||
GLUquadricObj *m_quadric; // helper object for drawing debug mode scene elements
|
||||
|
||||
};
|
||||
|
||||
extern opengl_renderer GfxRenderer;
|
||||
|
||||
Reference in New Issue
Block a user