Просмотр исходного кода

Add temporary wrapper to frame(cb) in order to test stuff under Android

Daniele Bartolini 12 лет назад
Родитель
Сommit
d8a53eb181
2 измененных файлов с 8 добавлено и 0 удалено
  1. 6 0
      engine/Device.cpp
  2. 2 0
      engine/Device.h

+ 6 - 0
engine/Device.cpp

@@ -693,5 +693,11 @@ Device* device()
 	return &g_device;
 }
 
+void nothing(float)
+{
+	device()->renderer()->set_layer_clear(0, CLEAR_COLOR | CLEAR_DEPTH, Color4::LIGHTBLUE, 1.0f);
+	device()->renderer()->commit(0);
+}
+
 } // namespace crown
 

+ 2 - 0
engine/Device.h

@@ -54,6 +54,7 @@ class BundleCompiler;
 class ResourcePackage;
 
 typedef void (*cb)(float);
+void nothing(float);
 
 /// The Engine.
 /// It is the place where to look for accessing all of
@@ -107,6 +108,7 @@ public:
 
 	/// Updates all the subsystems
 	void					frame(cb callback);
+	void					frame() { frame(nothing); }
 
 	/// Returns the resource package with the given @a package_name name.
 	ResourcePackage*		create_resource_package(const char* name);