• 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

  • 相关阅读:
    人大金仓-国产数据库--九五小庞
    Vue3 —— 常用 Composition API(零)(setup函数、ref函数、reactive函数、响应式、reactive对比ref)
    Oracle通过透明网关查询SQL Server 报错ORA-00904
    用新服务器从零开始部署 DolphinDB
    机器学习笔记 - 关于Contrastive Loss对比损失
    Python 爬虫 / web 面试常见问题
    HashMap常见面试题分析
    java学习步骤-谷粒商城-个人总结
    【STL编程】【竞赛常用】【part 1】
    《Learning from Context or Names?An Empirical Study on Neural Relation Extraction》论文阅读笔记
  • 原文地址:https://blog.csdn.net/wenxinfly/article/details/127804302