Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
guitexture.h
Go to the documentation of this file.
1
/*
2
* Vega Strike
3
* Copyright (C) 2003 Mike Byron
4
*
5
* http://vegastrike.sourceforge.net/
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
*/
21
22
#ifndef __GUITEXTURE_H__
23
#define __GUITEXTURE_H__
24
#include <string>
25
#include "
guidefs.h
"
26
27
#include "
vegastrike.h
"
//For OpenGL/gl.h -> GLuint.
28
29
//The GuiTexture class encapsulates an OpenGL 2D texture.
30
//There is a cache so that a texture is only read and bound once.
31
class
GuiTexture
32
{
33
public
:
34
//Read a texture from a file and bind it.
35
bool
read
(
const
std::string &fileName );
36
37
//Draw this texture, stretching to fit the rect.
38
void
draw
(
const
Rect
&rect )
const
;
39
40
//CONSTRUCTION
41
GuiTexture
(
void
);
42
~GuiTexture
(
void
);
43
44
protected
:
45
//INTERNAL IMPLEMENTATION
46
47
protected
:
48
//VARIABLES
49
class
Texture
*
m_texture
;
50
/*
51
* GLuint m_glName; // Unique ID for this texture used in OpenGL.
52
* std::string m_fileName; // Name of the file this came from.
53
* int m_width, m_height; // Original size of image.
54
*/
55
};
56
57
#endif //__GUITEXTURE_H__
58
src
gui
guitexture.h
Generated on Fri May 29 2015 23:07:32 for Vegastrike 0.5.1 rc1 by
1.8.4