Results 1 to 2 of 2

Thread: Two Dimensional Vertex Arrays

  1. #1
    Junior Member Newbie best4gotten's Avatar
    Join Date
    Aug 2008

    Two Dimensional Vertex Arrays

    I have two Simple questions:
    I want to use GL_VERTEX_ARRAY to render my point clouds which are in form of hundrads of SCANLINES where each scanline contains thousands of points (in two dimentional STL vector).

    1) Is there anyway we can use two dimensional arrays in GL_VERTEX_ARRAY?
    If yes how would we manage glVertexPointer

    2) Can we use STL vector in GL_VERTEX_ARRAY?


  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2007
    Brighton, UK

    Re: Two Dimensional Vertex Arrays

    1) Check glMultiDrawElements.
    2) Of course .. NOT Each 1D STL array guarantees linear storage in memory, so, depending on how your point class/struct is, you *might* be able to pass the address of the first element of each sub-array as vertex data. Not the best way, but..

Similar Threads

  1. arrays of arrays as vertex output/fragment input
    By tsojtsoj in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-17-2018, 08:02 PM
  2. Vertex Arrays, interleaved arrays, mouseMove func
    By Nibirue in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-13-2012, 11:17 AM
  3. Support of Multi-dimensional arrays
    By Sheliak in forum OpenCL
    Replies: 1
    Last Post: 10-19-2011, 05:16 PM
  4. Replies: 4
    Last Post: 08-09-2011, 05:02 PM
  5. Replies: 3
    Last Post: 05-22-2011, 08:39 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