1#pragma once
2
3#include "taichi/common/core.h"
4#include "taichi/rhi/impl_support.h"
5#include "taichi/rhi/device.h"
6
7namespace taichi::lang {
8namespace opengl {
9
10bool initialize_opengl(bool use_gles = false, bool error_tolerance = false);
11bool is_opengl_api_available(bool use_gles = false);
12bool is_gles();
13void reset_opengl();
14
15std::shared_ptr<Device> make_opengl_device();
16
17#define PER_OPENGL_EXTENSION(x) extern bool opengl_extension_##x;
18#include "taichi/inc/opengl_extension.inc.h"
19#undef PER_OPENGL_EXTENSION
20
21} // namespace opengl
22} // namespace taichi::lang
23