Ejemplo n.º 1
0
void CSDLManager::windowResize(int width, int height) {
	displayWidth = width < 320 ? 320 : width;
	displayHeight = height < 240 ? 240 : height;

	if (sdlWindow) {
		SDL_SetWindowSize(sdlWindow, displayWidth, displayHeight);
	}
	else {
		sdlWindow = SDL_CreateWindow("Shapes Pew Peww", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, displayWidth, displayHeight, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
		glContext = SDL_GL_CreateContext(sdlWindow);
	}

	CEventManager::instance()->post(&CSDLManagerEVENTWindowEventResize(displayWidth, displayHeight));
}
Ejemplo n.º 2
0
void CCamera::refreshCamera(int iWidth, int iHeight) {
	this->notify(&CSDLManagerEVENTWindowEventResize(iWidth, iHeight));
}