texture mixing

This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 0f9622a94c
commit 69463c535b
4 changed files with 35 additions and 26 deletions
+3 -3
View File
@@ -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]);
}
}