Results 1 to 2 of 2

Thread: Drawing the content of an array on the screen

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2010
    Posts
    1

    Drawing the content of an array on the screen

    Hi everyone,

    I have a 2 dimension array which include the (x,y) which is the coordinate of shape (each cell of array have a color of the point). For example: double image[600][800]
    Now I want to put these pixels on the screen by opengl command.but I don't have any idea how to do this.
    Is there anybody who be able to help me?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    992

    Re: Drawing the content of an array on the screen

    You can do it simply with legacy OpenGL using the glDrawPixels command: http://www.opengl.org/sdk/docs/man/x...DrawPixels.xml
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

Similar Threads

  1. Replies: 0
    Last Post: 01-15-2009, 12:06 AM
  2. drawing onto screen not exact screen coord?
    By abraham2119 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-11-2009, 01:43 PM
  3. Copy screen to array
    By mpledge52 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-04-2007, 03:20 AM
  4. Drawing from a vertex array
    By mpledge52 in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 10-19-2007, 03:30 PM
  5. Drawing directly to an array
    By hanskr in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 07-16-2004, 01:18 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