Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: OpenGL points and lines

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Newbie Newbie
    Join Date
    Jan 2013

    OpenGL points and lines

    Here is the version information of OpenGL I am using

    OpenGL version: 3.1.0 - Build
    OpenGL vendor: Intel
    OpenGL renderer: Intel(R) HD Graphics Family

    The following code in my display callback is:
    glColor3f(1.0f, 1.0f, 1.0f);
    for(int r = 1; r < 250; ++r)
    glVertex2i(2, r);

    glColor3f(1.0f, 0.0f, 0.0f);
    glVertex2i(2, 1);
    glVertex2i(2, 249);

    This code should draw one line on top of the other but it renders the red line to the left of the white line. Can anyone explain this? Thanks.
    Last edited by rapademic; 01-03-2013 at 08:06 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