Results 1 to 3 of 3

Thread: Rendering single lines

  1. #1
    Guest

    Rendering single lines

    Allright, this may sound as a very dumb question to most of you developers here, but I'm still going to ask it...

    So, I wonder if it's possible to render a single, (un)colored, (un)lightened, (un)textured line in OpenGL? I mean, I might just draw a really thin square, but woulnd't that be unneficient, and unneccessary, since I only want to draw a single line?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Rendering single lines

    Code :
    glBegin(GL_LINES);
    {
        glVertex(start point);
        glVertex(end point);
    }
    glEnd();
    For (un)lit, (un)textured lines, enable/disable states as you wich. If you want textures, enable it. If you don't want lighting, disable it, and so on.

  3. #3
    Guest

    Re: Rendering single lines

    Hey, thanks man! You really helped me!

Similar Threads

  1. Single buffered rendering
    By hlewin in forum OpenGL: Windows
    Replies: 3
    Last Post: 08-19-2013, 03:01 PM
  2. Single Pixel Lines in Textures Shimmer
    By coolguyclay in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 10-28-2008, 12:32 PM
  3. Single IBO and Single VBO or terrain rendering
    By Mars_999 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-27-2007, 07:56 AM
  4. Timings while rendering a single big mesh
    By Funes in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-11-2002, 03:19 PM
  5. Sharing a single Rendering Context
    By Dexter in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-20-2002, 09:10 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