Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: glGetVertexAttribPointerv usage

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Newbie
    Join Date
    Feb 2015

    glGetVertexAttribPointerv usage

    I want to use this function to get data back from vbo to a pointer, where p[0]=x p[2]=y p[3]=z and so on.

    Code :
    GLfloat *ptr = (float*)calloc(vcount* 3, sizeof(float)); //pointer with preallocated memory. 
    GIvoid *vptr;
    glGetVertexAttribPointerv(0, GL_VERTEX_ATTRIB_ARRAY_POINTER,&vptr);
    ptr = (GLfloat*)&vptr;

    Shouldn't ptr[0] be the x value of the first vertex??

    Last edited by ionas_; 01-31-2016 at 06:21 AM.

Tags for this Thread

Posting Permissions

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