From 89da025f40680d9cea46f2b0a7c8c6829a0d0451 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 12 Apr 2015 19:37:37 -0400 Subject: [PATCH] Height fields. --- CameraPane.java | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index b9fb49f..3e6f8d9 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -768,6 +768,8 @@ class CacheTexture { com.sun.opengl.util.texture.Texture texture; + com.sun.opengl.util.texture.TextureData texturedata; + int resolution; CacheTexture(com.sun.opengl.util.texture.Texture tex, int res) @@ -6451,7 +6453,7 @@ return; // true; } - com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) + CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) { CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null; @@ -6665,6 +6667,8 @@ thetex.texture.dispose(); textures.remove(texname); } + + texture.texturedata = texturedata; textures.put(texname, texture); // newtex = true; @@ -6681,6 +6685,13 @@ } } + return texture; + } + + com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) + { + CacheTexture texture = GetCacheTexture(tex, bump, resolution); + if (bump) { // GraphreeD.trace("PUSH BUMP " + tex + "(" + bumpdepth + ")" + " : " + texture); @@ -6693,6 +6704,13 @@ } return texture!=null?texture.texture:null; + } + + com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) + { + CacheTexture texture = GetCacheTexture(tex, bump, resolution); + + return texture!=null?texture.texturedata:null; } boolean BindTexture(String tex, boolean bump, int resolution) @@ -10253,7 +10271,7 @@ return; } - if (obj instanceof CheckerIG) + if (obj instanceof Checker) { checker = obj; -- Gitblit v1.6.2