supertux
Public Member Functions | List of all members
GLTexture Class Referencefinal

This class is a wrapper around a texture handle. More...

#include <gl_texture.hpp>

Inheritance diagram for GLTexture:
Inheritance graph
[legend]
Collaboration diagram for GLTexture:
Collaboration graph
[legend]

Public Member Functions

 GLTexture (int width, int height, std::optional< Color > fill_color=std::nullopt)
 
 GLTexture (const SDL_Surface &image, const Sampler &sampler)
 
virtual int get_texture_width () const override
 
virtual int get_texture_height () const override
 
virtual int get_image_width () const override
 
virtual int get_image_height () const override
 
void set_handle (GLuint handle)
 
const GLuint & get_handle () const
 
const Samplerget_sampler () const
 
void set_image_width (int width)
 
void set_image_height (int height)
 

Additional Inherited Members

- Public Types inherited from Texture
using Key = std::tuple< std::string, Rect >
 filename, left, top, right, bottom
 

Detailed Description

This class is a wrapper around a texture handle.

It stores the texture width and height and provides convenience functions for uploading SDL_Surfaces into the texture.


The documentation for this class was generated from the following files: