HI alll
i am drawing the image on an opengl view using
[Texture2D_plane drawAtPoint:CGPointMake(_position.x,_position.y)];
but after at certain point i want to make the rotation of the texture what function i have to use for it .
from somewhere i use glRotatef(90,_position.x,_position.y,0);
but i don know how to use it i just want to make rotation of my texture image of at 90degree is this function helpful or i have to use any other way to make its rotation.
if have any code or link that will be appreciable .
Thanks
here it is my draw at point method implementation
(void) drawAtPoint:(CGPoint)point { GLfloat coordinates[] = { 0, _maxT, _maxS, _maxT, 0, 0, _maxS, 0 }; GLfloat width = (GLfloat)_width * _maxS, height = (GLfloat)_height * _maxT; GLfloat vertices[] = { -width / 2 + point.x, -height / 2 + point.y, 0.0, width / 2 + point.x, -height / 2 + point.y, 0.0, -width / 2 + point.x, height / 2 + point.y, 0.0, width / 2 + point.x, height / 2 + point.y, 0.0 };
glBindTexture(GL_TEXTURE_2D, _name); glVertexPointer(3, GL_FLOAT, 0, vertices); glTexCoordPointer(2, GL_FLOAT, 0, coordinates); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } this is the implementation of the draw at point
Balraj verma