-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresourceloader.h
executable file
·40 lines (31 loc) · 971 Bytes
/
resourceloader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef RESOURCELOADER_H
#define RESOURCELOADER_H
#include <QFile>
#include <QGLShaderProgram>
#include "glm.h"
/**
A simple model struct
**/
struct Model
{
GLMmodel *model;
GLuint idx;
};
/**
A resource loader with code to handle loading models, skyboxes, and shader programs.
@author: Justin Ardini (jardini)
**/
namespace ResourceLoader
{
// Returns the model
Model loadObjModel(QString filePath);
// Returns the skybox ID
GLuint loadSkybox();
// These return a new QGLShaderProgram. THIS MUST BE DELETED BY THE CALLER.
QGLShaderProgram * newVertShaderProgram(const QGLContext *context, QString vertShader);
QGLShaderProgram * newFragShaderProgram(const QGLContext *context, QString fragShader);
QGLShaderProgram * newShaderProgram(const QGLContext *context, QString vertShader, QString fragShader);
// Returns the cubeMap ID
GLuint loadCubeMap(QList<QFile *> files);
}
#endif // RESOURCELOADER_H