mirror of
https://github.com/aap/librw.git
synced 2026-07-22 23:07:02 +01:00
fixes to uniforms
This commit is contained in:
@@ -481,8 +481,10 @@ uint32
|
||||
bindTexture(uint32 texid)
|
||||
{
|
||||
uint32 prev = boundTexture[activeTexture];
|
||||
boundTexture[activeTexture] = texid;
|
||||
glBindTexture(GL_TEXTURE_2D, texid);
|
||||
if(prev != texid){
|
||||
boundTexture[activeTexture] = texid;
|
||||
glBindTexture(GL_TEXTURE_2D, texid);
|
||||
}
|
||||
return prev;
|
||||
}
|
||||
|
||||
@@ -1781,6 +1783,9 @@ initOpenGL(void)
|
||||
u_matColor = registerUniform("u_matColor", UNIFORM_VEC4);
|
||||
u_surfProps = registerUniform("u_surfProps", UNIFORM_VEC4);
|
||||
|
||||
// for im2d
|
||||
registerUniform("u_xform", UNIFORM_VEC4);
|
||||
|
||||
glClearColor(0.25, 0.25, 0.25, 1.0);
|
||||
|
||||
byte whitepixel[4] = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
|
||||
Reference in New Issue
Block a user