Using GLfixed
as my vertex number type the following code draws textures as expected:
GLfixed vertices[] =
{
(int)point.x, (int)point.y + size.height,
(int)point.x + size.width, (int)point.y + size.height,
(int)point.x, (int)point.y,
(int)point.x + size.width, (int)point.y
};
glVertexPointer(2, GL_FIXED, 0, vertices);
I read in the OpenGL docs that GLfixed
is the least efficient type and that I should be using GLfloat
instead. But when I switched my code over to floats nothing gets drawn.
GLfloat vertices[] =
{
point.x, point.y + size.height,
point.x + size.width, point.y + size.height,
point.x, point.y,
point.x + size.width, point.y
};
glVertexPointer(2, GL_FLOAT, 0, vertices);
Is there another flag I need to set in the OpenGL state machine to get this to behave as expected?