Implement a small texture wrapper.

Allows for RAII use of OpenGL textures.
This commit is contained in:
2018-02-25 19:03:10 +01:00
parent 23ae9717ea
commit 17d4e07025
6 changed files with 89 additions and 13 deletions

View File

@@ -2,6 +2,7 @@
#include "LayerData.hpp"
#include "utils.hpp"
#include "Texture.hpp"
#include <GL/glut.h>
#include <string_view>
@@ -15,7 +16,7 @@ namespace fmri {
* @param subImages Number of subimages in the original image. Sub images are rescaled individually to preserve contrast. Optional, default 1.
* @return A texture reference.
*/
GLuint loadTexture(DType const *data, int width, int height, int subImages = 1);
fmri::Texture loadTexture(DType const *data, int width, int height, int subImages = 1);
/**
* Callback handler to handle resizing windows.