Clean up.

This commit is contained in:
2018-04-12 17:01:08 +02:00
parent 73cdb7f36f
commit 7569b9aad3
2 changed files with 0 additions and 23 deletions

View File

@@ -31,19 +31,6 @@ static void rescaleSubImages(vector<float>& textureBuffer, int subImages) {
}
}
fmri::Texture fmri::loadTexture(DType const *data, int width, int height, int subImages)
{
// Load and scale texture
vector<float> textureBuffer(data, data + (width * height));
rescaleSubImages(textureBuffer, subImages);
Texture texture;
texture.configure(GL_TEXTURE_2D);
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_LUMINANCE, width, height, GL_LUMINANCE, GL_FLOAT, textureBuffer.data());
return texture;
}
void fmri::changeWindowSize(int w, int h)
{
// Prevent a divide by zero, when window is too short

View File

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