SuperTuxKart
Loading...
Searching...
No Matches
server_dummy_texture.hpp
1#ifndef HEADER_SERVER_DUMMY_TEXTURE_HPP
2#define HEADER_SERVER_DUMMY_TEXTURE_HPP
3
4#include "utils/no_copy.hpp"
5
6#include <string>
7#include <ITexture.h>
8
9using namespace irr;
10
11class ServerDummyTexture : public video::ITexture, NoCopy
12{
13public:
14 // ------------------------------------------------------------------------
15 ServerDummyTexture(const std::string& p) : video::ITexture(p.c_str()) {}
16 // ------------------------------------------------------------------------
17 virtual ~ServerDummyTexture() {}
18 // ------------------------------------------------------------------------
19 virtual void* lock(video::E_TEXTURE_LOCK_MODE mode =
20 video::ETLM_READ_WRITE, u32 mipmap_level = 0)
21 { return NULL; }
22 // ------------------------------------------------------------------------
23 virtual void unlock() {}
24 // ------------------------------------------------------------------------
25 virtual const core::dimension2d<u32>& getOriginalSize() const
26 {
27 static core::dimension2d<u32> dummy;
28 return dummy;
29 }
30 // ------------------------------------------------------------------------
31 virtual const core::dimension2d<u32>& getSize() const
32 {
33 return getOriginalSize();
34 }
35 // ------------------------------------------------------------------------
36 virtual video::E_DRIVER_TYPE getDriverType() const
37 {
38 return video::EDT_NULL;
39 }
40 // ------------------------------------------------------------------------
41 virtual video::ECOLOR_FORMAT getColorFormat() const
42 { return video::ECF_A8R8G8B8; }
43 // ------------------------------------------------------------------------
44 virtual u32 getPitch() const { return 0; }
45 // ------------------------------------------------------------------------
46 virtual bool hasMipMaps() const { return false; }
47 // ------------------------------------------------------------------------
48 virtual void regenerateMipMapLevels(void* mipmap_data = NULL) {}
49 // ------------------------------------------------------------------------
50 virtual u64 getTextureHandler() const { return 1; }
51 // ------------------------------------------------------------------------
52 virtual unsigned int getTextureSize() const { return 0; }
53}; // ServerDummyTexture
54
55#endif
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Definition: server_dummy_texture.hpp:12