width, height,
SDL_WINDOW_OPENGL );
SDL_GLContext glcontext = SDL_GL_CreateContext(window);
+ renderer = SDL_CreateRenderer(window, -1, 0);
+
if(window == 0) {
std::stringstream msg;
void
SDLRenderer::flip()
{
- SDL_Flip(screen);
+ SDL_RenderPresent(renderer);
}
void
#ifndef HEADER_SUPERTUX_VIDEO_SDL_RENDERER_HPP
#define HEADER_SUPERTUX_VIDEO_SDL_RENDERER_HPP
-#include <SDL_video.h>
-
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_video.h"
#include "video/renderer.hpp"
class SDLRenderer : public Renderer
private:
SDL_Surface *screen;
+ SDL_Renderer *renderer;
int numerator;
int denominator;