mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-05 20:23:48 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
53
drape/vulkan/vulkan_context_factory.hpp
Normal file
53
drape/vulkan/vulkan_context_factory.hpp
Normal file
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
|
||||
#include "drape/graphics_context_factory.hpp"
|
||||
#include "drape/vulkan/vulkan_base_context.hpp"
|
||||
#include "drape/vulkan/vulkan_object_manager.hpp"
|
||||
#include "drape/vulkan/vulkan_layers.hpp"
|
||||
#include "drape/pointers.hpp"
|
||||
|
||||
#include <vulkan/vulkan_android.h>
|
||||
|
||||
namespace dp
|
||||
{
|
||||
namespace vulkan
|
||||
{
|
||||
class VulkanContextFactory : public dp::GraphicsContextFactory
|
||||
{
|
||||
public:
|
||||
VulkanContextFactory(uint32_t appVersionCode, int sdkVersion, bool isCustomROM);
|
||||
~VulkanContextFactory() override;
|
||||
|
||||
bool IsVulkanSupported() const;
|
||||
|
||||
dp::GraphicsContext * GetDrawContext() override;
|
||||
dp::GraphicsContext * GetResourcesUploadContext() override;
|
||||
bool IsDrawContextCreated() const override;
|
||||
bool IsUploadContextCreated() const override;
|
||||
void SetPresentAvailable(bool available) override;
|
||||
|
||||
int GetWidth() const;
|
||||
int GetHeight() const;
|
||||
|
||||
VkInstance GetVulkanInstance() const;
|
||||
|
||||
protected:
|
||||
bool QuerySurfaceSize();
|
||||
|
||||
VkInstance m_vulkanInstance = nullptr;
|
||||
drape_ptr<dp::vulkan::Layers> m_layers;
|
||||
VkPhysicalDevice m_gpu = nullptr;
|
||||
VkDevice m_device = nullptr;
|
||||
drape_ptr<dp::vulkan::VulkanObjectManager> m_objectManager;
|
||||
drape_ptr<dp::vulkan::VulkanBaseContext> m_drawContext;
|
||||
drape_ptr<dp::vulkan::VulkanBaseContext> m_uploadContext;
|
||||
|
||||
VkSurfaceKHR m_surface = 0;
|
||||
VkSurfaceFormatKHR m_surfaceFormat;
|
||||
VkSurfaceCapabilitiesKHR m_surfaceCapabilities;
|
||||
|
||||
int m_surfaceWidth = 0;
|
||||
int m_surfaceHeight = 0;
|
||||
};
|
||||
} // namespace vulkan
|
||||
} // namespace dp
|
||||
Reference in New Issue
Block a user