--- libgender/test.C 2005/02/07 08:16:31 1.99 +++ libgender/test.C 2005/08/09 23:58:43 1.106 @@ -208,13 +208,13 @@ { int i; int rgb_size[3]; - int w = 640; - int h = 480; + int w = 1600; + int h = 1200; int done = 0; int frames; Uint32 video_flags; int value; - GLenum gl_error; + GLenum gl_error; if (SDL_Init (SDL_INIT_VIDEO) < 0) { @@ -266,6 +266,7 @@ SDL_GL_SetAttribute (SDL_GL_RED_SIZE, rgb_size[0]); SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, rgb_size[1]); SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, rgb_size[2]); + SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, 0); SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); @@ -296,6 +297,8 @@ printf ("SDL_GL_GREEN_SIZE: requested %d, got %d\n", rgb_size[1], value); SDL_GL_GetAttribute (SDL_GL_BLUE_SIZE, &value); printf ("SDL_GL_BLUE_SIZE: requested %d, got %d\n", rgb_size[2], value); + SDL_GL_GetAttribute (SDL_GL_ALPHA_SIZE, &value); + printf ("SDL_GL_ALPHA_SIZE: requested ?, got %d\n", value); SDL_GL_GetAttribute (SDL_GL_DEPTH_SIZE, &value); printf ("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", bpp, value); SDL_GL_GetAttribute (SDL_GL_DOUBLEBUFFER, &value); @@ -318,9 +321,11 @@ SDL_SetGamma (gamma, gamma, gamma); testmat = new test_material; - testmat2 = new test_material2; + testmat2 = new mat_gouraud_shaded (colour (1, 1, 0)); + testmat3 = new mat_timed (); + debugmat = new mat_debug (); - entity_moveable *planet = new entity_moveable (new geometry_sphere (testmat, 10)); + entity_moveable *planet = new entity_moveable (new geometry_sphere (testmat2, 10)); planet->move (vec3 (0, 0, -20)); planet->show (); @@ -329,6 +334,16 @@ doom3parse ("test.proc"); + skybox sb ( + "textures/skybox_mystery/1.jpg", + "textures/skybox_mystery/2.jpg", + "textures/skybox_mystery/3.jpg", + "textures/skybox_mystery/4.jpg", + "textures/skybox_mystery/5.jpg", + "textures/skybox_mystery/6.jpg" + ); + world_skybox = &sb; + for (int i = 0; i < 20; i++) { // load a entity @@ -356,7 +371,7 @@ } { - entity *planet = new entity (new geometry_sphere (testmat, 4e15)); + entity *planet = new entity (new geometry_sphere (testmat3, 4e15)); planet->move (vec3 (0, 0, 1e17)); planet->show (); } @@ -415,7 +430,7 @@ // mylight.intensity = 1.F; mylight2.radius = 100000; - mylight2.c = colour (1., 1., 1., 1.); + mylight2.c = colour (0., 1., 1., 1.); mylight2.intensity = 1.F; mylight2.orig.x = 0; mylight2.orig.y = 0; mylight2.orig.z = 0; mylight2.p.x = 0; mylight2.p.y = 0; mylight2.p.z = 0; @@ -444,7 +459,7 @@ //mylight.p = camera.p; mylight2.orig = camera.orig; - mylight2.p = vec3 (sin (timer.now / 2) * 100000, 1, cos (timer.now / 2) * 100000); + //mylight2.p = vec3 (sin (timer.now / 2) * 100000, 1, cos (timer.now / 2) * 100000); //mylight.intensity = max (sinf (timer.now) + 1.2F, 0.2F);