• 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

  • 相关阅读:
    CycGan简单实现后生成图片存在的问题
    网络安全(黑客)——自学2024
    计网个人作业02
    WebAPI公开接口请求签名验证
    Springboot-‘@Getter‘ not applicable to type,报错是因为没有引用lombok依赖
    Python最新学习路线
    [量子计算与量子信息] 2.1 线性代数
    orcale 大表物理删除字段时间太慢
    中英双语多语言外贸企业网站源码系统 - HanCMS - 安装部署教程
    大数据开发好找工作么?还能入行么?
  • 原文地址:https://blog.csdn.net/wenxinfly/article/details/127804302