GLfloat vertices4[]={-0.9,0.6, -0.9,0.2, -0.6,0.2, -0.6,0.6,
-0.4,0.6, -0.4,0.2, 0.1,0.2, 0.1,0.6,
0.3,0.6, 0.3,0.2, 0.6,0.2, 0.6,0.6 };
GLushort indices[]={0,1,2,3, 120, 4,5,6,7, 120, 8,9,10,11};
GLenum *value=GL_STREAM_DRAW;
GLfloat temp_err;
glEnable(GL_PRIMITIVE_RESTART);
nResult =GL_ERROR_CHECK((GL_NO_ERROR,"glEnable(GL_PRIMITIVE_RESTART)"));
glPrimitiveRestartIndex(120);
nResult = GL_ERROR_CHECK((GL_NO_ERROR,"glPrimitiveRestartIndex(120);"));
glGenBuffers(1,&bufferid1);
nResult = GL_ERROR_CHECK((GL_NO_ERROR,"glGenBuffers(1,&bufferid1)"));
glGenBuffers(1,bufferid);
glBindBuffer(GL_TEXTURE_BUFFER,bufferid);
glBufferData(GL_TEXTURE_BUFFER,sizeof(vertices4),vertices4,*value);
temp_err=(GLfloat*)glMapBufferRange(GL_TEXTURE_BUFFER,0,8*sizeof(GLfloat),GL_MAP_READ_BIT);
glBindBuffer(GL_ARRAY_BUFFER,bufferid1);
nResult = GL_ERROR_CHECK((GL_NO_ERROR,"glBindBuffer(GL_ARRAY_BUFFER,bufferid1);"));
glBufferData(GL_ARRAY_BUFFER,8*sizeof(GLfloat),temp_err,*value);
*attr_vertex = glGetAttribLocation(shader_data.psId, "a_position");
nResult = GL_ERROR_CHECK((GL_NO_ERROR,"glGetAttribLocation(shader_data.psId, \"a_position\");"));
glVertexAttribPointer(*attr_vertex, 2 , GL_FLOAT, GL_FALSE ,0, 0);
nResult = GL_ERROR_CHECK((GL_NO_ERROR,"glVertexAttribPointer(attr_vertex, 2 , GL_FLOAT, GL_FALSE ,0, 0);"));
glEnableVertexAttribArray(*attr_vertex);
nResult = GL_ERROR_CHECK((GL_NO_ERROR,"glEnableVertexAttribArray(attr_vertex);"));
glUniform1f(glGetUniformLocation(shader_data.psId,"offset_x"),x);
glUniform1f(glGetUniformLocation(shader_data.psId,"offset_y"),y);
glDrawElements(GL_TRIANGLE_FAN, 14,GL_UNSIGNED_SHORT,indices);
「bufferid1」で最初のクワッドの頂点データを渡しているため、1 つのクワッドをレンダリングすることを期待していますが、vertices4 の 3 つのクワッドすべてをレンダリングします。ここで間違っているところを教えてください。