Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
fd5b7acd
Commit
fd5b7acd
authored
May 03, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Still need to fix OpenGL...
parent
7f0ddafd
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1081 additions
and
62 deletions
+1081
-62
TODO
src/TODO
+5
-1
vi_glx.c
src/vi_glx.c
+15
-5
vi_ogl.c
src/vi_ogl.c
+1061
-56
No files found.
src/TODO
View file @
fd5b7acd
...
...
@@ -75,7 +75,11 @@ screen update
* GL_shared_texture_palette for opengl
* if window looses focus, should it clear the keys ?
* 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:
* memory/sound intro screen goes
...
...
src/vi_glx.c
View file @
fd5b7acd
...
...
@@ -29,7 +29,7 @@ int attrib[] = {
GLX_RED_SIZE
,
5
,
GLX_GREEN_SIZE
,
5
,
GLX_BLUE_SIZE
,
5
,
//
GLX_DEPTH_SIZE, 16,
GLX_DEPTH_SIZE
,
16
,
GLX_DOUBLEBUFFER
,
None
};
...
...
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
glXMakeCurrent
(
dpy
,
win
,
ctx
);
XMapWindow
(
dpy
,
win
);
//
XMapWindow(dpy, win);
XFlush
(
dpy
);
...
...
@@ -157,8 +157,8 @@ void VL_WaitVBL(int vbls)
void
VW_UpdateScreen
()
{
//
glXSwapBuffers(dpy, win);
//
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glXSwapBuffers
(
dpy
,
win
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
}
/*
...
...
@@ -176,15 +176,17 @@ void VL_Startup()
if
(
gfxbuf
==
NULL
)
gfxbuf
=
malloc
(
320
*
200
*
1
);
//
XMapWindow(dpy, win);
XMapWindow
(
dpy
,
win
);
glColor4f
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
glClearColor
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
glEnable
(
GL_TEXTURE_2D
);
glEnable
(
GL_DEPTH_TEST
);
glMatrixMode
(
GL_PROJECTION
);
glLoadIdentity
();
glFrustum
(
-
0
.
286751
,
0
.
286751
,
-
0
.
288675
,
0
.
288675
,
0
.
500000
,
182
.
000000
);
glMatrixMode
(
GL_MODELVIEW
);
glLoadIdentity
();
glMatrixMode
(
GL_TEXTURE
);
...
...
@@ -517,6 +519,14 @@ int XKeysymToScancode(unsigned int keysym)
case
XK_KP_Enter
:
case
XK_Return
:
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
:
return
sc_Y
;
case
XK_n
:
...
...
src/vi_ogl.c
View file @
fd5b7acd
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment