Menu
Forums
Login | Register

Home > Forums > OpenGL ES > Probrem of drawing Map Page :  1 
Probrem of drawing Map
I have already set up a 4X4 map,

GLfloat GFloor[] ={
1.0f, 0.0f, 1.0f,
1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f,

2.0f, 0.0f, 1.0f,
2.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,

3.0f, 0.0f, 1.0f,
3.0f, 0.0f, 0.0f,
2.0f, 0.0f, 0.0f,
2.0f, 0.0f, 1.0f,

4.0f, 0.0f, 1.0f,
4.0f, 0.0f, 0.0f,
3.0f, 0.0f, 0.0f,
3.0f, 0.0f, 1.0f,
......
skip..
......
3.0f, 0.0f, 4.0f,
3.0f, 0.0f, 3.0f,
2.0f, 0.0f, 3.0f,
2.0f, 0.0f, 4.0f,

4.0f, 0.0f, 4.0f,
4.0f, 0.0f, 3.0f,
3.0f, 0.0f, 3.0f,
3.0f, 0.0f, 4.0f,

};
--------------------------


in the display function, i just use that way to draw


-------------------------
glPushMatrix();
glColor4f(1.0f ,0.0f, 0.0f , 1.0f);
glVertexPointer(3, GL_FLOAT, 0, GFloor);
glDrawArrays(GL_LINE_LOOP ,0, 4);
glDrawArrays(GL_LINE_LOOP , 4, 4);
glDrawArrays(GL_LINE_LOOP, 8, 4);
.......
.......
glDrawArrays(GL_LINE_LOOP, 60, 4);
----------------------
in here it is ok !
ugluLookAtf(0.0f,2.0f,0.0f,0.0f,0.0f,2.0f,0.0f, 1.0f, 0.0f);
http://www.uploadgeek.nl/files/70272806233600598509.jpg



if I move near , it appear some line that i have not draw (blue circle)
What happen with that ??
ugluLookAtf(0.0f,2.0f,3.0f,0.0f,0.0f,5.0f,0.0f, 1.0f, 0.0f);
http://www.uploadgeek.nl/files/71822549888889074720.jpg


Home > Forums > OpenGL ES > Probrem of drawing Map Page :  1 

You need to be logged in to reply to this topic.


All Rights Reserved, © Zeus Communications, Multimedia & Development 2004-2005

Read the Disclaimer

Links