2
* Copyright 2010 Inalogic Inc.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3, as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the applicable version of the GNU Lesser General Public
12
* License for more details.
14
* You should have received a copy of both the GNU Lesser General Public
15
* License version 3 along with this program. If not, see
16
* <http://www.gnu.org/licenses/>
18
* Authored by: Jay Taoko <jay.taoko_AT_gmail_DOT_com>
23
#ifndef IOPENGLVOLUMETEXTURE_H
24
#define IOPENGLVOLUMETEXTURE_H
28
class IOpenGLBaseTexture;
29
class IOpenGLVolumeTexture: public IOpenGLBaseTexture
31
DECLARE_OBJECT_TYPE(IOpenGLVolumeTexture, IOpenGLBaseTexture);
34
virtual ~IOpenGLVolumeTexture();
38
IOpenGLVolume ** ppVolumeLevel
44
SURFACE_LOCKED_RECT * pLockedRect,
45
const SURFACE_RECT * pRect);
54
VOLUME_LOCKED_BOX * pLockedVolume,
55
const VOLUME_BOX * pBox);
61
int GetLevelDepth(int MipLevel) const {return ImageSurface::GetLevelDim(_PixelFormat, _Depth, MipLevel);}
68
nuxAssert(Level >= 0 );
69
nuxAssert(Level < _NumMipLevel);
71
if((Level < 0) || (Level > _NumMipLevel))
76
pDesc->PixelFormat = BITFMT_UNKNOWN;
77
pDesc->Type = _ResourceType;
81
pDesc->Width = Max<unsigned int>(1, _Width >> Level);
82
pDesc->Height = Max<unsigned int>(1, _Height >> Level);
83
pDesc->Depth = _Depth;
84
pDesc->PixelFormat = _PixelFormat;
85
pDesc->Type = _ResourceType;
96
, BitmapFormat PixelFormat);
98
std::vector< TRefGL<IOpenGLSurface> > *_VolumeSurfaceArray;
99
std::vector< TRefGL<IOpenGLVolume> > _VolumeArray;
101
friend class GLDeviceFactory;
102
friend class IOpenGLSurface;
107
#endif // IOPENGLVOLUMETEXTURE_H