Add texture abstract class

This commit is contained in:
Henrique Santiago
2013-03-03 03:32:49 -03:00
committed by Eduardo Bart
parent ab9351196c
commit b3b849000d
13 changed files with 318 additions and 230 deletions

View File

@@ -26,6 +26,7 @@
#include <framework/graphics/framebuffermanager.h>
#include <framework/graphics/painter.h>
#include <framework/graphics/image.h>
#include <framework/graphics/ogl/textureogl.h>
enum {
MAX_LIGHT_INTENSITY = 8,
@@ -61,7 +62,7 @@ TexturePtr LightView::generateLightBubble(float centerFactor)
}
}
TexturePtr tex = TexturePtr(new Texture(lightImage, true));
TexturePtr tex = TexturePtr(new TextureOGL(lightImage, true));
tex->setSmooth(true);
return tex;
}

View File

@@ -29,6 +29,7 @@
#include <framework/graphics/painter.h>
#include <framework/graphics/image.h>
#include <framework/graphics/framebuffermanager.h>
#include <framework/graphics/ogl/textureogl.h>
#include <framework/core/resourcemanager.h>
#include <framework/core/filestream.h>
#include <zlib.h>
@@ -65,7 +66,7 @@ void MinimapBlock::update()
if(shouldDraw) {
if(!m_texture) {
m_texture = TexturePtr(new Texture(image, true));
m_texture = TexturePtr(new TextureOGL(image, true));
} else {
m_texture->uploadPixels(image, true);
}

View File

@@ -28,6 +28,7 @@
#include <framework/graphics/graphics.h>
#include <framework/graphics/texture.h>
#include <framework/graphics/image.h>
#include <framework/graphics/ogl/textureogl.h>
#include <framework/graphics/texturemanager.h>
#include <framework/core/filestream.h>
#include <framework/otml/otml.h>
@@ -283,7 +284,7 @@ const TexturePtr& ThingType::getTexture(int animationPhase)
}
}
}
animationPhaseTexture = TexturePtr(new Texture(fullImage, true));
animationPhaseTexture = TexturePtr(new TextureOGL(fullImage, true));
animationPhaseTexture->setSmooth(true);
}
return animationPhaseTexture;