Aether3D Game Engine
System.hpp
1 #ifndef SYSTEM_H
2 #define SYSTEM_H
3 
4 #include <string>
5 
6 #if RENDERER_METAL
7 #import <QuartzCore/CAMetalLayer.h>
8 #import <MetalKit/MetalKit.h>
9 #endif
10 #include "Vec3.hpp"
11 
12 #if !defined( RENDERER_D3D12 ) && !defined( RENDERER_VULKAN ) && !defined( RENDERER_METAL ) && !defined( RENDERER_OPENGL ) && !defined( RENDERER_NULL )
13 #error No renderer defined
14 #endif
15 
109 namespace ae3d
110 {
111  class Texture2D;
112 
113  namespace System
114  {
116  void InitAudio();
117 
119  void InitGamePad();
120 
129  void Draw( Texture2D* texture, float x, float y, float xSize, float ySize, float xScreenSize, float yScreenSize );
130 
132  void Deinit();
133 
135  void EnableWindowsMemleakDetection();
136 
138  void LoadBuiltinAssets();
139 
141  void InitGfxDeviceForEditor( int width, int height );
142 
143 #if RENDERER_METAL
144  void InitMetal( id< MTLDevice > metalDevice, MTKView* view, int sampleCount );
145  void SetCurrentDrawableMetal( id <CAMetalDrawable> drawable, MTLRenderPassDescriptor* renderPass );
146  void BeginFrame();
147 #endif
148 
153  void Assert( bool condition, const char* message );
154 
164  void Print( const char* format, ... );
165 
167  void ReloadChangedAssets();
168 
169  namespace Statistics
170  {
171  std::string GetStatistics();
172  int GetDrawCallCount();
173  int GetVertexBufferBindCount();
174  int GetTextureBindCount();
175  int GetShaderBindCount();
176  int GetRenderTargetBindCount();
177  int GetBarrierCallCount();
178  int GetFenceCallCount();
179  void GetGpuMemoryUsage( unsigned& outUsedMBytes, unsigned& outBudgetMBytes );
180  }
181  }
182 }
183 #endif
Definition: AudioClip.hpp:4