2013-07-02 09:53:23 +02:00
|
|
|
#ifndef _GTARENDERER_HPP_
|
|
|
|
#define _GTARENDERER_HPP_
|
2013-07-03 10:46:07 +02:00
|
|
|
|
|
|
|
#define GLEW_STATIC
|
|
|
|
#include <GL/glew.h>
|
2013-07-04 03:40:47 +02:00
|
|
|
#include <memory>
|
2013-07-03 10:46:07 +02:00
|
|
|
|
|
|
|
#include <renderwure/render/ViewCamera.hpp>
|
2013-07-02 09:53:23 +02:00
|
|
|
|
2013-07-04 03:40:47 +02:00
|
|
|
class Model;
|
2013-07-02 09:53:23 +02:00
|
|
|
class GTAEngine;
|
|
|
|
class GTARenderer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
GTARenderer();
|
|
|
|
|
|
|
|
ViewCamera camera;
|
|
|
|
|
2013-07-02 10:58:01 +02:00
|
|
|
/// The numer of things rendered by the last renderWorld
|
|
|
|
size_t rendered;
|
|
|
|
size_t culled;
|
2013-07-03 10:46:07 +02:00
|
|
|
|
2013-07-04 12:01:23 +02:00
|
|
|
GLuint uniModel, uniProj, uniView, uniCol, uniAmbientCol, uniSunDirection;
|
|
|
|
GLuint posAttrib, normalAttrib, texAttrib;
|
2013-07-03 10:46:07 +02:00
|
|
|
GLuint worldProgram;
|
2013-07-04 01:23:12 +02:00
|
|
|
GLuint vehicleProgram;
|
2013-07-02 10:58:01 +02:00
|
|
|
|
2013-07-02 09:53:23 +02:00
|
|
|
void renderWorld(GTAEngine* engine);
|
2013-07-04 03:40:47 +02:00
|
|
|
|
|
|
|
void renderNamedFrame(GTAEngine* engine, const std::unique_ptr<Model>&, const glm::vec3& pos, const glm::quat& rot, const glm::vec3& scale, const std::string& name);
|
|
|
|
|
|
|
|
void renderObject(GTAEngine* engine, const std::unique_ptr<Model>&, const glm::vec3& pos, const glm::quat& rot, const glm::vec3& scale);
|
2013-07-02 09:53:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|