VBO doesn't draw anything

后端 未结 2 429
情话喂你
情话喂你 2021-01-24 07:48

I am trying to draw a square with VBO in my native blackberry 10 application. My implementation is,

    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    g         


        
2条回答
  •  囚心锁ツ
    2021-01-24 08:39

    It has transpired in the comments that tileCoordList and tileTextureCoordListare pointers to Square3D structures.

    This means that the sizeof operator will give you the size of a pointer, not the size of the struct.

    You could use e.g.

    glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(*tileCoordList), tileCoordList);
    

    instead.

提交回复
热议问题