summaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-08-12 04:18:44 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-08-12 04:50:28 +0200
commitb238ad6dad6942fc6a53dfee5d22e12ad8b13df5 (patch)
tree4f7aa168855296b5d6c98c7b273987759d805247 /src/init.cpp
parent46f45cc37388b442aa83fab76d26b81cc13bb9ca (diff)
downloadfork-godot-webrtc-native-b238ad6dad6942fc6a53dfee5d22e12ad8b13df5.tar.gz
fork-godot-webrtc-native-b238ad6dad6942fc6a53dfee5d22e12ad8b13df5.tar.bz2
fork-godot-webrtc-native-b238ad6dad6942fc6a53dfee5d22e12ad8b13df5.zip
Add initial interface
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
new file mode 100644
index 0000000..601ac2a
--- /dev/null
+++ b/src/init.cpp
@@ -0,0 +1,16 @@
+#include "WebRTCPeer.hpp"
+
+/* Godot export stuff */
+extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o) {
+ godot::Godot::gdnative_init(o);
+}
+
+extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *o) {
+ godot::Godot::gdnative_terminate(o);
+}
+
+extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) {
+ godot::Godot::nativescript_init(handle);
+
+ godot::register_class<WebRTCPeer>();
+}