aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h240
1 files changed, 120 insertions, 120 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h b/libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h
index 4a73c54..e5f8aac 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CD3D8Texture.h
@@ -1,120 +1,120 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_DIRECTX8_TEXTURE_H_INCLUDED__ 5#ifndef __C_DIRECTX8_TEXTURE_H_INCLUDED__
6#define __C_DIRECTX8_TEXTURE_H_INCLUDED__ 6#define __C_DIRECTX8_TEXTURE_H_INCLUDED__
7 7
8#include "IrrCompileConfig.h" 8#include "IrrCompileConfig.h"
9#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ 9#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_
10 10
11#include "ITexture.h" 11#include "ITexture.h"
12#include "IImage.h" 12#include "IImage.h"
13 13
14#include <d3d8.h> 14#include <d3d8.h>
15 15
16namespace irr 16namespace irr
17{ 17{
18namespace video 18namespace video
19{ 19{
20 20
21class CD3D8Driver; 21class CD3D8Driver;
22 22
23/*! 23/*!
24 interface for a Video Driver dependent Texture. 24 interface for a Video Driver dependent Texture.
25*/ 25*/
26class CD3D8Texture : public ITexture 26class CD3D8Texture : public ITexture
27{ 27{
28public: 28public:
29 29
30 //! constructor 30 //! constructor
31 CD3D8Texture(IImage* image, CD3D8Driver* driver, 31 CD3D8Texture(IImage* image, CD3D8Driver* driver,
32 u32 flags, const io::path& name, void* mipmapData=0); 32 u32 flags, const io::path& name, void* mipmapData=0);
33 33
34 //! rendertarget constructor 34 //! rendertarget constructor
35 CD3D8Texture(CD3D8Driver* driver, const core::dimension2d<u32>& size, const io::path& name); 35 CD3D8Texture(CD3D8Driver* driver, const core::dimension2d<u32>& size, const io::path& name);
36 36
37 //! destructor 37 //! destructor
38 virtual ~CD3D8Texture(); 38 virtual ~CD3D8Texture();
39 39
40 //! lock function 40 //! lock function
41 virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); 41 virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0);
42 42
43 //! unlock function 43 //! unlock function
44 virtual void unlock(); 44 virtual void unlock();
45 45
46 //! Returns original size of the texture. 46 //! Returns original size of the texture.
47 virtual const core::dimension2d<u32>& getOriginalSize() const; 47 virtual const core::dimension2d<u32>& getOriginalSize() const;
48 48
49 //! Returns (=size) of the texture. 49 //! Returns (=size) of the texture.
50 virtual const core::dimension2d<u32>& getSize() const; 50 virtual const core::dimension2d<u32>& getSize() const;
51 51
52 //! returns driver type of texture (=the driver, who created the texture) 52 //! returns driver type of texture (=the driver, who created the texture)
53 virtual E_DRIVER_TYPE getDriverType() const; 53 virtual E_DRIVER_TYPE getDriverType() const;
54 54
55 //! returns color format of texture 55 //! returns color format of texture
56 virtual ECOLOR_FORMAT getColorFormat() const; 56 virtual ECOLOR_FORMAT getColorFormat() const;
57 57
58 //! returns pitch of texture (in bytes) 58 //! returns pitch of texture (in bytes)
59 virtual u32 getPitch() const; 59 virtual u32 getPitch() const;
60 60
61 //! returns the DIRECT3D8 Texture 61 //! returns the DIRECT3D8 Texture
62 IDirect3DTexture8* getDX8Texture() const; 62 IDirect3DTexture8* getDX8Texture() const;
63 63
64 //! returns if texture has mipmap levels 64 //! returns if texture has mipmap levels
65 bool hasMipMaps() const; 65 bool hasMipMaps() const;
66 66
67 //! Regenerates the mip map levels of the texture. Useful after locking and 67 //! Regenerates the mip map levels of the texture. Useful after locking and
68 //! modifying the texture 68 //! modifying the texture
69 virtual void regenerateMipMapLevels(void* mipmapData=0); 69 virtual void regenerateMipMapLevels(void* mipmapData=0);
70 70
71 //! returns if it is a render target 71 //! returns if it is a render target
72 virtual bool isRenderTarget() const; 72 virtual bool isRenderTarget() const;
73 73
74 //! Returns pointer to the render target surface 74 //! Returns pointer to the render target surface
75 IDirect3DSurface8* getRenderTargetSurface(); 75 IDirect3DSurface8* getRenderTargetSurface();
76 76
77private: 77private:
78 friend class CD3D8Driver; 78 friend class CD3D8Driver;
79 79
80 void createRenderTarget(); 80 void createRenderTarget();
81 81
82 //! creates the hardware texture 82 //! creates the hardware texture
83 bool createTexture(u32 flags, IImage* Image); 83 bool createTexture(u32 flags, IImage* Image);
84 84
85 //! copies the image to the texture 85 //! copies the image to the texture
86 bool copyTexture(IImage* Image); 86 bool copyTexture(IImage* Image);
87 87
88 //! convert color formats 88 //! convert color formats
89 ECOLOR_FORMAT getColorFormatFromD3DFormat(D3DFORMAT format); 89 ECOLOR_FORMAT getColorFormatFromD3DFormat(D3DFORMAT format);
90 90
91 bool createMipMaps(u32 level=1); 91 bool createMipMaps(u32 level=1);
92 92
93 void copy16BitMipMap(char* src, char* tgt, 93 void copy16BitMipMap(char* src, char* tgt,
94 s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const; 94 s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const;
95 95
96 void copy32BitMipMap(char* src, char* tgt, 96 void copy32BitMipMap(char* src, char* tgt,
97 s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const; 97 s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const;
98 98
99 IDirect3DDevice8* Device; 99 IDirect3DDevice8* Device;
100 IDirect3DTexture8* Texture; 100 IDirect3DTexture8* Texture;
101 IDirect3DSurface8* RTTSurface; 101 IDirect3DSurface8* RTTSurface;
102 CD3D8Driver* Driver; 102 CD3D8Driver* Driver;
103 core::dimension2d<u32> TextureSize; 103 core::dimension2d<u32> TextureSize;
104 core::dimension2d<u32> ImageSize; 104 core::dimension2d<u32> ImageSize;
105 s32 Pitch; 105 s32 Pitch;
106 u32 MipLevelLocked; 106 u32 MipLevelLocked;
107 ECOLOR_FORMAT ColorFormat; 107 ECOLOR_FORMAT ColorFormat;
108 108
109 bool HasMipMaps; 109 bool HasMipMaps;
110 bool IsRenderTarget; 110 bool IsRenderTarget;
111}; 111};
112 112
113 113
114} // end namespace video 114} // end namespace video
115} // end namespace irr 115} // end namespace irr
116 116
117#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ 117#endif // _IRR_COMPILE_WITH_DIRECT3D_8_
118 118
119#endif // __C_DIRECTX8_TEXTURE_H_INCLUDED__ 119#endif // __C_DIRECTX8_TEXTURE_H_INCLUDED__
120 120