2012-11-15 00:39:56 +01:00
|
|
|
#pragma once
|
2013-11-09 22:29:49 +01:00
|
|
|
#include "GLVertexProgram.h"
|
|
|
|
|
#include "GLFragmentProgram.h"
|
2012-11-15 00:39:56 +01:00
|
|
|
|
2013-11-09 22:29:49 +01:00
|
|
|
struct GLProgram
|
2012-11-15 00:39:56 +01:00
|
|
|
{
|
2013-06-30 10:46:29 +02:00
|
|
|
private:
|
|
|
|
|
struct Location
|
|
|
|
|
{
|
|
|
|
|
int loc;
|
2014-04-01 02:33:55 +02:00
|
|
|
std::string name;
|
2013-06-30 10:46:29 +02:00
|
|
|
};
|
|
|
|
|
|
2014-04-10 00:54:32 +02:00
|
|
|
std::vector<Location> m_locations;
|
2013-06-30 10:46:29 +02:00
|
|
|
|
|
|
|
|
public:
|
2012-11-15 00:39:56 +01:00
|
|
|
u32 id;
|
|
|
|
|
|
2013-11-09 22:29:49 +01:00
|
|
|
GLProgram();
|
2012-11-15 00:39:56 +01:00
|
|
|
|
2014-04-01 02:33:55 +02:00
|
|
|
int GetLocation(const std::string& name);
|
2012-11-15 00:39:56 +01:00
|
|
|
bool IsCreated() const;
|
|
|
|
|
void Create(const u32 vp, const u32 fp);
|
|
|
|
|
void Use();
|
2013-08-10 23:56:24 +02:00
|
|
|
void UnUse();
|
2012-11-15 00:39:56 +01:00
|
|
|
void SetTex(u32 index);
|
|
|
|
|
void Delete();
|
2014-04-10 00:54:32 +02:00
|
|
|
};
|