Work on OpenGL rendering environment.

This commit is contained in:
2017-10-19 15:39:15 +02:00
parent 289b6dce63
commit 501a59d00b
6 changed files with 270 additions and 23 deletions

36
src/glutils.hpp Normal file
View File

@@ -0,0 +1,36 @@
#pragma once
#include "LayerData.hpp"
#include "utils.hpp"
#include <GL/glut.h>
namespace fmri {
/**
* Create a texture from an array of data.
*
* @param data
* @param width
* @param height
* @return A texture reference.
*/
GLuint loadTexture(DType const * data, unsigned int width, unsigned int height);
/**
*
* @param type
* @param source
* @return
*/
GLuint compileShader(GLenum type, char const * source);
/**
* Callback handler to handle resizing windows.
*
* This function resizes the rendering viewport so everything still
* looks proportional.
*
* @param w new Width
* @param h new Height.
*/
void changeWindowSize(int w, int h);
}