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

This commit is contained in:
2017-10-06 11:35:57 +00:00
parent e91cd3d941
commit 7d82c271e3
9 changed files with 136 additions and 102 deletions

View File

@@ -185,7 +185,7 @@ QMatrix4x4 getGLMatrix(GLenum matrix);
void setGLMatrix(QMatrix4x4 matrix);
inline void deleteGLTexture(GLuint & tex) {if (tex != 0) glDeleteTextures(1, &tex); tex = 0;}
#if QT_VERSION >= 0x050600
# define QGLCI QOpenGLExtraFunctions gf(QOpenGLContext::currentContext());
# define QGLCI if (!QOpenGLContext::currentContext()) return; QOpenGLExtraFunctions gf(QOpenGLContext::currentContext());
# define QGLC gf.
inline void glActiveTextureChannel(int channel) {QGLCI gf.glActiveTexture(GL_TEXTURE0 + channel);}
inline void glDisableTextures(int channels = 8) {QGLCI for (int i = channels - 1; i >= 0; --i) {glActiveTextureChannel(i); glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_CUBE_MAP);}}