#include <vector>
#include <msp/datafile/objectloader.h>
#include "bindable.h"
+#include "datatype.h"
#include "gl.h"
#include "vertexformat.h"
namespace Msp {
namespace GL {
+class GlslModule;
class Module;
class Shader;
std::string name;
const UniformBlockInfo *block;
unsigned location;
- unsigned size;
+ unsigned array_size;
unsigned array_stride;
unsigned matrix_stride;
- GLenum type;
+ DataType type;
};
struct UniformBlockInfo
{
std::string name;
unsigned location;
- unsigned size;
- GLenum type;
+ unsigned array_size;
+ DataType type;
};
typedef std::map<std::string, UniformInfo> UniformMap;
public:
virtual ~Program();
-private:
- unsigned add_stage(GLenum);
-public:
void add_stages(const Module &, const std::map<std::string, int> & = std::map<std::string, int>());
private:
- void compile_stage(unsigned);
+ unsigned add_stage(GLenum);
+ void add_glsl_stages(const GlslModule &, const std::map<std::string, int> &);
+ void compile_glsl_stage(unsigned);
public:
DEPRECATED void attach_shader(Shader &shader);
void link();
private:
- static void require_type(GLenum);
void query_uniforms();
void query_uniform_blocks(const std::vector<UniformInfo *> &);
void query_attributes();