git-svn-id: svn://db.shs.com.ru/libs@46 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -28,10 +28,13 @@ class GLRendererBase: public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
GLRendererBase(QGLView * view_);
|
||||
virtual void prepareScene() {;}
|
||||
virtual void renderScene() = 0;
|
||||
|
||||
protected:
|
||||
struct RenderingParameters {
|
||||
void prepare();
|
||||
void setUniform(QGLShaderProgram * prog);
|
||||
int pass;
|
||||
int light_pass;
|
||||
bool light;
|
||||
@@ -41,8 +44,10 @@ protected:
|
||||
bool prev_fog;
|
||||
GLuint prev_tex[32];
|
||||
void * shaders;
|
||||
QMatrix4x4 view_matrix;
|
||||
QMatrix4x4 proj_matrix;
|
||||
QMatrix4x4 view_matrix, view_matrix_i;
|
||||
QMatrix4x4 proj_matrix, proj_matrix_i;
|
||||
QMatrix4x4 viewproj_matrix, viewproj_matrix_i;
|
||||
QMatrix3x3 normal_matrix;
|
||||
QGLShaderProgram * cur_shader;
|
||||
};
|
||||
|
||||
@@ -58,8 +63,9 @@ protected:
|
||||
void setupLights(int pass, int lights_per_pass);
|
||||
inline void applyFilteringParameters();
|
||||
void renderObjects(int pass, int light_pass, void * shaders = 0, bool textures = true, bool light = true, bool fog = true);
|
||||
void renderSingleObject(GLObjectBase & o, RenderingParameters & rp);
|
||||
void renderSingleObject(GLObjectBase & o, RenderingParameters & rpl);
|
||||
|
||||
RenderingParameters rp;
|
||||
QGLView & view;
|
||||
QImage white_image, violent_image;
|
||||
GLuint white_image_id, violent_image_id;
|
||||
|
||||
Reference in New Issue
Block a user