mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
texture mixing
This commit is contained in:
+3
-3
@@ -149,10 +149,10 @@ namespace vb01{
|
||||
}
|
||||
|
||||
void Texture::update(int id){
|
||||
updateFrame();
|
||||
//updateFrame();
|
||||
select(id);
|
||||
if(numFrames > 0)
|
||||
select(id + 1);
|
||||
select(id + 1, 1);
|
||||
}
|
||||
|
||||
void Texture::updateFrame(){
|
||||
@@ -166,6 +166,6 @@ namespace vb01{
|
||||
|
||||
void Texture::select(int id, int fr){
|
||||
glActiveTexture(GL_TEXTURE0 + id);
|
||||
glBindTexture(type == TEXTURE_2D ? GL_TEXTURE_2D : GL_TEXTURE_CUBE_MAP, texture[frame]);
|
||||
glBindTexture(type == TEXTURE_2D ? GL_TEXTURE_2D : GL_TEXTURE_CUBE_MAP, texture[fr]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user