more opengl work

This commit is contained in:
benfry
2004-11-09 22:05:55 +00:00
parent 90496a6135
commit 005c204ab0

View File

@@ -343,6 +343,11 @@ public class PGraphics extends PImage
}
/**
* Called in repsonse to a resize event, handles setting the
* new width and height internally, as well as re-allocating
* the pixel buffer for the new size.
*/
public void resize(int iwidth, int iheight) { // ignore
//System.out.println("resize " + iwidth + " " + iheight);
@@ -365,17 +370,12 @@ public class PGraphics extends PImage
farDist = eyeDist * 10.0f;
aspect = (float)width / (float)height;
//beginCamera();
//perspective(fov, aspect, nearDist, farDist);
//lookat(eyeX, eyeY, eyeDist, eyeX, eyeY, 0, 0, 1, 0);
//endCamera();
//camera_mode = PERSPECTIVE;
cameraMode(PERSPECTIVE);
}
// broken out because of subclassign for opengl
private void allocate() {
// broken out because of subclassing for opengl
protected void allocate() {
pixelCount = width * height;
pixels = new int[pixelCount];