From 5a546232b84ce65d8779d29e9171e7e2df013614 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sat, 20 Jul 2019 20:50:17 -0400
Subject: [PATCH] Restore bind texture
---
ObjEditor.java | 2 +-
CameraPane.java | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/CameraPane.java b/CameraPane.java
index 52608e6..b55d184 100644
--- a/CameraPane.java
+++ b/CameraPane.java
@@ -7930,7 +7930,7 @@
String pigment = Object3D.GetPigment(tex);
String bump = Object3D.GetBump(tex);
- if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
+ //if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
{
// System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
// System.out.println("; bump = " + bump);
@@ -7964,7 +7964,7 @@
String pigment = Object3D.GetPigment(tex);
- if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
+ //if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
{
// System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
// System.out.println("; bump = " + bump);
@@ -7993,7 +7993,7 @@
String bump = Object3D.GetBump(tex);
- if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
+ //if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
{
// System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
// System.out.println("; bump = " + bump);
@@ -8131,7 +8131,7 @@
usedtextures.put(pigment, pigment);
usedtextures.put(bump, bump);
- if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
+ //if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
{
// System.out.print("BIND +++++++++++++++ pigment = " + pigment);
// System.out.println("; bump = " + bump);
@@ -8173,7 +8173,7 @@
usedtextures.put(pigment, pigment);
- if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
+ //if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
{
// System.out.print("BIND +++++++++++++++ pigment = " + pigment);
// System.out.println("; bump = " + bump);
@@ -8206,7 +8206,7 @@
usedtextures.put(bump, bump);
- if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
+ //if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
{
// System.out.print("BIND +++++++++++++++ pigment = " + pigment);
// System.out.println("; bump = " + bump);
@@ -8510,19 +8510,19 @@
return texture!=null?texture.texturedata:null;
}
- com.sun.opengl.util.texture.Texture BindTexture(String tex, boolean bump, int resolution) throws Exception
+ boolean BindTexture(String tex, boolean bump, int resolution) throws Exception
{
if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
{
return false;
}
- boolean newtex = false;
+ //boolean newtex = false;
com.sun.opengl.util.texture.Texture texture = GetTexture(tex, bump, resolution);
if (texture == null)
- return texture;
+ return false;
/**/
if (textureon || tex.equals("DEFAULT_TEXTURE") || tex.equals("DEFAULT_TEXTURE_BUMP") || tex.equals("WHITE_NOISE")) // || tex.equals("IMMORTAL"))
@@ -8549,7 +8549,7 @@
texture.setTexParameteri(GetGL().GL_TEXTURE_WRAP_S, GetGL().GL_REPEAT);
texture.setTexParameteri(GetGL().GL_TEXTURE_WRAP_T, GetGL().GL_REPEAT);
- return newtex;
+ return true; // Warning: not used.
}
ShadowBuffer shadowPBuf;
diff --git a/ObjEditor.java b/ObjEditor.java
index f3f020f..c6e6178 100644
--- a/ObjEditor.java
+++ b/ObjEditor.java
@@ -4769,7 +4769,7 @@
readobj.ResetDisplayList();
} catch (Exception e)
{
- //e.printStackTrace();
+ e.printStackTrace();
try
{
java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
--
Gitblit v1.6.2