mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Developing OpenGL rendering
git-svn-id: svn://ultimatepp.org/upp/trunk@12420 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4a1fb51483
commit
1f48c72817
4 changed files with 13 additions and 20 deletions
|
|
@ -112,8 +112,19 @@ void GLProgram::Clear()
|
|||
glDeleteShader(fragment_shader);
|
||||
}
|
||||
|
||||
void GLProgram::Use()
|
||||
{
|
||||
static int64 currentid;
|
||||
if(currentid != serialid) {
|
||||
currentid = serialid;
|
||||
glUseProgram(program);
|
||||
}
|
||||
}
|
||||
|
||||
GLProgram::GLProgram()
|
||||
{
|
||||
static int64 h;
|
||||
serialid = ++h;
|
||||
vertex_shader = fragment_shader = program = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue