GUIImage
A class for holding an image texture id with properties of the image. More...
#include "Tutorial/GUIImage.h"
Public Functions
Name | |
---|---|
GUIImage(const GUIImage & other) =delete<br>Copy constructor is NOT ALLOWED - use pointers (preferably smart) if you want to have the image referable from multiple places. | |
GUIImage(const std::string & path)<br>Constructor which loads the specified image into OpenGl memory. | |
GUIImage(GUIImage && other)<br>Move constructor which makes sure the previous instance doesn't have the GLuint texture id, which would then be deleted with the destructor. | |
~GUIImage()<br>Destructor which deletes the image from OpenGL memory. |
Public Attributes
Name | |
---|---|
int | m_height |
std::string | m_path |
unsigned int | m_texID |
int | m_width |
Detailed Description
struct GUIImage;
struct GUIImage;
A class for holding an image texture id with properties of the image.
Goes by the RAII standard by loading the image at start and deleting it at its end.
Public Functions Documentation
function GUIImage
GUIImage(
const GUIImage & other
) =delete
GUIImage(
const GUIImage & other
) =delete
Copy constructor is NOT ALLOWED - use pointers (preferably smart) if you want to have the image referable from multiple places.
function GUIImage
GUIImage(
const std::string & path
)
GUIImage(
const std::string & path
)
Constructor which loads the specified image into OpenGl memory.
Parameters:
- path Whole path to the image file to be loaded
WARNING: Throws an exception when file not found or texture loading fails!
function GUIImage
GUIImage(
GUIImage && other
)
GUIImage(
GUIImage && other
)
Move constructor which makes sure the previous instance doesn't have the GLuint texture id, which would then be deleted with the destructor.
function ~GUIImage
~GUIImage()
~GUIImage()
Destructor which deletes the image from OpenGL memory.
Public Attributes Documentation
variable m_height
int m_height;
int m_height;
variable m_path
std::string m_path;
std::string m_path;
variable m_texID
unsigned int m_texID;
unsigned int m_texID;
variable m_width
int m_width;
int m_width;
Updated on 2024-11-06 at 20:16:53 +0000