* 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
This commit is contained in:
sha..rd 2011-04-29 23:52:11 +00:00
parent 04859ce598
commit dcf3f3c061
2 changed files with 6 additions and 3 deletions

View File

@ -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) {

View File

@ -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(){