#### Archived

This topic is now archived and is closed to further replies.

# OpenGL Iso View - Trying to get the view right

This topic is 6102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey all, I''m struggling with how to get these 10 quads on a good isometric view, I can''t seem to do it. Everything just goes a little flat it appears. Either way, can anyone tell me what values I should be using for gluLookAt? Currently it looks at the middle square and draws from there, based on the middle square.
int DrawGLScene(GLvoid)
{
int tile;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
gluLookAt(5.0f, 5.0f, 20.0f,   5.0f, 5.0f, 0.0f,   0.0f, 1.0f, 0.0f);
for (int y = 0; y < MAP_SIZEY; y++)
{
for (int x = 0; x < MAP_SIZEX; x++)
{
tile = map[x][y];
glColor3f(0.2f,0.0f,0.0f);
glVertex3f(float(x), float(y), 0.0f);
glVertex3f(float(x + 1), float(y), 0.0f);
glVertex3f(float(x + 1), float(y + 1), 0.0f);
glVertex3f(float(x), float(y + 1), 0.0f);
glEnd();
}
}
return TRUE;
}
[/CODE]

So anyone know what values I should put in gluLookAt to get a good isometric view of the tiles?

##### Share on other sites
You are using gllookat? Ick. I use a matrix myself so can''t help there.

Also, what is your projection set up as? Are you using ortho, or perspective or... ?

##### Share on other sites
Perspective...

I have no loyal ties to gluLookAt, so if you can offer a better way to do it, I''m all for it =P

##### Share on other sites

You need to know vector/matrix math, check NEHE, I think he has matrix example.

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 13
• 76
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632968
• Total Posts
3009585
• ### Who's Online (See full list)

There are no registered users currently online

×