CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
GLRenderAPI.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "OpenGL.hpp"
11
13
14namespace CeresEngine {
15
16 class GLDevice;
17
18 using GLLoaderFunc = void* (*)(const char* name);
19
24
25 class GLRenderAPI final : public RenderAPI {
26 friend class GLDevice;
27
28 private:
31
32 std::function<void()> present;
33
34 public:
35 GLRenderAPI(const RenderAPIDescriptor& descriptor, std::function<void()> present);
37
38 public:
41
44
45 public:
47 void update() final;
48 };
49
50} // namespace CeresEngine
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GLDevice.hpp:29
Definition GLRenderAPI.hpp:25
GPUDevicePtr getDefaultDevice() final
GLRenderAPI(const RenderAPIDescriptor &descriptor, std::function< void()> present)
std::function< void()> present
Definition GLRenderAPI.hpp:32
GLDevicePtr mDevice
The default OpenGL device.
Definition GLRenderAPI.hpp:30
GPUDevicePtr createDevice(const GPUDeviceDescriptor &descriptor, const DevicePickerFunc &pickerFunc=nullptr) final
Definition RenderAPI.hpp:81
Definition Application.hpp:19
void *(*)(const char *name) GLLoaderFunc
Definition GLRenderAPI.hpp:18
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::function< bool(const GPUDeviceInfo &, const GPURenderingCapabilities &)> DevicePickerFunc
Callback interface for the createDevice method.
Definition RenderAPI.hpp:79
Definition GLRenderAPI.hpp:20
GLLoaderFunc loaderFunc
A function that loads OpenGL functions from the driver.
Definition GLRenderAPI.hpp:22
Device descriptor structure.
Definition GPUDevice.hpp:313
Definition RenderAPI.hpp:61