modules/graphics/src/main/java/com/sun/prism/d3d/D3DMeshView.java
Print this page
*** 79,99 ****
public void setAmbientLight(float r, float g, float b) {
context.setAmbientLight(nativeHandle, r, g, b);
}
@Override
! public void setPointLight(int index, float x, float y, float z, float r, float g, float b, float w) {
// NOTE: We only support up to 3 point lights at the present
if (index >= 0 && index <= 2) {
context.setPointLight(nativeHandle, index, x, y, z, r, g, b, w);
}
}
@Override
public void render(Graphics g) {
material.lockTextureMaps();
! context.renderMeshView(nativeHandle, g.getTransformNoClone());
material.unlockTextureMaps();
}
@Override
public void dispose() {
--- 79,103 ----
public void setAmbientLight(float r, float g, float b) {
context.setAmbientLight(nativeHandle, r, g, b);
}
@Override
! public void setPointLight(int index, float pixelScaleFactor,
! float x, float y, float z, float r, float g, float b, float w) {
// NOTE: We only support up to 3 point lights at the present
if (index >= 0 && index <= 2) {
+ x *= pixelScaleFactor;
+ y *= pixelScaleFactor;
+ z *= pixelScaleFactor;
context.setPointLight(nativeHandle, index, x, y, z, r, g, b, w);
}
}
@Override
public void render(Graphics g) {
material.lockTextureMaps();
! context.renderMeshView(nativeHandle, g);
material.unlockTextureMaps();
}
@Override
public void dispose() {