Take a look at where there is wrong, thank you





thank for you help

I took a look.
Too bad it is impossible to help you do something I do not understand.

I don’t know, if you can express yourself, just ask someone around you to write it for you.

hi zBuffer,

I do not know how to express.
Function of the error.
Or a code error.
Can you help me do.
I do not know how to express .my english are very bad(that’s not my fault ,When I had just graduated from college, the English have been not used )

what are you trying to do?
paste your code, link to other websites that describe what you are trying to do, give us something to work with…

hi Mikael Korpela
Code is not on my machine. Next time I re-paste.

#include <stdlib.h>
#include <GL/glut.h>
#include “mytriangle.h”
int width, height;

typedef struct box
{
GLfloat x,
GLfloat y,
GLfloat z
}box;

box a={0,0,1};
box b={0,0.9,-0.3};
box c={-0.8,-0.4,-0.3};
box d={0.8,-0.4,-0.3};

void myinit(void)
{

glClearColor(0.0, 0.0, 0.0, 1.0);

glEnable(GL_DEPTH_TEST);
glShadeModel(GL_FLAT);

}

void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1,0,0);
for(int j=0;j<9;j++)
{
{for(int i=0;i<3;i++)
glCallList(1);
for(int i=0;i<3;i++)
glCallList(1);
for(int i=0;i<3;i++)
glCallList(1);
for(int i=0;i<3;i++)
glCallList(1);}
}

glutSwapBuffers();

}

void myReshape(int w, int h)
{
width = w;
height = h;
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective (45.0, (GLfloat) w/(GLfloat) h, 3.0, 10.0);
//gluFristum
glMatrixMode(GL_MODELVIEW);
glLoadIdentity ();
glTranslatef (0.0, 0.0, -4.0); /* move object into view */
}

void
keyboard(unsigned char c, int x, int y)
{
switch© {
case 27:
exit(1);
default:
break;
}
glutPostRedisplay();

}

/* Main Loop
/
int main(int argc, char
* argv)
{
glutInitWindowSize(380, 380);
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutCreateWindow(“mytest1”);
myinit();
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(keyboard);

glutMainLoop();
return 0;             

}

To me it seems amazing that, that code renders anything at all.
Where do you setup that display list that you call (3+3+3+3)*9 times per frame?

hello mikael korpela.
This is my understanding fault.
I wrote the code is wrong.
Now I understand that this code means.
The intention of this program is split triangle.
I will be re-issued a new, simple code to the explanatory notes. (Inside recursion),
Sometimes you see the master code will be a little difficult to understand.
But you understand the master found very keen.