aboutsummaryrefslogtreecommitdiffstats
path: root/Samples/CommonSrc/Platform/Platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'Samples/CommonSrc/Platform/Platform.h')
-rw-r--r--Samples/CommonSrc/Platform/Platform.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/Samples/CommonSrc/Platform/Platform.h b/Samples/CommonSrc/Platform/Platform.h
index 47d8f67..e9325a7 100644
--- a/Samples/CommonSrc/Platform/Platform.h
+++ b/Samples/CommonSrc/Platform/Platform.h
@@ -24,7 +24,7 @@ limitations under the License.
#ifndef OVR_Platform_h
#define OVR_Platform_h
-#include "OVR.h"
+#include "OVR_Kernel.h"
#include "Kernel/OVR_KeyCodes.h"
@@ -34,7 +34,7 @@ namespace OVR { namespace Render {
struct RendererParams;
}}
-namespace OVR { namespace Platform {
+namespace OVR { namespace OvrPlatform {
using Render::RenderDevice;
@@ -116,37 +116,45 @@ protected:
public:
PlatformCore(Application *app);
virtual ~PlatformCore() { }
- Application* GetApp() { return pApp; }
- RenderDevice* GetRenderer() const { return pRender; }
- GamepadManager* GetGamepadManager() const { return pGamepadManager; }
+ Application* GetApp() { return pApp; }
+ RenderDevice* GetRenderer() const { return pRender; }
+ GamepadManager* GetGamepadManager() const { return pGamepadManager; }
- virtual bool SetupWindow(int w, int h) = 0;
+ virtual void* SetupWindow(int w, int h) = 0;
// Destroys window and also releases renderer.
- virtual void DestroyWindow() = 0;
- virtual void Exit(int exitcode) = 0;
+ virtual void DestroyWindow() = 0;
+ virtual void Exit(int exitcode) = 0;
- virtual void ShowWindow(bool visible) = 0;
+ virtual void ShowWindow(bool visible) = 0;
- virtual bool SetFullscreen(const Render::RendererParams& rp, int fullscreen);
+ virtual bool SetFullscreen(const Render::RendererParams& rp, int fullscreen);
// Search for a matching graphics renderer based on type argument and initializes it.
virtual RenderDevice* SetupGraphics(const SetupGraphicsDeviceSet& setupGraphicsDesc,
const char* gtype,
const Render::RendererParams& rp) = 0;
- virtual void SetMouseMode(MouseMode mm) { OVR_UNUSED(mm); }
+ virtual void SetMouseMode(MouseMode mm) { OVR_UNUSED(mm); }
- virtual void GetWindowSize(int* w, int* h) const = 0;
+ virtual void GetWindowSize(int* w, int* h) const = 0;
- virtual void SetWindowTitle(const char*title) = 0;
- virtual void PlayMusicFile(const char *fileName) { OVR_UNUSED(fileName); }
- virtual int GetDisplayCount() { return 0; }
+ virtual void SetWindowTitle(const char*title) = 0;
+ virtual void PlayMusicFile(const char *fileName) { OVR_UNUSED(fileName); }
+ virtual int GetDisplayCount() { return 0; }
virtual Render::DisplayId GetDisplay(int screen);
// Get time since start of application in seconds.
- double GetAppTime() const;
+ double GetAppTime() const;
- virtual String GetContentDirectory() const { return "."; }
+ virtual String GetContentDirectory() const { return "."; }
+
+ // Creates notification overlay text box over the top of OS window. Multiple
+ // messages can be created with different 'index' values. Pass null string
+ // to remove the overlay.
+ // Intended to be used with Oculus display driver only; may be unsupported on some platforms.
+ virtual void SetNotificationOverlay(int index, int fontHeightPixels,
+ int yoffset, const char* text)
+ { OVR_UNUSED4(index, fontHeightPixels, yoffset, text); }
};
//-------------------------------------------------------------------------------------