text working in gl but buggy

This commit is contained in:
benfry
2004-12-13 03:21:16 +00:00
parent fdcd8b68d9
commit 0b780c8151
4 changed files with 10 additions and 1 deletions

View File

@@ -180,6 +180,7 @@ public class PFont implements PConstants {
int pixels[] = new int[twidth * theight];
//images[i] = new PImage(pixels, 64, 64, ALPHA);
images[i] = new PImage(pixels, twidth, theight, ALPHA);
//images[i] = new PImage(pixels, twidth, theight, RGBA);
int bitmapSize = height[i] * width[i];
byte temp[] = new byte[bitmapSize];
@@ -194,7 +195,11 @@ public class PFont implements PConstants {
//images[i].pixels[y * twidth + x] = valu;
images[i].pixels[y * twidth + x] =
(valu << 24) | (valu << 16) | (valu << 8) | valu;
(valu << 24) | 0xFFFFFF;
//0xFFFFFF00 | valu;
//(valu << 24) | (valu << 16) | (valu << 8) | valu;
//0x8040ff40;
//(valu << 24) | (valu << 16) | (valu << 8) | valu;
//System.out.print((images[i].pixels[y*64+x] > 128) ? "*" : ".");
}
//System.out.println();

View File

@@ -1187,6 +1187,7 @@ public class PGraphics extends PImage implements PMethods, PConstants {
lines[lineCount][INDEX] = -1;
lines[lineCount][STROKE_MODE] = strokeCap | strokeJoin;
lines[lineCount][STROKE_WEIGHT] = (int) (strokeWeight + 0.5f); // hmm
lineCount++;
// mark this piece as being part of the current path

View File

@@ -163,6 +163,8 @@ public class PImage implements PConstants, Cloneable {
if ((width2 == width) && (height2 == height)) {
// image can be used by itself as the texture image
tpixels = pixels;
twidth = width;
theight = height;
} else {
if ((width2 > twidth) || (height2 > theight)) {

View File

@@ -15,6 +15,7 @@ X writeTIFF, writeHeaderTIFF, writeTGA, writeHeaderTGA
_ remove need to use depth() at the beginning
_ and cameraMode(PERSPECTIVE) on each frame
_ reverse y coordinates
_ minimum texture size may be 64x64
_ implement size(0, 0) -> just doesn't bother doing a frame.show();
_ implement fullscreen().. this takes over the screen as best it can