mirror of
https://github.com/edubart/otclient.git
synced 2025-11-03 12:16:23 +01:00
Add texture abstract class
This commit is contained in:
committed by
Eduardo Bart
parent
ab9351196c
commit
b3b849000d
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user