Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Plugin.cpp
1/*
2Copyright (C) 2017-2019,2021,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
17#include <memory>
19#include "aeongames/AeonEngine.hpp"
20#include "aeongames/Plugin.hpp"
21#include "aeongames/StringId.hpp"
22#include "VulkanRenderer.hpp"
23#include "glslang/Public/ShaderLang.h"
24
25extern "C"
26{
27 bool VulkanStartUp()
28 {
29 glslang::InitializeProcess();
31 [] ( void* aWindow )
32 {
33 return std::make_unique<AeonGames::VulkanRenderer> ( aWindow );
34 } );
35 }
36
37 void VulkanShutdown()
38 {
40 glslang::FinalizeProcess();
41 }
42
43 PLUGIN PluginModuleInterface PMI =
44 {
45 "Vulkan Renderer",
46 "Implements a Vulkan Renderer",
47 VulkanStartUp,
48 VulkanShutdown
49 };
50}
Platform-specific macros, includes, and DLL export/import definitions.
Defines the plugin module interface for dynamically loaded plugins.
DLL bool RegisterRendererConstructor(const StringId &aIdentifier, const std::function< std::unique_ptr< Renderer >(void *) > &aConstructor)
Registers a Renderer loader for a specific identifier.
DLL bool UnregisterRendererConstructor(const StringId &aIdentifier)
Unregisters a Renderer loader for a specific identifier.
Interface that every loadable plugin module must expose.
Definition Plugin.hpp:35