Skip to content

Commit

Permalink
Add OpenGL initialization code for qcsg & qbsp2 so -draw parameter wo…
Browse files Browse the repository at this point in the history
…rks properly

#138
  • Loading branch information
SamVanheer committed Mar 16, 2022
1 parent 84f0dcc commit 1485051
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/qbsp2/gldraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ void InitWindow (void)
g_GLContext = SDL_GL_CreateContext(g_pWindow);

SDL_GL_MakeCurrent(g_pWindow, g_GLContext);

glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClearIndex(0);
glLoadIdentity();
glDrawBuffer(GL_FRONT);
}

void Draw_ClearWindow (void)
Expand Down
5 changes: 5 additions & 0 deletions utils/qcsg/gldraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ void InitWindow (void)
g_GLContext = SDL_GL_CreateContext(g_pWindow);

SDL_GL_MakeCurrent(g_pWindow, g_GLContext);

glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClearIndex(0);
glLoadIdentity();
glDrawBuffer(GL_FRONT);
}

void Draw_ClearWindow (void)
Expand Down

0 comments on commit 1485051

Please sign in to comment.