Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/PojavLauncher
Path: blob/v3_openjdk/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge.h
2128 views
1
//
2
// Created by maks on 18.10.2023.
3
//
4
#include <android/native_window.h>
5
#include <stdbool.h>
6
#ifndef POJAVLAUNCHER_OSM_BRIDGE_H
7
#define POJAVLAUNCHER_OSM_BRIDGE_H
8
#include "osmesa_loader.h"
9
10
11
typedef struct {
12
char state;
13
struct ANativeWindow *nativeSurface;
14
struct ANativeWindow *newNativeSurface;
15
ANativeWindow_Buffer buffer;
16
int32_t last_stride;
17
bool disable_rendering;
18
OSMesaContext context;
19
} osm_render_window_t;
20
21
bool osm_init();
22
osm_render_window_t* osm_get_current();
23
osm_render_window_t* osm_init_context(osm_render_window_t* share);
24
void osm_make_current(osm_render_window_t* bundle);
25
void osm_swap_buffers();
26
void osm_setup_window();
27
void osm_swap_interval(int swapInterval);
28
29
#endif //POJAVLAUNCHER_OSM_BRIDGE_H
30
31