Update Loader class

pull/12/head
hYdos 2020-02-26 16:38:57 +10:00
parent 71bad95646
commit 991b25aceb
2 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,9 @@ import com.github.hydos.ginger.engine.math.vectors.*;
import com.github.hydos.ginger.engine.render.models.RawModel;
import com.github.hydos.ginger.engine.utils.Loader;
import com.github.hydos.ginger.main.settings.Constants;
/*
* wtf
*/
@Deprecated
public class Terrain
{

View File

@ -125,8 +125,7 @@ public class Loader
GL11.glBindTexture(GL11.GL_TEXTURE_2D, textureID);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, 10241, 9729.0f);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, 10240, 9729.0f);
GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, texture.getWidth(), texture.getHeight(), 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, texture.getImage());
GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, texture.getWidth(), texture.getHeight(), 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, texture.getImage());
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
if (Window.glContext.GL_EXT_texture_filter_anisotropic)
@ -136,6 +135,7 @@ public class Loader
}
else
System.out.println("anisotropic not supported!");
GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
return textureID;
}