GL_POINTS don't work in PyOpenGL

Member
Posts: 100
Joined: 2006.05
Post: #1
Here's a weird one. For some reason, this:

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...
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
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.
Quote this message in a reply
Member
Posts: 100
Joined: 2006.05
Post: #3
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()...
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #4
Is lighting enabled? If so, disable it before you draw the points.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Enabling vsync with Pygame/PyOpenGL cecilkorik 4 7,223 Apr 12, 2010 07:40 PM
Last Post: manifest020
  stupid GL_POINTs dave05 8 3,846 May 16, 2006 08:13 AM
Last Post: MacFiend
  Problems with smoothed GL_POINTS Twilight 5 4,158 Mar 24, 2005 10:24 AM
Last Post: arekkusu