Results 1 to 5 of 5

Thread: GL_LINE Vs. DDA algorithm

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    2

    GL_LINE Vs. DDA algorithm

    I do not understand what is the difference between the line that is drawn by glBegin(GL_LINE) and the line which is drawn by DDA algorithm.

    and I do not know whether DDA is better than glBegin(GL_LINE) or not.

    Thanks for replying me

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,674

    Re: GL_LINE Vs. DDA algorithm

    What is "DDA algorithm"?

  3. #3
    Newbie OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,789

    Re: GL_LINE Vs. DDA algorithm

    OpenGL itself doesn't specify how a line is drawn, it just specifies that a line is drawn. So it could be using any algorithm, or different algorithms on different implementations, or even different algorithms on the same implementation, depending on combinations of states and/or parameters.

    Also - and this is critical - OpenGL will most likely be using your graphics hardware for drawing lines (note that some hardware can't draw some lines which are required to be supported, in which case the driver will do it in software). It's (mostly) incorrect to think of anything OpenGL does in terms of comparison to any software algorithm.

    (It's also the case that what's efficient or better quality in a software approach is not necessarily so with hardware, so many such comparisons are completely invalid to begin with.)

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,650

    Re: GL_LINE Vs. DDA algorithm

    Quote Originally Posted by Alfonse Reinheart
    What is "DDA algorithm"?
    Digital Differential Analyzer.

    Blast from the past -- remember reading about this back in the 80's back before modern 3D graphics APIs. Simple fixed-point technique for deciding which pixels get set when drawing a line (or curve) between 2 points on a raster display.

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    2

    Re: GL_LINE Vs. DDA algorithm

    Thanks for answering my question. I got my answer.

    Good Luck

Similar Threads

  1. Z buffer offsetting for GL_LINE
    By David Sankel in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 04-26-2011, 12:48 PM
  2. GLSL w/ glPolygonMode(..., GL_LINE)
    By Jon M. Davidson in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 08-31-2010, 02:34 PM
  3. GL_FILL and GL_LINE at once?
    By cunny in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 08-02-2002, 05:50 AM
  4. GL_LINE and GL_FILL at once??
    By cunny in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-01-2002, 02:07 AM
  5. glPolygonMode ..., GL_LINE
    By in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 10-25-2001, 06:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean