mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-08 03:42:35 +01:00
36 lines
830 B
C++
36 lines
830 B
C++
#ifndef _GTARENDERER_HPP_
|
|
#define _GTARENDERER_HPP_
|
|
|
|
#define GLEW_STATIC
|
|
#include <GL/glew.h>
|
|
#include <memory>
|
|
|
|
#include <renderwure/render/ViewCamera.hpp>
|
|
|
|
class Model;
|
|
class GTAEngine;
|
|
class GTARenderer
|
|
{
|
|
public:
|
|
|
|
GTARenderer();
|
|
|
|
ViewCamera camera;
|
|
|
|
/// The numer of things rendered by the last renderWorld
|
|
size_t rendered;
|
|
size_t culled;
|
|
|
|
GLuint uniModel, uniProj, uniView, uniCol;
|
|
GLuint posAttrib, texAttrib;
|
|
GLuint worldProgram;
|
|
GLuint vehicleProgram;
|
|
|
|
void renderWorld(GTAEngine* engine);
|
|
|
|
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);
|
|
};
|
|
|
|
#endif |