all repos — mgba @ a9ae152dd4793064c3159de59cd3bc6b32a8ebee

mGBA Game Boy Advance Emulator

src/platform/video-backend.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef VIDEO_BACKEND_H
 7#define VIDEO_BACKEND_H
 8
 9#include "util/common.h"
10
11#ifdef _WIN32
12#include <windows.h>
13typedef HWND WHandle;
14#else
15typedef void* WHandle;
16#endif
17
18struct VideoBackend {
19	void (*init)(struct VideoBackend*, WHandle handle);
20	void (*deinit)(struct VideoBackend*);
21	void (*swap)(struct VideoBackend*);
22	void (*clear)(struct VideoBackend*);
23	void (*resized)(struct VideoBackend*, int w, int h);
24	void (*postFrame)(struct VideoBackend*, const void* frame);
25	void (*drawFrame)(struct VideoBackend*);
26	void (*setMessage)(struct VideoBackend*, const char* message);
27	void (*clearMessage)(struct VideoBackend*);
28
29	void* user;
30
31	bool filter;
32	bool lockAspectRatio;
33};
34
35struct VideoShader {
36	const char* name;
37	const char* author;
38	const char* description;
39	void* passes;
40	size_t nPasses;
41};
42
43#endif