Commit fd5b7acd authored by Steven Fuller's avatar Steven Fuller

Still need to fix OpenGL...

parent 7f0ddafd
...@@ -75,7 +75,11 @@ screen update ...@@ -75,7 +75,11 @@ screen update
* GL_shared_texture_palette for opengl * GL_shared_texture_palette for opengl
* if window looses focus, should it clear the keys ? * if window looses focus, should it clear the keys ?
* add DGA, clean up vi_xlib.c, fix vid mode changing * add DGA, clean up vi_xlib.c, fix vid mode changing
* fix broken opengl * fix broken opengl.. argh wolf3d updates lots of stuff used in other parts
of the game (namely stuff used for hit testing when firing weapon) in the
draw loop.. start by cp wl_draw.c vi_ogl.c and just take out the actual
drawing bits and replace with opengl.
* change visable -> visible
Specific: Specific:
* memory/sound intro screen goes * memory/sound intro screen goes
......
...@@ -29,7 +29,7 @@ int attrib[] = { ...@@ -29,7 +29,7 @@ int attrib[] = {
GLX_RED_SIZE, 5, GLX_RED_SIZE, 5,
GLX_GREEN_SIZE, 5, GLX_GREEN_SIZE, 5,
GLX_BLUE_SIZE, 5, GLX_BLUE_SIZE, 5,
// GLX_DEPTH_SIZE, 16, GLX_DEPTH_SIZE, 16,
GLX_DOUBLEBUFFER, GLX_DOUBLEBUFFER,
None None
}; };
...@@ -135,7 +135,7 @@ int main(int argc, char *argv[]) ...@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
glXMakeCurrent(dpy, win, ctx); glXMakeCurrent(dpy, win, ctx);
XMapWindow(dpy, win); // XMapWindow(dpy, win);
XFlush(dpy); XFlush(dpy);
...@@ -157,8 +157,8 @@ void VL_WaitVBL(int vbls) ...@@ -157,8 +157,8 @@ void VL_WaitVBL(int vbls)
void VW_UpdateScreen() void VW_UpdateScreen()
{ {
// glXSwapBuffers(dpy, win); glXSwapBuffers(dpy, win);
// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
} }
/* /*
...@@ -176,15 +176,17 @@ void VL_Startup() ...@@ -176,15 +176,17 @@ void VL_Startup()
if (gfxbuf == NULL) if (gfxbuf == NULL)
gfxbuf = malloc(320 * 200 * 1); gfxbuf = malloc(320 * 200 * 1);
// XMapWindow(dpy, win); XMapWindow(dpy, win);
glColor4f(0.0f, 0.0f, 0.0f, 0.0f); glColor4f(0.0f, 0.0f, 0.0f, 0.0f);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glEnable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
glFrustum(-0.286751, 0.286751, -0.288675, 0.288675, 0.500000, 182.000000);
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glLoadIdentity();
glMatrixMode(GL_TEXTURE); glMatrixMode(GL_TEXTURE);
...@@ -517,6 +519,14 @@ int XKeysymToScancode(unsigned int keysym) ...@@ -517,6 +519,14 @@ int XKeysymToScancode(unsigned int keysym)
case XK_KP_Enter: case XK_KP_Enter:
case XK_Return: case XK_Return:
return sc_Enter; return sc_Enter;
case XK_1:
return sc_1;
case XK_2:
return sc_2;
case XK_3:
return sc_3;
case XK_4:
return sc_4;
case XK_y: case XK_y:
return sc_Y; return sc_Y;
case XK_n: case XK_n:
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment