git-svn-id: svn://db.shs.com.ru/libs@286 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -93,7 +93,11 @@ GLuint GLTextureManagerBase::loadTexture(const QString & path, bool ownership, b
|
||||
QImage image(p);
|
||||
if (bump) convertToNormal(image);
|
||||
//qDebug() << p << image.width() << image.height() << image.format() << bump;
|
||||
tid = currentQGLView->bindTexture(image, GL_TEXTURE_2D/*, GL_RGBA, QGLContext::MipmapBindOption*/);
|
||||
///tid = currentQGLView->bindTexture(image, GL_TEXTURE_2D/*, GL_RGBA, __GLContext__::MipmapBindOption*/);
|
||||
//GLuint tid = 0;
|
||||
GLuint _tid = tid;
|
||||
createGLTexture(_tid, image);///currentQGLView->bindTexture(image, GL_TEXTURE_2D);
|
||||
tid = _tid;
|
||||
if (tid == 0) {
|
||||
qDebug() << "[TextureManager] Can`t load" << p;
|
||||
return tid;
|
||||
@@ -108,7 +112,8 @@ GLuint GLTextureManagerBase::loadTexture(const QImage & im, bool ownership, bool
|
||||
if (im.isNull()) return 0;
|
||||
QImage image(im);
|
||||
if (bump) convertToNormal(image);
|
||||
GLuint tid = currentQGLView->bindTexture(image, GL_TEXTURE_2D);
|
||||
GLuint tid = 0;
|
||||
createGLTexture(tid, im);///currentQGLView->bindTexture(image, GL_TEXTURE_2D);
|
||||
if (tid == 0) {
|
||||
qDebug() << "[TextureManager] Can`t load image";
|
||||
return tid;
|
||||
@@ -190,7 +195,7 @@ Material::Material(): map_reflection(512) {
|
||||
}
|
||||
|
||||
|
||||
void Material::apply(QGLShaderProgram * prog) {
|
||||
void Material::apply(__GLShaderProgram__ * prog) {
|
||||
if (prog) {
|
||||
setUniformMaterial(prog, *this);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user