modules/graphics/src/main/java/com/sun/prism/es2/ES2MeshView.java

Print this page

        

@@ -99,13 +99,17 @@
     float getAmbientLightBlue() {
         return ambientLightBlue;
     }
 
     @Override
-    public void setPointLight(int index, float x, float y, float z, float r, float g, float b, float w) {
+    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;
             lights[index] = new ES2Light(x, y, z, r, g, b, w);
             context.setPointLight(nativeHandle, index, x, y, z, r, g, b, w);
         }
     }
 

@@ -114,11 +118,11 @@
     }
 
     @Override
     public void render(Graphics g) {
         material.lockTextureMaps();
-        context.renderMeshView(nativeHandle, g.getTransformNoClone(), this);
+        context.renderMeshView(nativeHandle, g, this);
         material.unlockTextureMaps();
     }
 
     ES2PhongMaterial getMaterial() {
         return material;