Loading...
Logo
Processing Forum
I get a black window when I try to run this simple program:

import processing.opengl.*;

void setup() {
  size(100, 100, OPENGL);
  background(0);
  stroke(255);
}

void draw() { 
  point(mouseX, mouseY);
}

The only way I can see some pixels is if I increase the strokeWeight to 1.4 or higher (not even 1.3 will work).  But then I get those thicker dots.

I'm running this on an iMac with a ATI Radeon HD 4670.  Can anyone else with a similar setup try this and let me know if they see the same behaviour?

Thanks!


Replies(2)

I vaguely recall an old thread on the topic.
Somehow, think about it: what a point (in the mathematical sense) might be in a 3D vectorial space? Not much unless you give it some size.
For the record, on my Windows 7 computer with an ATI card, I see nothing below a stroke weight of 1.5.
If I zoom on a pixel, I see it is drawn as a single white pixel... and three gray pixels (shadow? anti-aliasing?) on its bottom left sides. I tried some hint()'s, but same result.
Hi Philho,

Thanks for the reply. I did some further research on this and you are right, this is an old issue.  ATI cards in particular have a counter-intuitive way of handling individual points (if at all).

For instance, you can get points to appear without changing their size by enabling:

gl.glEnable(GL.GL_SMOOTH_POINTS)

However they will look a bit dim, even white a color of white.

If found from the old forums that the best approximation of what you'd otherwise see on the other renderers (including OPENGL on NVidia cards) is to draw a short line rather than a point, as such:

line(x, y, x+1, y+1)

dB