mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 20:44:52 +00:00

Change-Id: Ie1a9d1b6632433413098282c1cfaf4cf8e1cf9b9 Signed-off-by: Prudhvi Raj Vasireddi <prudhvi.raj@samsung.com>
29 lines
667 B
C++
29 lines
667 B
C++
#ifndef _TVG_GL_PROGRAM_H_
|
|
#define _TVG_GL_PROGRAM_H_
|
|
|
|
#include "tvgGlShader.h"
|
|
|
|
#include <map>
|
|
|
|
|
|
class GlProgram
|
|
{
|
|
public:
|
|
GlProgram(shared_ptr<GlShader> shader);
|
|
void create();
|
|
void load();
|
|
int32_t getAttributeLocation(const char* name);
|
|
int32_t getUniformLocation(const char* name);
|
|
void setUniformValue(int32_t location, float r, float g, float b, float a);
|
|
|
|
private:
|
|
void linkProgram();
|
|
std::shared_ptr<GlShader> mShader;
|
|
uint32_t mProgramObj;
|
|
static uint32_t mCurrentProgram;
|
|
|
|
static std::map<string, int32_t> mAttributeBuffer;
|
|
static std::map<string, int32_t> mUniformBuffer;
|
|
};
|
|
|
|
#endif /* _TVG_GL_PROGRAM_H_ */
|