Trying to make a square... there's a triangle!
glBegin(GL_QUADS);
glVertex3f(-0.1, 0.1, 0.0);
glVertex3f(0.1, 0.1, 0.0);
glVertex3f(0.1, -0.1, 0.0);
glVertex3f(-0.1, -0.1, 0.0);
// ^^^ Front ^^^
// vvv Back vvv
glVertex3f(-0.1, 0.1, -0.1);
glVertex3f(0.1, 0.1, -0.1);
glVertex3f(0.1, -0.1, -0.1);
glVertex3f(-0.1, -0.1, -0.1);
// vvv Left vvv
glVertex3f(-0.1, 0.1, -0.1);
glVertex3f(-0.1, 0.1, 0.0);
glVertex3f(-0.1, -0.1, -0.1);
glVertex3f(-0.1, -0.1, 0.0);
glEnd();
The left side looks normal, theres a triangle in it, like:
-------
/
\
-------
Heh, thats not so good, but on one of the sides connecting the different 'Z' coordinates, theres a triangle chunk missing from the side! Any help?
glVertex3f(-0.1, 0.1, 0.0);
glVertex3f(0.1, 0.1, 0.0);
glVertex3f(0.1, -0.1, 0.0);
glVertex3f(-0.1, -0.1, 0.0);
// ^^^ Front ^^^
// vvv Back vvv
glVertex3f(-0.1, 0.1, -0.1);
glVertex3f(0.1, 0.1, -0.1);
glVertex3f(0.1, -0.1, -0.1);
glVertex3f(-0.1, -0.1, -0.1);
// vvv Left vvv
glVertex3f(-0.1, 0.1, -0.1);
glVertex3f(-0.1, 0.1, 0.0);
glVertex3f(-0.1, -0.1, -0.1);
glVertex3f(-0.1, -0.1, 0.0);
glEnd();
The left side looks normal, theres a triangle in it, like:
-------
/
\
-------
Heh, thats not so good, but on one of the sides connecting the different 'Z' coordinates, theres a triangle chunk missing from the side! Any help?
Meh, the ascii art got trashed... ._.
--------
------/ supposed to look like this,
------\ Little triangle out of the side!
--------
--------
------/ supposed to look like this,
------\ Little triangle out of the side!
--------
left should be something like
glVertex3f(-0.1, 0.1, -0.1);
glVertex3f(-0.1, 0.1, 0.0);
glVertex3f(-0.1, -0.1, 0.0);
glVertex3f(-0.1, -0.1, -0.1);
glVertex3f(-0.1, 0.1, -0.1);
glVertex3f(-0.1, 0.1, 0.0);
glVertex3f(-0.1, -0.1, 0.0);
glVertex3f(-0.1, -0.1, -0.1);
©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Ah, thanks. Would it be smarter to just use a 'glutSoliderCube()'?
TimMcD Wrote:Ah, thanks. Would it be smarter to just use a 'glutSoliderCube()'?
Not if you want to ever use something besides GLUT, but otherwise, glutSolidCube is fine. Here's a little colored cube demo using GLUT, which I posted about a month ago.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL ES : Dynamic calculation of triangle indices | akademiks | 0 | 3,462 |
Sep 13, 2011 07:58 AM Last Post: akademiks |
|
| Want good color interpolation for my square | Najdorf | 2 | 3,372 |
Nov 22, 2009 10:11 PM Last Post: Najdorf |
|
| texture no square surface | kendric | 7 | 3,852 |
Mar 20, 2009 05:26 PM Last Post: kendric |
|
| Triangle strip length | imikedaman | 6 | 5,192 |
Aug 6, 2006 05:32 PM Last Post: NicholasFrancis |
|
| Non-square, non-POT, hardware-accelerated surfaces... | NekoYasha | 13 | 5,282 |
Oct 25, 2005 03:06 PM Last Post: NekoYasha |
|

