stupid GL_POINTs

dave05
Unregistered
 
Post: #1
um.. I have GL_POINT_SMOOTH enabled.

i use glPointSize(1) with no problem.

but when I use bigger points, they are square. I'm using a G4, and I've heard this is a problem with openGL itself. Is there anything as fast as drawing points that, well, draws circular points?


grrrrrrrrrrrrrr
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
first, a quick checklist -- for smooth points, you need:

* blending enabled
* blend function set to SRC_ALPHA, ONE_MINUS_SRC_ALPHA
* point size within the range returned by glGetDoublev(GL_POINT_SIZE_RANGE,...);

secondly, yes, points suck. draw textured quads instead.
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #3
Points suck.
Quote this message in a reply
dave05
Unregistered
 
Post: #4
that article seems to imply that OpenGL sucks.. haha

too bad Quartz is insanely slow
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #5
dave05 Wrote:that article seems to imply that OpenGL sucks
If you care about pixel precision, yes.

If you care about rendering speed, and can make some compromises in consistency and precision, no.
Quote this message in a reply
dave05
Unregistered
 
Post: #6
I'd like to get an opinion related to the link posted by arekkusu.

I noticed that openGL's Lines have vertical endpoints for lines between -45 and 45 degree rotations and horizonal endpoints for lines between 45 and 135, rather than rounded endpoints or endpoints with slope perpendicular to the direction of the line itself (it was difficult to word that question, but hopefully it was understandable to some degree). It seems also that glSetLineWidth(float) may not actually have any effect, depending on the graphics card.

I'd like my lines to have flat endpoints, but it's important to me that the endpoints have the appropriate slope. Would it make any sense to use a texture of lines of various widths, and stretch them horizontally to match the line length I desire? This shouldn't take to long to code up; I'll let everyone know of the results.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #7
dave05 Wrote:Would it make any sense to use a texture of lines of various widths
No.


more letters.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #8
Yes, if you want explicit control you will need to draw lines as triangle geometry with textures stretched appropriately.

Don't forget to handle antialiasing on both the line body and line endcaps.

And line stipple if you need it. And textured lines (see, it isn't easy if you want to completely replace the built in primitives...)
Quote this message in a reply
Member
Posts: 148
Joined: 2003.03
Post: #9
Wow, that page really shed some light on the subject. I had no idea that hardware-graphics were so unreliable. Definitely clears up some issues I've been having throughout the years.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  GL_POINTS don't work in PyOpenGL Nevada 3 3,576 Feb 23, 2007 04:49 PM
Last Post: akb825
  sorry, stupid question ferum 5 3,133 Nov 28, 2005 07:50 PM
Last Post: maaaaark
  Problems with smoothed GL_POINTS Twilight 5 4,094 Mar 24, 2005 10:24 AM
Last Post: arekkusu