33 #if ( defined DC_BACKENDS_SHADERGL_X11 || defined DC_BACKENDS_SHADERGL_WIN32 )
35 #ifndef H_DC_BACKENDS_TEXTUREMANAGER
36 #define H_DC_BACKENDS_TEXTUREMANAGER
38 #include <Dynacoe/Backends/Renderer/ShaderGL_Multi.h>
44 class TextureManager {
49 int NewTexture(
int w,
int h, GLubyte * data,
int newTex);
50 int NewTexture(
int w,
int h, GLubyte * data);
53 void DeleteTexture(
int tex);
56 void UpdateTexture(
int tex, GLubyte * data);
59 void SetFilter(Renderer::TexFilter f);
60 Renderer::TexFilter GetFilter();
62 int * GetSubTextureBounds(
int id) {
63 return texImageBounds+
id * 4;
69 float MapTexCoordsToRealCoordsX(
float texX,
int tex);
70 float MapTexCoordsToRealCoordsY(
float texY,
int tex);
72 static int GetActiveTextureSlot();
79 void GetTextureData(
int tex, uint8_t*);
81 int GetLastNewID() {
return lastID; }
83 void ComputeTextureBindingData(
const std::vector<std::pair<int, int>> & textures, RenderBuffer * out, RenderBuffer * info);
90 void GarbageCollectBang();
100 std::set<int> garbageBag;
101 int * texImageBounds;
108 std::set<int> inactiveTex;
109 std::vector<int> lastBindings;