World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
TextureD3D.h
См. документацию.
1 #pragma once
3 
4 struct IDirectDrawSurface;
5 struct IDirect3DTexture2;
6 class TextureD3D : public Texture {
7  public:
8  IDirectDrawSurface *GetDirectDrawSurface();
9  IDirect3DTexture2 *GetDirect3DTexture();
10 
11  protected:
12  friend class Render;
13 
14  static Texture *Create(unsigned int width, unsigned int height, IMAGE_FORMAT format, const void * pixels);
15 
16  static Texture *Create(ImageLoader *loader);
17 
18  void SetDirectDrawSurface(IDirectDrawSurface *dds) { this->dds = dds; }
19  void SetDirect3DTexture2(IDirect3DTexture2 *d3dt) { this->d3dt = d3dt; }
20 
21  explicit TextureD3D(bool lazy_initialization = true)
22  : Texture(lazy_initialization), dds(nullptr), d3dt(nullptr) {}
23 
24  IDirectDrawSurface *dds;
25  IDirect3DTexture2 *d3dt;
26 
27  ~TextureD3D();
28 
29  virtual bool LoadImageData();
30 };
Image::loader
ImageLoader * loader
Definition: Image.h:47
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
Texture
Definition: Texture.h:4
TextureD3D::TextureD3D
TextureD3D(bool lazy_initialization=true)
Definition: TextureD3D.h:21
TextureD3D::dds
IDirectDrawSurface * dds
Definition: TextureD3D.h:24
Render
Definition: Render.h:20
format
SDL_AudioFormat format
Definition: SDL_audio.h:194
Image::lazy_initialization
bool lazy_initialization
Definition: Image.h:45
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
TextureD3D::GetDirect3DTexture
IDirect3DTexture2 * GetDirect3DTexture()
Definition: TextureD3D.cpp:57
ImageLoader
Definition: ImageLoader.h:10
IMAGE_FORMAT
IMAGE_FORMAT
Definition: Image.h:4
TextureD3D::~TextureD3D
~TextureD3D()
Definition: TextureD3D.cpp:87
TextureD3D::d3dt
IDirect3DTexture2 * d3dt
Definition: TextureD3D.h:25
TextureD3D::LoadImageData
virtual bool LoadImageData()
Definition: TextureD3D.cpp:65
TextureD3D
Definition: TextureD3D.h:6
TextureD3D::GetDirectDrawSurface
IDirectDrawSurface * GetDirectDrawSurface()
Definition: TextureD3D.cpp:49
Texture.h
TextureD3D::SetDirectDrawSurface
void SetDirectDrawSurface(IDirectDrawSurface *dds)
Definition: TextureD3D.h:18
TextureD3D::Create
static Texture * Create(unsigned int width, unsigned int height, IMAGE_FORMAT format, const void *pixels)
Definition: TextureD3D.cpp:6
pixels
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: SDL_opengl.h:1572
TextureD3D::SetDirect3DTexture2
void SetDirect3DTexture2(IDirect3DTexture2 *d3dt)
Definition: TextureD3D.h:19