Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Why is the SDLQuit function not working

$
0
0

Hi this is my first attempt at messing around with open gl and SDL2.0 to do some graphics test programs that I plan to add music to when I get better at it.

Why is 

	if( e.type == SDL_QUIT )
					{
						quit = true;
					

	//Free resources and close SDL
	close();

not responding to kill the window when I click the x.

Thanks.

 

Entire code 

#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <stdio.h>
#include <string>

// -lSDL2 -lGLU -lglut -lGL

//Screen dimension constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

//Starts …

Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>