mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 04:49:39 -10:00
This separates OpenGL context creation from window creation and also allows to implement multiple viewports in the future.
22 lines
611 B
C++
22 lines
611 B
C++
|
|
#ifndef _SDL_GRAPHICS_OPERATIONS
|
|
#define _SDL_GRAPHICS_OPERATIONS
|
|
#pragma once
|
|
|
|
#include "osapi/osapi.h"
|
|
|
|
class SDLGraphicsOperations: public os::GraphicsOperations {
|
|
public:
|
|
SDLGraphicsOperations();
|
|
~SDLGraphicsOperations() override;
|
|
|
|
std::unique_ptr<os::OpenGLContext> createOpenGLContext(os::Viewport* viewport,
|
|
const os::OpenGLContextAttributes& gl_attrs) override;
|
|
|
|
void makeOpenGLContextCurrent(os::Viewport* view, os::OpenGLContext* ctx) override;
|
|
|
|
std::unique_ptr<os::Viewport> createViewport(const os::ViewPortProperties& props) override;
|
|
};
|
|
|
|
#endif // _SDL_GRAPHICS_OPERATIONS
|