fixed initialization for NEWT

This commit is contained in:
codeanticode
2012-11-01 00:41:09 +00:00
parent 76a22470ec
commit 9be09c160c
2 changed files with 3 additions and 10 deletions
+2 -4
View File
@@ -10396,7 +10396,7 @@ public class PApplet extends Applet
*
* Sets the coordinate space for texture mapping. There are two options,
* IMAGE, which refers to the actual coordinates of the image, and
* NORMALIZED, which refers to a normalized space of values ranging from 0
* NORMAL, which refers to a normalized space of values ranging from 0
* to 1. The default mode is IMAGE. In IMAGE, if an image is 100 x 200
* pixels, mapping the image onto the entire size of a quad would require
* the points (0,0) (0,100) (100,200) (0,200). The same mapping in
@@ -10404,7 +10404,7 @@ public class PApplet extends Applet
*
* ( end auto-generated )
* @webref image:textures
* @param mode either IMAGE or NORMALIZED
* @param mode either IMAGE or NORMAL
* @see PGraphics#texture(PImage)
*/
public void textureMode(int mode) {
@@ -11660,8 +11660,6 @@ public class PApplet extends Applet
/**
* @param a x-coordinate of the image
* @param b y-coordinate of the image
* @param c width to display the image
* @param d height to display the image
*/
+1 -6
View File
@@ -25,7 +25,6 @@ package processing.opengl;
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Dimension;
import java.nio.Buffer;
import java.nio.ByteBuffer;
@@ -582,11 +581,7 @@ public class PGL {
} else if (toolkit == NEWT) {
window = GLWindow.create(caps);
canvasNEWT = new NewtCanvasAWT(window);
Dimension size0 = new Dimension(pg.width, pg.height);
canvasNEWT.setShallUseOffscreenLayer(true); // trigger offscreen layer - if supported
canvasNEWT.setPreferredSize(size0);
canvasNEWT.setMinimumSize(size0);
canvasNEWT.setSize(size0);
canvasNEWT.setBounds(0, 0, pg.width, pg.height);
pg.parent.setLayout(new BorderLayout());
pg.parent.add(canvasNEWT, BorderLayout.CENTER);