godot引擎学习2

godot原生插件开发有几类
1,脚本插件
2,音视频插件
3,网络插件

libgdnative_videodecoder.dll开发记录

dll导出函数godot_gdnative_init
godot_gdnative_terminate
godot_nativescript_init

*********************
WebRTCDataChannelGDNative : public WebRTCDataChannel
成员
const godot_net_webrtc_data_channel *interface;
通过
set_native_webrtc_data_channel(const godot_net_webrtc_data_channel *p_impl)


WebRTCPeerConnectionGDNative : public WebRTCPeerConnection
成员:
static const godot_net_webrtc_library *default_library;
const godot_net_webrtc_peer_connection *interface;
通过:
static Error set_default_library(const godot_net_webrtc_library *p_library);
void set_native_webrtc_peer_connection(const godot_net_webrtc_peer_connection *p_impl);

上面两个类的*interface相当于抽象接口,在插件dll中实现。

exe的导出函数
godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *);
godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *);
godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *);

dll的导出函数:
godot_gdnative_singleton
godot_gdnative_init
godot_gdnative_terminate
godot_nativescript_init

dll中godot_webrtc::WebRTCLibPeerConnection相当于把exe中godot::WebRTCPeerConnectionGDNative重写了
并注册到脚本中,这样,脚本就可以使用了。
而godot_webrtc::WebRTCLibPeerConnection直接调用webrtc中的函数

git初次加入文件到gitlab中
在gitlab上创建工程
1,在本地的目录中,git bash, 执行 git init
2, git add .
3,git commit -m"初始化文件“
4,git remote add origin  https://gitlab.xx.com/xxxx.git 出错后执行 git remote rm origin
5,git remote -v 查看
6, git pull --rebase origin master 拉一下 (可以不要)
7 git push -u origin master

scons是一个Python写的自动化构建工具
1)单个文件
Program('helloScons.c')
或 指定可执行文件名字
Program('newName', 'helloScons.c')
2)多个文件
Program(['helloScons.c', 'extScons.c'])

Program(Glob('*.c'))

3)动态库
SharedLibrary('ext/extScons.c')
Program(['helloScons.c'], LIBS=['extScons'], LIBPATH='./ext')
如果想编译为静态链接库则使用StaticLibrary()

godot定制开发 QQ 35484348

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值