Results 1 to 2 of 2

Thread: Plotting a 2D array in OpenGL

  1. #1
    Join Date
    Sep 2010
    Beans
    6

    Plotting a 2D array in OpenGL

    Hi all;

    Nowadays, I started to learn OpenGL. I have a question. Now, I wanna do a program. This program will mainly plot a 2D array (array1) and then fill it with colors. I have a 2D array (array2) before plotting the array1. array1 will be filled with colors according to datas which in array2. I am new to OpenGL. Therefore, i am not sure even if this program can be done with OpenGL. I am also studying and searching lots of stuff about OpenGL. I will be glad to hear some advice, if you have about what should i do first? By the way, I am using C++. Thanks.

  2. #2
    Join Date
    Nov 2011
    Beans
    56

    Re: Plotting a 2D array in OpenGL

    Quote Originally Posted by rocky7 View Post
    Hi all;

    Nowadays, I started to learn OpenGL. I have a question. Now, I wanna do a program. This program will mainly plot a 2D array (array1) and then fill it with colors. I have a 2D array (array2) before plotting the array1. array1 will be filled with colors according to datas which in array2. I am new to OpenGL. Therefore, i am not sure even if this program can be done with OpenGL. I am also studying and searching lots of stuff about OpenGL. I will be glad to hear some advice, if you have about what should i do first? By the way, I am using C++. Thanks.
    Your post is a bit unclear as to what exactly you are attempting to accomplish.

    You can plot a curve with OpenGL. You could have your data in a 2D array.

    See the following link for more information about graphing a curve with OpenGL.

    http://en.wikibooks.org/wiki/OpenGL_...GL_Tutorial_01


    They use GLUT to create the OpenGL window. That's not a good idea. If you are using Linux you can just create the OpenGL window with GLX, if you later need a full GUI then using one of the GUI toolkits is best such as GTK+, QT, wxWidgets, FLTK, they all let you create an OpenGL window to draw into.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •