chunkstream version fixedleaselication
git-svn-id: svn://db.shs.com.ru/libs@3 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -70,8 +70,12 @@ void createGLTexture(GLuint & tex, int width, int height, const GLenum & format,
|
||||
//glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_COMPONENT16 || format == GL_DEPTH_COMPONENT24 || format == GL_DEPTH_COMPONENT32)
|
||||
glTexImage2D(target, 0, format, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 0);
|
||||
else
|
||||
glTexImage2D(target, 0, format, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
|
||||
else {
|
||||
int t = GL_UNSIGNED_BYTE;
|
||||
if (format == GL_RGB32F || format == GL_RGB16F)
|
||||
t = GL_FLOAT;
|
||||
glTexImage2D(target, 0, format, width, height, 0, GL_RGBA, t, 0);
|
||||
}
|
||||
//qDebug() << QString::number(glGetError(), 16);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user