From 1548f306f3f88ebea03147b64842c94ad60ec6f2 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 5 Jun 2020 09:46:54 -0700 Subject: Added documentation for AppBase (fixed https://github.com/DiligentGraphics/DiligentTools/issues/12) --- NativeApp/include/Linux/LinuxAppBase.hpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'NativeApp/include/Linux/LinuxAppBase.hpp') diff --git a/NativeApp/include/Linux/LinuxAppBase.hpp b/NativeApp/include/Linux/LinuxAppBase.hpp index f982b00..9eb1a3a 100644 --- a/NativeApp/include/Linux/LinuxAppBase.hpp +++ b/NativeApp/include/Linux/LinuxAppBase.hpp @@ -50,14 +50,38 @@ namespace Diligent { +/// Base class for iOS applications. class LinuxAppBase : public AppBase { public: + /// Called when GL context is initialized + + /// An application must override this method to perform requred + /// initialization operations after OpenGL context has been initialized + /// by the framework + /// \param [in] display - XLib display. + /// \param [in] window - XLib window. virtual void OnGLContextCreated(Display* display, Window window) = 0; - virtual int HandleXEvent(XEvent* xev) { return 0; } + + /// Handles an XLib event. + + /// An application may override this method to handle XLib events. + /// \param [in] xev - XLib event + virtual int HandleXEvent(XEvent* xev) { return 0; } #if VULKAN_SUPPORTED + /// Called by the framework to initialize Vulkan. + + /// An application must override this method to initialize Vulkan. + /// \param [in] connection - XCB connection + /// \param [in] window - XCB window + /// \return true if the initialization was successful and false otherwise virtual bool InitVulkan(xcb_connection_t* connection, uint32_t window) = 0; + + /// Handles an XCB event. + + /// An application may override this method to handle XCB events. + /// \param [in] event - XCB event virtual void HandleXCBEvent(xcb_generic_event_t* event) {} #endif }; -- cgit v1.2.3