Project

General

Profile

SO3Engine
SO3Texture.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
31#ifndef __SO3_TEXTURE_H__
32#define __SO3_TEXTURE_H__
33
36
37namespace SO3
38{
39
40 class _SO3_Export STexture : public SData,
41 public Ogre::ManualResourceLoader
42 {
43 public:
44 protected:
45 Ogre::TexturePtr O3TexturePtr;
47 std::string mGroupName;
48 private:
49 size_t mWidth;
50 size_t mHeight;
51 Ogre::PixelBox mBuffer;
52 public:
55 STexture(SScene* scene, const std::string& groupName, const std::string& textureName, const std::string& path, const int& w = 0, const int& h = 0);
56
59 STexture(SScene* scene, const std::string& groupName, const std::string& textureName, Ogre::Image image);
60
63 ~STexture();
64
67 Ogre::TexturePtr getOgreTexturePointer();
68
71 SScene* GetScene();
72
75 void BlitAlphaTexture(PtrObjBitmap Bcolor, PtrObjBitmap Balpha);
76
79 void BlitTexture(PtrObjBitmap B);
80
83 std::string GetGroupName();
84 protected:
85 private:
89 STexture();
90
93 virtual void loadResource(Ogre::Resource* resource);
94 };
95
96}
97
98#endif
librairies include
SCOL_EXPORT int cbmachine w
Definition SO3SCOL.cpp:5150
SScene * mScene
Definition SO3Texture.h:46
std::string mGroupName
Definition SO3Texture.h:47
Ogre::TexturePtr O3TexturePtr
Definition SO3Texture.h:45