gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
gVirtualXRay::Context Class Reference

Context is a class to manage an OpenGL or Vulkan context. More...

#include <Context.h>

Collaboration diagram for gVirtualXRay::Context:
Collaboration graph

Public Member Functions

 Context ()
 Default Constructor. More...
 
 Context (const std::string &aRenderer, int aRendererMajorVersion, int aRendererMinorVersion)
 Default Constructor. More...
 
 ~Context ()
 Destructor. More...
 
void create (const std::string &aRenderer="OpenGL", int aRendererMajorVersion=3, int aRendererMinorVersion=2)
 Create a new context. More...
 
void release ()
 Destroy the context. More...
 
void destroy ()
 Destroy the context. More...
 
bool isReady () const
 
GLFWwindow * getWindowHandle ()
 
const GLFWwindow * getWindowHandle () const
 

Static Public Member Functions

static unsigned int getNumberOfEGLDevices ()
 Accessor on the number of EGL devices. More...
 
static std::vector< std::string > findEGLClients ()
 Accessor on the list of supported EGL clients. More...
 

Protected Member Functions

void createGLWithGLX ()
 Create an OpenGL context using GLX. More...
 
void createGLWithEGL ()
 Create an OpenGL context using EGL. More...
 
void createGLWithGLFW (int aVisibilityFlag=0)
 Create an OpenGL context using GLFW. More...
 
void createVulkanWithGLFW (int aVisibilityFlag=0)
 Create a Vulkan context using GLFW. More...
 

Protected Attributes

std::string m_renderer
 
int m_major_version
 
int m_minor_version
 
GLFWwindow * m_p_window
 
bool m_ready
 

Detailed Description

Context is a class to manage an OpenGL or Vulkan context.

Definition at line 111 of file Context.h.

Constructor & Destructor Documentation

◆ Context() [1/2]

gVirtualXRay::Context::Context ( )

Default Constructor.

◆ Context() [2/2]

gVirtualXRay::Context::Context ( const std::string &  aRenderer,
int  aRendererMajorVersion,
int  aRendererMinorVersion 
)

Default Constructor.

◆ ~Context()

gVirtualXRay::Context::~Context ( )

Destructor.

Member Function Documentation

◆ create()

void gVirtualXRay::Context::create ( const std::string &  aRenderer = "OpenGL",
int  aRendererMajorVersion = 3,
int  aRendererMinorVersion = 2 
)

Create a new context.

◆ createGLWithEGL()

void gVirtualXRay::Context::createGLWithEGL ( )
protected

Create an OpenGL context using EGL.

◆ createGLWithGLFW()

void gVirtualXRay::Context::createGLWithGLFW ( int  aVisibilityFlag = 0)
protected

Create an OpenGL context using GLFW.

◆ createGLWithGLX()

void gVirtualXRay::Context::createGLWithGLX ( )
protected

Create an OpenGL context using GLX.

◆ createVulkanWithGLFW()

void gVirtualXRay::Context::createVulkanWithGLFW ( int  aVisibilityFlag = 0)
protected

Create a Vulkan context using GLFW.

◆ destroy()

void gVirtualXRay::Context::destroy ( )

Destroy the context.

◆ findEGLClients()

static std::vector<std::string> gVirtualXRay::Context::findEGLClients ( )
static

Accessor on the list of supported EGL clients.

◆ getNumberOfEGLDevices()

static unsigned int gVirtualXRay::Context::getNumberOfEGLDevices ( )
static

Accessor on the number of EGL devices.

◆ getWindowHandle() [1/2]

GLFWwindow* gVirtualXRay::Context::getWindowHandle ( )

◆ getWindowHandle() [2/2]

const GLFWwindow* gVirtualXRay::Context::getWindowHandle ( ) const

◆ isReady()

bool gVirtualXRay::Context::isReady ( ) const

◆ release()

void gVirtualXRay::Context::release ( )

Destroy the context.

Field Documentation

◆ m_major_version

int gVirtualXRay::Context::m_major_version
protected

Definition at line 263 of file Context.h.

◆ m_minor_version

int gVirtualXRay::Context::m_minor_version
protected

Definition at line 264 of file Context.h.

◆ m_p_window

GLFWwindow* gVirtualXRay::Context::m_p_window
protected

Definition at line 266 of file Context.h.

◆ m_ready

bool gVirtualXRay::Context::m_ready
protected

Definition at line 290 of file Context.h.

◆ m_renderer

std::string gVirtualXRay::Context::m_renderer
protected

Definition at line 262 of file Context.h.


The documentation for this class was generated from the following file: