28#ifndef HPL_SDL_TEXTURE_H
29#define HPL_SDL_TEXTURE_H
31#include "common/scummsys.h"
32#include "hpl1/engine/graphics/Texture.h"
33#include "hpl1/engine/graphics/bitmap2D.h"
34#include "hpl1/engine/impl/LowLevelGraphicsSDL.h"
35#include "hpl1/opengl.h"
41class cSDLTexture :
public iTexture {
43 cSDLTexture(
const tString &asName,
Graphics::PixelFormat *apPxlFmt, iLowLevelGraphics *apLowLevelGraphics,
44 eTextureType aType,
bool abUseMipMaps, eTextureTarget aTarget,
45 bool abCompress =
false);
48 bool CreateFromBitmap(Bitmap2D *pBmp);
50 bool CreateAnimFromBitmapVec(tBitmap2DVec *avBitmaps);
52 bool CreateCubeFromBitmapVec(tBitmap2DVec *avBitmaps);
53 bool Create(
unsigned int alWidth,
unsigned int alHeight, cColor aCol);
55 bool CreateFromArray(
unsigned char *apPixelData,
int alChannels,
const cVector3l &avSize);
57 float GetGamma() {
return 0; }
58 void SetGamma(
float afGamma) {}
59 int GetHandle() {
return (
int)mvTextureHandles[0]; }
61 void SetFilter(eTextureFilter aFilter);
62 void SetAnisotropyDegree(
float afX);
64 void SetWrapS(eTextureWrap aMode);
65 void SetWrapT(eTextureWrap aMode);
66 void SetWrapR(eTextureWrap aMode);
68 void Update(
float afTimeStep);
75 void SetTimeCount(
float afX);
76 int GetCurrentLowlevelHandle();
80 unsigned int GetTextureHandle();
84 bool CreateFromBitmapToHandle(Bitmap2D *pBmp,
int alHandleIdx);
86 GLenum InitCreation(
int alHandleIdx);
87 void PostCreation(GLenum aGLTarget);
89 GLenum GetGLWrap(eTextureWrap aMode);
91 tUIntVec mvTextureHandles;
93 cLowLevelGraphicsSDL *mpGfxSDL;