* 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:
parent
04859ce598
commit
dcf3f3c061
@ -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…
x
Reference in New Issue
Block a user