cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
cae::IContext Interface Referenceabstract

Interface for OpenGL context. More...

#include <IContext.hpp>

+ Collaboration diagram for cae::IContext:

Public Member Functions

virtual ~IContext ()=default
 
virtual void initialize (const NativeWindowHandle &window)=0
 Initialize the OpenGL context with the given window.
 
virtual void swapBuffers ()=0
 Swap the front and back buffers.
 
virtual void setVSyncEnabled (bool enabled)=0
 Enable or disable VSync.
 
virtual bool isVSyncEnabled () const =0
 Check if VSync is enabled.
 

Public Attributes

GladGLContext gl {nullptr}
 

Detailed Description

Interface for OpenGL context.

Definition at line 20 of file IContext.hpp.

Constructor & Destructor Documentation

◆ ~IContext()

virtual cae::IContext::~IContext ( )
virtualdefault

Member Function Documentation

◆ initialize()

virtual void cae::IContext::initialize ( const NativeWindowHandle & window)
pure virtual

Initialize the OpenGL context with the given window.

Parameters
windowThe native window handle

◆ isVSyncEnabled()

virtual bool cae::IContext::isVSyncEnabled ( ) const
nodiscardpure virtual

Check if VSync is enabled.

Returns
Whether VSync is enabled

◆ setVSyncEnabled()

virtual void cae::IContext::setVSyncEnabled ( bool enabled)
pure virtual

Enable or disable VSync.

Parameters
enabledWhether VSync should be enabled

◆ swapBuffers()

virtual void cae::IContext::swapBuffers ( )
pure virtual

Swap the front and back buffers.

Member Data Documentation

◆ gl

GladGLContext cae::IContext::gl {nullptr}

Definition at line 48 of file IContext.hpp.


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