add GLProgram_GetID()
This commit is contained in:
parent
d68cd6a396
commit
1081903730
@ -1,7 +1,5 @@
|
|||||||
#include "GLProgram.h"
|
#include "GLProgram.h"
|
||||||
#include "GLShader.h"
|
#include "GLShader.h"
|
||||||
#include "ruby.h"
|
|
||||||
#include "gl3w.h"
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -103,6 +101,13 @@ void GLProgram_Init()
|
|||||||
rb_define_method(ruby_class, "link", (VALUE(*)(...))GLProgram_link, 0);
|
rb_define_method(ruby_class, "link", (VALUE(*)(...))GLProgram_link, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLuint GLProgram_GetID(VALUE program)
|
||||||
|
{
|
||||||
|
GLProgram * glprogram;
|
||||||
|
Data_Get_Struct(program, GLProgram, glprogram);
|
||||||
|
return glprogram->id;
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
GLint GLProgram::get_uniform(const std::string & uniform_name)
|
GLint GLProgram::get_uniform(const std::string & uniform_name)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#ifndef GLPROGRAM_H
|
#ifndef GLPROGRAM_H
|
||||||
#define GLPROGRAM_H
|
#define GLPROGRAM_H
|
||||||
|
|
||||||
|
#include "ruby.h"
|
||||||
|
#include "gl3w.h"
|
||||||
|
|
||||||
void GLProgram_Init();
|
void GLProgram_Init();
|
||||||
|
GLuint GLProgram_GetID(VALUE program);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user