git-svn-id: svn://db.shs.com.ru/libs@536 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-05-24 19:06:35 +00:00
parent 1082db07c6
commit 58fce3cd81
29 changed files with 394 additions and 599 deletions

View File

@@ -22,10 +22,7 @@
#include "glcamera.h"
#include "glshaders.h"
class GLRendererBase: public QObject
#if QT_VERSION >= 0x050600
, protected QOpenGLExtraFunctions
#endif
class GLRendererBase: public QObject , protected QOpenGLExtraFunctions
{
friend class QGLView;
Q_OBJECT
@@ -37,7 +34,7 @@ public:
struct RenderingParameters {
RenderingParameters();
void prepare();
void setUniform(__GLShaderProgram__ * prog);
void setUniform(QOpenGLShaderProgram * prog);
int pass;
int light_pass;
bool light;
@@ -52,7 +49,7 @@ public:
QMatrix4x4 viewproj_matrix, viewproj_matrix_i;
QMatrix3x3 normal_matrix;
QMatrix4x4 cam_offset_matrix;
__GLShaderProgram__ * cur_shader;
QOpenGLShaderProgram * cur_shader;
};
RenderingParameters rp;
@@ -71,7 +68,7 @@ protected:
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 & rpl);
void renderShadow(Light * l, __GLShaderProgram__ * prog = 0, QMatrix4x4 mat = QMatrix4x4());
void renderShadow(Light * l, QOpenGLShaderProgram * prog = 0, QMatrix4x4 mat = QMatrix4x4());
void renderSingleShadow(GLObjectBase & o, RenderingParameters & rpl);
QGLView & view;