51 lines
895 B
C++
51 lines
895 B
C++
#ifndef SPARROWRENDERER_H
|
|
#define SPARROWRENDERER_H
|
|
|
|
#include "glew.h"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <glm/vec3.hpp>
|
|
|
|
class Camera;
|
|
class Module;
|
|
class Scene;
|
|
class Pipeline;
|
|
|
|
class SparrowRenderer
|
|
{
|
|
public:
|
|
SparrowRenderer() :
|
|
scene(NULL),
|
|
modules(NULL),
|
|
clearColor(0)
|
|
{}
|
|
|
|
// main methods
|
|
void initGL(int w, int h, bool forceCrappy = false);
|
|
void resizeGL(int w, int h);
|
|
void renderGL();
|
|
|
|
static bool isModernOpenGLAvailable();
|
|
void setClearColor(glm::vec3 color) {clearColor=color;}
|
|
|
|
// pipeline methods
|
|
void setPipeline(Pipeline* pipeline);
|
|
|
|
// scene methods
|
|
void setScene(Scene* myScene);
|
|
Scene* getScene();
|
|
|
|
protected:
|
|
int width;
|
|
int height;
|
|
|
|
Scene* scene;
|
|
std::vector<Module*> *modules;
|
|
|
|
static bool modernOpenglAvailable;
|
|
|
|
glm::vec3 clearColor;
|
|
};
|
|
|
|
#endif // SPARROWRENDERER_H
|