Minor changes
This commit is contained in:
@@ -39,7 +39,7 @@ class TextureHandler
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 16, 16, 0, GL_RGB, GL_UNSIGNED_BYTE, imageData);
|
||||
|
||||
imageData1 = loadTexture("data/img/iron.png");
|
||||
imageData1 = loadTexture("data/img/oak.png");
|
||||
glGenTextures(1, &textures1);
|
||||
glBindTexture(GL_TEXTURE_2D, textures1);
|
||||
|
||||
@@ -52,17 +52,16 @@ class TextureHandler
|
||||
|
||||
void getTextureForNode(int x, int y, int z)
|
||||
{
|
||||
|
||||
|
||||
//if(nodeManager.getNodeAt(x, y, z) == 1)
|
||||
//{
|
||||
Position2D block = BlockUtilities::getBlockFromNodeCoordinates(x, z);
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16) == 1)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, textures);
|
||||
//}
|
||||
}
|
||||
|
||||
//else if(nodeManager.getNodeAt(x, y, z) == 2)
|
||||
//{
|
||||
//glBindTexture(GL_TEXTURE_2D, textures1);
|
||||
//}
|
||||
else if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16) == 2)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, textures1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user