* Fixed bug in RenderImageJme Texture constructor that would not take into account width/height

* MatParam toString() method will now display value

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7368 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 04859ce598
commit dcf3f3c061
  1. 2
      engine/src/core/com/jme3/material/MatParam.java
  2. 7
      engine/src/niftygui/com/jme3/niftygui/RenderImageJme.java

@ -223,7 +223,7 @@ public class MatParam implements Savable, Cloneable {
@Override
public String toString(){
return type.name()+" "+name;
return type.name() + " " + name + " : " + getValueAsString();
}
public void apply(Renderer r, Technique technique) {

@ -63,10 +63,13 @@ public class RenderImageJme implements RenderImage {
}
public RenderImageJme(Texture2D texture){
if (texture.getImage() == null)
throw new IllegalArgumentException("texture.getImage() cannot be null");
this.texture = texture;
this.image = texture.getImage();
if (this.image == null)
throw new NullPointerException("texture.getImage() cannot be null");
width = image.getWidth();
height = image.getHeight();
}
public Texture2D getTexture(){

Loading…
Cancel
Save