Files
BlitzNext/Runtime/blitz3d/texture.hpp
T

43 lines
1.0 KiB
C++
Raw Normal View History

2019-01-18 21:26:42 +01:00
#pragma once
2014-01-31 08:23:00 +13:00
#include <string>
2019-01-18 15:55:06 +01:00
#include "cachedtexture.hpp"
2014-01-31 08:23:00 +13:00
2019-01-18 21:26:42 +01:00
#include <gxscene.hpp>
class gxCanvas;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
class Texture {
public:
2014-01-31 08:23:00 +13:00
Texture();
2019-01-18 17:04:17 +01:00
Texture(const std::string& file, int flags);
Texture(const std::string& file, int flags, int w, int h, int first, int cnt);
Texture(int width, int height, int flags, int cnt);
Texture(const Texture& texture);
2014-01-31 08:23:00 +13:00
~Texture();
2019-01-18 17:04:17 +01:00
Texture& operator=(const Texture& texture);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
void setScale(float u_scale, float v_scale);
void setRotation(float rot);
void setPosition(float u_pos, float v_pos);
void setBlend(int blend);
void setFlags(int flags);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
int getCanvasFlags() const;
gxCanvas* getCanvas(int frame) const;
const gxScene::Matrix* getMatrix() const;
int getBlend() const;
int getFlags() const;
2019-01-18 21:26:42 +01:00
CachedTexture* getCachedTexture() const;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
bool isTransparent() const;
bool operator<(const Texture& t) const;
2014-01-31 08:23:00 +13:00
static void clearFilters();
2019-01-18 17:04:17 +01:00
static void addFilter(const std::string& filter, int flags);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
private:
2014-01-31 08:23:00 +13:00
struct Rep;
2019-01-18 17:04:17 +01:00
Rep* rep;
2014-01-31 08:23:00 +13:00
};