ngfx::BaseApplication
Inherits from ngfx::InputListener
Inherited by ngfx::MTLApplication
Public Functions
Name | |
---|---|
BaseApplication(const std::string & appName, int w =Window::DISPLAY_WIDTH, int h =Window::DISPLAY_HEIGHT, bool enableDepthStencil =false, bool offscreen =false) | |
virtual | ~BaseApplication() |
virtual void | init() |
virtual void | createWindow() |
virtual void | paint() |
virtual void | recordCommandBuffers() |
virtual void | close() |
virtual void | onInit() |
virtual void | onRecordCommandBuffer(CommandBuffer * commandBuffer) =0 |
virtual void | onUpdate() |
virtual void | onPaint() |
virtual void | run() |
virtual void | drawFrame() |
Public Attributes
Name | |
---|---|
std::unique_ptr< Graphics > | graphics |
std::unique_ptr< Window > | window |
std::unique_ptr< GraphicsContext > | graphicsContext |
std::string | appName |
int | w |
int | h |
bool | enableDepthStencil |
bool | offscreen |
bool | persistentCommandBuffers |
Protected Attributes
Name | |
---|---|
bool | initOnce |
std::unique_ptr< ngfx::Texture > | outputTexture |
std::unique_ptr< ngfx::Texture > | depthTexture |
std::unique_ptr< Framebuffer > | outputFramebuffer |
Additional inherited members
Public Functions inherited from ngfx::InputListener
Name | |
---|---|
virtual void | onKey(KeyCode code, InputAction action) |
virtual void | onScroll(double xoffset, double yoffset) |
virtual void | onCursorPos(double x, double y) |
virtual void | onMouseButton(MouseButton button, InputAction action) |
Public Functions Documentation
function BaseApplication
BaseApplication(
const std::string & appName,
int w =Window::DISPLAY_WIDTH,
int h =Window::DISPLAY_HEIGHT,
bool enableDepthStencil =false,
bool offscreen =false
)
function ~BaseApplication
inline virtual ~BaseApplication()
function init
virtual void init()
Reimplemented by: ngfx::MTLApplication::init
function createWindow
virtual void createWindow()
function paint
virtual void paint()
Reimplemented by: ngfx::MTLApplication::paint
function recordCommandBuffers
virtual void recordCommandBuffers()
function close
virtual void close()
function onInit
inline virtual void onInit()
function onRecordCommandBuffer
virtual void onRecordCommandBuffer(
CommandBuffer * commandBuffer
) =0
function onUpdate
inline virtual void onUpdate()
function onPaint
virtual void onPaint()
function run
virtual void run()
Reimplemented by: ngfx::MTLApplication::run
function drawFrame
virtual void drawFrame()
Public Attributes Documentation
variable graphics
std::unique_ptr< Graphics > graphics;
variable window
std::unique_ptr< Window > window;
variable graphicsContext
std::unique_ptr< GraphicsContext > graphicsContext;
variable appName
std::string appName;
variable w
int w;
variable h
int h;
variable enableDepthStencil
bool enableDepthStencil = false;
variable offscreen
bool offscreen = false;
variable persistentCommandBuffers
bool persistentCommandBuffers = true;
Protected Attributes Documentation
variable initOnce
bool initOnce = true;
variable outputTexture
std::unique_ptr< ngfx::Texture > outputTexture;
variable depthTexture
std::unique_ptr< ngfx::Texture > depthTexture;
variable outputFramebuffer
std::unique_ptr< Framebuffer > outputFramebuffer;
Updated on 3 April 2021 at 20:21:51 PDT