sizeof(vertex_attributes),
vertex_attributes, GL_STATIC_DRAW));
- const GLfloat vertex_attributes_270[] = {
- -1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
- -1.0f, 1.0f, 0.0f, 0.0f, 0.0f,
- 1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
- 1.0f, -1.0f, 0.0f, 1.0f, 1.0f};
-
- GL_CHECK(evas_gl_api_->glGenBuffers(1, &vertex_buffer_obj_270_));
- GL_CHECK(evas_gl_api_->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_270_));
- GL_CHECK(evas_gl_api_->glBufferData(GL_ARRAY_BUFFER,
- sizeof(vertex_attributes_270),
- vertex_attributes_270, GL_STATIC_DRAW));
-
- const GLfloat vertex_attributes_90[] = {
- -1.0f, -1.0f, 0.0f, 0.0f, 1.0f,
- -1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
- 1.0f, 1.0f, 0.0f, 1.0f, 0.0f,
- 1.0f, -1.0f, 0.0f, 0.0f, 0.0f};
-
- GL_CHECK(evas_gl_api_->glGenBuffers(1, &vertex_buffer_obj_90_));
- GL_CHECK(evas_gl_api_->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_90_));
- GL_CHECK(evas_gl_api_->glBufferData(GL_ARRAY_BUFFER,
- sizeof(vertex_attributes_90),
- vertex_attributes_90, GL_STATIC_DRAW));
-
const GLushort index_attributes[] = {0, 1, 2, 0, 2, 3};
GL_CHECK(evas_gl_api_->glGenBuffers(1, &index_buffer_obj_));
GL_CHECK(
current_orientation_ = ecore_evas_rotation_get(ecore_evas_ecore_evas_get(evas_));
- switch (current_orientation_) {
- case 270:
- GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_270_));
- break;
- case 90:
- GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_90_));
- break;
- default:
- GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_));
- } // switch(current_orientation_)
+ GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_));
GL_CHECK(gl_api->glEnableVertexAttribArray(position_attrib_));
// Below 5 * sizeof(GLfloat) value specifies the size of a vertex