mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #32 - Fixed some bugs in the client
This commit is contained in:
@ -488,6 +488,17 @@ public class EaglercraftGPU {
|
||||
return mapTexturesGL.get(tex);
|
||||
}
|
||||
|
||||
public static final void regenerateTexture(int tex) {
|
||||
ITextureGL webglTex = mapTexturesGL.get(tex);
|
||||
if(webglTex != null) {
|
||||
GlStateManager.unbindTextureIfCached(tex);
|
||||
_wglDeleteTextures(webglTex);
|
||||
mapTexturesGL.set(tex, _wglGenTextures());
|
||||
}else {
|
||||
logger.error("Tried to regenerate a missing texture!");
|
||||
}
|
||||
}
|
||||
|
||||
public static final void drawHighPoly(HighPolyMesh mesh) {
|
||||
if(mesh.vertexCount == 0 || mesh.indexCount == 0 || mesh.vertexArray == null) {
|
||||
return;
|
||||
|
@ -589,18 +589,25 @@ public class GlStateManager {
|
||||
}
|
||||
|
||||
public static final void deleteTexture(int texture) {
|
||||
unbindTextureIfCached(texture);
|
||||
_wglDeleteTextures(EaglercraftGPU.mapTexturesGL.free(texture));
|
||||
boolean f = false;
|
||||
}
|
||||
|
||||
static final void unbindTextureIfCached(int texture) {
|
||||
boolean f1, f2 = false;
|
||||
for(int i = 0; i < boundTexture.length; ++i) {
|
||||
if(boundTexture[i] == texture) {
|
||||
_wglActiveTexture(GL_TEXTURE0 + i);
|
||||
f1 = i != activeTexture;
|
||||
if(f2 || f1) {
|
||||
_wglActiveTexture(GL_TEXTURE0 + i);
|
||||
f2 = f1;
|
||||
}
|
||||
_wglBindTexture(GL_TEXTURE_2D, null);
|
||||
_wglBindTexture(GL_TEXTURE_3D, null);
|
||||
boundTexture[i] = -1;
|
||||
f = true;
|
||||
}
|
||||
}
|
||||
if(f) {
|
||||
if(f2) {
|
||||
_wglActiveTexture(GL_TEXTURE0 + activeTexture);
|
||||
}
|
||||
}
|
||||
|
@ -2058,7 +2058,7 @@ public class EaglerDeferredPipeline {
|
||||
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
if(reprojectionEngineEnable || config.realisticWater) {
|
||||
if(reprojectionEngineEnable || config.is_rendering_realisticWater) {
|
||||
|
||||
// =========== SAVE REPROJECTION DATA FOR NEXT FRAME ============= //
|
||||
|
||||
|
Reference in New Issue
Block a user