mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
33 lines
695 B
C
33 lines
695 B
C
|
#pragma once
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include "tarray.h"
|
||
|
|
||
|
typedef TMap<int, bool> SpriteHits;
|
||
|
class FTexture;
|
||
|
|
||
|
class IHardwareTexture
|
||
|
{
|
||
|
public:
|
||
|
enum
|
||
|
{
|
||
|
MAX_TEXTURES = 16
|
||
|
};
|
||
|
|
||
|
IHardwareTexture() {}
|
||
|
virtual ~IHardwareTexture() {}
|
||
|
|
||
|
virtual void DeleteDescriptors() { }
|
||
|
|
||
|
virtual void AllocateBuffer(int w, int h, int texelsize) = 0;
|
||
|
virtual uint8_t *MapBuffer() = 0;
|
||
|
virtual unsigned int CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name) = 0;
|
||
|
|
||
|
void Resize(int swidth, int sheight, int width, int height, unsigned char *src_data, unsigned char *dst_data);
|
||
|
|
||
|
int GetBufferPitch() const { return bufferpitch; }
|
||
|
|
||
|
protected:
|
||
|
int bufferpitch = -1;
|
||
|
};
|