Results 1 to 3 of 3

Thread: Resize after drawing points with glVertex

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2007
    Posts
    6

    Resize after drawing points with glVertex

    Hello all,

    I use glVertex to draw entire images, pixel by pixel, using pixel intensity information that I get from source data. The source data is a listing of pixel intensity and position (not an image). This works fine if the size of the image I want to draw is the same as the original data, but if I enlarge the window, I am left with blank space between pixels.

    Does anyone have any suggestions as to what I can do to rezise my image and still have it appear complete?

    Thanks,
    Jack

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Resize after drawing points with glVertex

    If your data is ordered in line/columns, just create a texture of it : instant bilinear filtering !

    Apparently it is not, so you have to use a different way of interpolation.
    One possible way is to build a 2d surface out of your points, using delaunay triangulation : you will get linear color interpolation between vertex.
    http://www.cs.cmu.edu/afs/cs.cmu.edu.../triangle.html

  3. #3
    Senior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: Resize after drawing points with glVertex

    you can create quads out of your points, then when the image is scaled the quads will scale with it. You can also do as Z says, and create the image as a texture... I think I'd rather do what Z says.

Similar Threads

  1. Drawing points before drawing a curve line
    By PepeBeef in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-26-2017, 09:34 PM
  2. Drawing points
    By annette in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-12-2012, 04:28 PM
  3. Timing drawing of points.
    By ooIsNotMyThing in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-19-2009, 08:21 AM
  4. Drawing milions of points?
    By metalac in forum OpenGL: Basic Coding
    Replies: 16
    Last Post: 07-22-2008, 11:11 PM
  5. drawing arrays of points
    By abner in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 07-15-2007, 08:01 PM

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