Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/SDL/MyOpenGLView.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ extern int debug;

int keycodetrans[255];

BOOL m_glContextInitialized;
NSPoint mouseDragStartPoint;

BOOL mouseWarped;
Expand Down
30 changes: 3 additions & 27 deletions src/SDL/MyOpenGLView.m
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,6 @@ - (id) init

_mouseWheelDelta = 0.0f;

m_glContextInitialized = NO;

return self;
}

Expand Down Expand Up @@ -523,6 +521,7 @@ - (void) endSplashScreen
*/
}

[self initialiseGLWithSize:firstScreen];
[self updateScreen];
[self autoShowMouse];
}
Expand Down Expand Up @@ -766,34 +765,13 @@ - (NSSize) modeAsSize:(int)sizeIndex

- (void) updateScreen
{
SDL_SetWindowSize(window, (int)viewSize.width, (int)viewSize.height);
SDL_Surface* surface = SDL_GetWindowSurface(window);
int windowWidth, windowHeight;
SDL_GetWindowSize(window, &windowWidth, &windowHeight);
if ((viewSize.width != windowWidth)||(viewSize.height != windowHeight)) // resized
{
viewSize.width = windowWidth;
viewSize.height = windowHeight;
}

if (m_glContextInitialized == NO)
{
[self initialiseGLWithSize:viewSize];
}

if (surface == 0)
return;

// do all the drawing!
//
if (UNIVERSE)
{
[UNIVERSE drawUniverse];
[UNIVERSE drawUniverse]; // do all the drawing!
}
else
{
// not set up yet, draw a black screen
glClearColor( 0.0, 0.0, 0.0, 0.0);
glClearColor( 0.0, 0.0, 0.0, 0.0); // not set up yet, draw a black screen
glClear( GL_COLOR_BUFFER_BIT);
}

Expand Down Expand Up @@ -1365,8 +1343,6 @@ - (void) initialiseGLWithSize:(NSSize) v_size
[[self gameController] setUpBasicOpenGLStateWithSize:pixelSize];
SDL_GL_SwapWindow(window);
squareX = 0.0f;

m_glContextInitialized = YES;
}


Expand Down