74 #ifndef MESA_EGL_NO_X11_HEADERS 75 #define MESA_EGL_NO_X11_HEADERS 88 #include <EGL/eglext.h> 95 #define GLFW_INCLUDE_GLCOREARB 1 96 #include <GLFW/glfw3.h> 132 Context(
const std::string& aRenderer,
133 int aRendererMajorVersion,
134 int aRendererMinorVersion);
153 void create(
const std::string& aRenderer =
"OpenGL",
154 int aRendererMajorVersion = 3,
155 int aRendererMinorVersion = 2);
230 static const char* getDisplayExtensions(EGLDisplay aDisplay);
231 void createDisplay(
int aPlatform,
const std::string& aPlatformStr,
int aDeviceID = -1);
232 void createEGLContextFromDisplay();
233 bool initialiseEGL(std::vector<std::string>& anEGLClientSet);
238 VkPhysicalDevice physical_device;
239 VkDevice logical_device;
243 struct QueueFamilyIndices {
244 int graphics_family = -1;
249 return graphics_family >= 0;
253 bool createVkInstance();
254 bool createVkLogicalDevice();
255 bool getVkPhysicalDevice();
256 bool checkVkInstanceExtensionSupport(std::vector<const char*>* checkExtensions);
258 QueueFamilyIndices getQueueFamilies(VkPhysicalDevice device);
269 EGLDisplay m_display;
271 EGLContext m_context;
272 EGLSurface m_surface;
273 std::vector<EGLDeviceEXT> m_p_egl_devices_set;
278 Display* m_glx_display;
280 GLXContext m_glx_context;
285 VkInstance m_vk_instance;
287 VkQueue m_vk_graphics_queue;
void destroy()
Destroy the context.
void createVulkanWithGLFW(int aVisibilityFlag=0)
Create a Vulkan context using GLFW.
void createGLWithGLFW(int aVisibilityFlag=0)
Create an OpenGL context using GLFW.
Context()
Default Constructor.
static unsigned int getNumberOfEGLDevices()
Accessor on the number of EGL devices.
GLFWwindow * getWindowHandle()
void create(const std::string &aRenderer="OpenGL", int aRendererMajorVersion=3, int aRendererMinorVersion=2)
Create a new context.
void release()
Destroy the context.
void createGLWithGLX()
Create an OpenGL context using GLX.
Context is a class to manage an OpenGL or Vulkan context.
void createGLWithEGL()
Create an OpenGL context using EGL.
static std::vector< std::string > findEGLClients()
Accessor on the list of supported EGL clients.