Berserk
Public Types | Public Member Functions | Friends | List of all members
GlfwWindowManager Class Referencefinal

Glfw window manager implementation. More...

#include <GlfwWindowManager.hpp>

Inheritance diagram for GlfwWindowManager:
Inheritance graph
[legend]
Collaboration diagram for GlfwWindowManager:
Collaboration graph
[legend]

Public Types

using MakeContextCurrentFunc = std::function< void(const Ref< Window > &)>
 
using SwapBuffersFunc = std::function< void(const Ref< Window > &)>
 

Public Member Functions

BRK_API GlfwWindowManager (bool vsync, bool clientApi)
 
BRK_API ~GlfwWindowManager () override
 
BRK_API Ref< WindowCreateWindow (const StringName &name, const Size2i &size, const String &title) override
 CreateFromImage new OS native rendering window. More...
 
BRK_API Ref< WindowGetPrimaryWindow () override
 
BRK_API MakeContextCurrentFunc GetMakeContextCurrentFunc ()
 
BRK_API SwapBuffersFunc GetSwapBuffersFunc ()
 
- Public Member Functions inherited from WindowManager
virtual BRK_API ~WindowManager ()=default
 

Friends

class Application
 

Detailed Description

Glfw window manager implementation.

Member Typedef Documentation

◆ MakeContextCurrentFunc

using GlfwWindowManager::MakeContextCurrentFunc = std::function<void(const Ref<Window> &)>

◆ SwapBuffersFunc

using GlfwWindowManager::SwapBuffersFunc = std::function<void(const Ref<Window> &)>

Constructor & Destructor Documentation

◆ GlfwWindowManager()

BRK_NS_BEGIN GlfwWindowManager::GlfwWindowManager ( bool  vsync,
bool  clientApi 
)

◆ ~GlfwWindowManager()

GlfwWindowManager::~GlfwWindowManager ( )
override

Member Function Documentation

◆ CreateWindow()

Ref< Window > GlfwWindowManager::CreateWindow ( const StringName name,
const Size2i size,
const String title 
)
overridevirtual

CreateFromImage new OS native rendering window.

Creates new window object with specified properties. Automatically initializes rendering context of window, so it is ready for actual rendering.

Note
Must be called on the main (game) thread
Parameters
nameUnique name of the window in the engine
sizeSize of the window in units
titleWindow title to set
Returns
Created window; null if failed to create or if name is not unique

Implements WindowManager.

◆ GetMakeContextCurrentFunc()

GlfwWindowManager::MakeContextCurrentFunc GlfwWindowManager::GetMakeContextCurrentFunc ( )

◆ GetPrimaryWindow()

Ref< Window > GlfwWindowManager::GetPrimaryWindow ( )
overridevirtual
Returns
Returns primary window of the engine

Implements WindowManager.

◆ GetSwapBuffersFunc()

GlfwWindowManager::SwapBuffersFunc GlfwWindowManager::GetSwapBuffersFunc ( )

Friends And Related Function Documentation

◆ Application

friend class Application
friend

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