GL_POINTS don't work in PyOpenGL
Here's a weird one. For some reason, this:
not only doesn't draw anything, but it makes my graphics card work in overdrive (I can hear it spin up whenever the code is run. I really don't understand this one...
Code:
glBegin(GL_POINTS)
glVertex3f(0.0, 0.0, 0.0)
glVertex3f(0.0, 1.0, 0.0)
glEnd()not only doesn't draw anything, but it makes my graphics card work in overdrive (I can hear it spin up whenever the code is run. I really don't understand this one...
It goes into "overdrive" because it's not really doing anything, so it probably goes at like thousands of fps. As for not drawing anything, what location is your camera at? At a z value of 0, if you're in the default position it's going to be behind the near plane of the projection matrix. (unless you're using an orthographic projection) If you make the z value something like -5, you should be able to see something. However, IIRC the default point size is 1, which will equate to 1 pixel, so it will be very small.
I don't know why it didn't work yesterday, but now it works. My next problem is getting them to draw the right color. They're all black, regardless of what values I pass glColor3f()...
Is lighting enabled? If so, disable it before you draw the points.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Enabling vsync with Pygame/PyOpenGL | cecilkorik | 4 | 6,075 |
Apr 12, 2010 07:40 PM Last Post: manifest020 |
|
| stupid GL_POINTs | dave05 | 8 | 3,435 |
May 16, 2006 08:13 AM Last Post: MacFiend |
|
| Problems with smoothed GL_POINTS | Twilight | 5 | 3,605 |
Mar 24, 2005 10:24 AM Last Post: arekkusu |
|

