14 void reshape(int x, int y);
15 void keyb(unsigned char key, int x, int y);
17 int win_width, win_height;
21 unsigned int fb[FB_W * FB_H];
26 int main(int argc, char **argv)
28 glutInit(&argc, argv);
29 glutInitWindowSize(1280, 960);
30 glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
31 glutCreateWindow("voxel landscape test");
33 glutDisplayFunc(display);
34 glutReshapeFunc(reshape);
35 glutKeyboardFunc(keyb);
50 if(!(vox = vox_open("data/height.png", "data/color.png"))) {
53 vox_framebuf(vox, FB_W, FB_H, fb);
54 vox_proj(vox, 45, 5, 100);
55 vox_view(vox, 512, 512, 0);
57 glfb_setup(FB_W, FB_H, GLFB_RGBA32, FB_W * 4);
74 assert(glGetError() == GL_NO_ERROR);
82 void reshape(int x, int y)
84 glViewport(0, 0, x, y);
90 void keyb(unsigned char key, int x, int y)