This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2HG: [OpenGL] PVR:(Error): glBufferSubData

Part Number: TDA2HG

Hello:

  we are working on visionsdk 3.05, and got a OpenGL error when you call glBufferSubData

[AVMS][963756]GroundTransSignal::set_mvp. auto_height=14.500000
[AVMS][963783]SummWidget::initializeGL. init success
[AVMS][963793]AvmGpu::avm_gpu_update_img_addr. image address is null
andy debug addr 0x1e87e8
andy debug m_assist_line_pair_cnt 33  size 792 
PVR:(Error): glBufferSubData: No memory for object data [0, ]
func:assist_line_3d_process_front_left line 2085 GL: after glBufferSubData() glError (0x505)
PVR:(Error): glBufferSubData: No memory for object data [0, ]
func:assist_line_3d_process_front_right line 2152 GL: after glBufferSubData() glError (0x505)
[AVMS][963993]AvmGpu::avm_gpu_vbo_init. inst_id=1, share vbo success
[AVMS][963993]AvmGpu::avm_gpu_texture_init. inst_id=1, share tex success

and the code is:

  glBindBuffer(GL_ARRAY_BUFFER, m_left_assist_line_vert_buffer);
    glBufferData(GL_ARRAY_BUFFER, vert_size, p_left_vert_arr, GL_DYNAMIC_DRAW);
    printf("m_left_assist_line_vert_buffer size %d  \n",vert_size);

//----------------------------------------------------------------------
        glBindBuffer(GL_ARRAY_BUFFER, m_left_assist_line_vert_buffer);
          eglCheckGlError("glBindBuffer");
        if (m_assist_change)
        {
            //m_assist_change = 0;
            glBufferSubData(GL_ARRAY_BUFFER, 0,
                m_assist_line_pair_cnt*2*3*sizeof(float),
                m_left_assist_line_vert_arr[m_current_deg+ASSIST_LINE_MAX_DEG]);
            eglCheckGlError("glBufferSubData");
            printf("andy debug addr %p\n",m_left_assist_line_vert_arr[m_current_deg+ASSIST_LINE_MAX_DEG]);
            printf("andy debug m_assist_line_pair_cnt %d  size %d \n",m_assist_line_pair_cnt,m_assist_line_pair_cnt*2*3*sizeof(float));
        }

we checked the size of this buffer is 792 not out of memory , why it throw such error

PVR:(Error): glBufferSubData: No memory for object data [0, ]
func:assist_line_3d_process_front_left line 2085 GL: after glBufferSubData() glError (0x505)
PVR:(Error): glBufferSubData: No memory for object data [0, ]
func:assist_line_3d_process_front_right line 2152 GL: after glBufferSubData() glError (0x505)