From 4b2070f461361792e8f18a46e40a39d1326876e9 Mon Sep 17 00:00:00 2001 From: lmj01 Date: Tue, 1 Aug 2023 10:46:45 +0800 Subject: [PATCH] update --- books/index.md | 1 + cg/bgfx.md | 1 + cpl/cplusplus.md | 31 +++++++++++++++++++++++++++++++ dev-note/cmake.md | 5 ++++- index/community.md | 5 +++++ index/computerScience.md | 18 +++++++++++++++--- index/standard.md | 3 ++- 7 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 cpl/cplusplus.md diff --git a/books/index.md b/books/index.md index 6d14aa4..e6fe0e0 100644 --- a/books/index.md +++ b/books/index.md @@ -2,6 +2,7 @@ ## reading - [Learn OpenGL](../books/Learn%20OpenGL.md) +- [vulkan tutorial](https://vulkan-tutorial.com/) ## readed - [软件设计-从专业到卓越](../books/%E8%BD%AF%E4%BB%B6%E8%AE%BE%E8%AE%A1-%E4%BB%8E%E4%B8%93%E4%B8%9A%E5%88%B0%E5%8D%93%E8%B6%8A.md) diff --git a/cg/bgfx.md b/cg/bgfx.md index 4b88a19..d7e6baa 100644 --- a/cg/bgfx.md +++ b/cg/bgfx.md @@ -1,5 +1,6 @@ # bgfx > bgfx有三个依赖,分别是基础平台,图像库,绘制库 +> bgfx把所有API都弄得和OpenGL一样,连shader上也是如此 ## 搭建环境 ### 源码获取 diff --git a/cpl/cplusplus.md b/cpl/cplusplus.md new file mode 100644 index 0000000..014e19f --- /dev/null +++ b/cpl/cplusplus.md @@ -0,0 +1,31 @@ +# C + +## 参考 +- [What a C programmer should know about memory](https://marek.vavrusa.com/memory/) + +## 面向对象编程 +重载 +比较通用的做法是利用C的可变参数va_args,也可以利用宏和预处理、函数指针来实现,不过需要编写很多额外的代码来管理这些重载函数的管理。 +C语言实现继承有很多中方式, +```c +struct base_s { + int id; +}; +struct parent_s { + int id; + int grade; +}; +struct child_s { + int id; + int grade; + int math; +}; +child_s child; +parent_s *parent = (child_s*)child; +base_s *base = (base_s*)parent; +``` +可以看到在保持内存布局一致的情况下,就可以直接进行重新对内存块进行解析,而在更高级的语言中就是通过语言内部的机制来完成这种内存布局上的特定格式。高级语言就是固定某种数据结构模式来形成一个更严格的编程语言模型。这种模式在大量优秀软件中底层都是如此处理的,使用C语言作为底层数据形式,在使用中间层来完成与C语言的数据交互,这就是其他语言模型在特定场合有一定市场的根本原因。如TCP协议的实现使用scheme的函数式语言来处理,就是因为TCP协议的本身特性非常适合它。 + +linux内核中使用的C语言的面向对象的设计思考参考 +- [Object-oriented design patterns in the kernel, part 1](https://lwn.net/Articles/444910/) +- [Object-oriented design patterns in the kernel, part 2](https://lwn.net/Articles/446317/) \ No newline at end of file diff --git a/dev-note/cmake.md b/dev-note/cmake.md index b9bb939..2bfdbe4 100644 --- a/dev-note/cmake.md +++ b/dev-note/cmake.md @@ -26,4 +26,7 @@ MSBuild.exe INSTALL.vcxproj /p:Configuration=release ``` ## 参考 -- [cmake常用命令](https://zhuanlan.zhihu.com/p/315768216) \ No newline at end of file +- [官网文档](https://cmake.org/cmake/help/latest/index.html) + - [tutorial](https://cmake.org/cmake/help/latest/guide/tutorial/index.html) +- [cmake常用命令](https://zhuanlan.zhihu.com/p/315768216) +- [CMake-tutorial中文教程](https://www.cnblogs.com/lnlin/p/16576418.html) \ No newline at end of file diff --git a/index/community.md b/index/community.md index acbf99d..705712a 100644 --- a/index/community.md +++ b/index/community.md @@ -2,6 +2,11 @@ ## Architecture +### Actor + +- [CAF is an open source implementation of the actor model for C++ featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more.](https://www.actor-framework.org/) + - [document](https://actor-framework.readthedocs.io/en/stable/Introduction.html) + ### Publish/Subscribe messaging paradigm - [Publisher-Subscriber pattern](https://learn.microsoft.com/en-us/azure/architecture/patterns/publisher-subscriber) diff --git a/index/computerScience.md b/index/computerScience.md index 08b0b6e..5c09a2b 100644 --- a/index/computerScience.md +++ b/index/computerScience.md @@ -2,9 +2,15 @@ ## Programing Language -- [python](../cpl/python.md) -- [rust](../cpl/rust.md) -- [C](../cpl/c.md) +### [python](../cpl/python.md) + +### [rust](../cpl/rust.md) + +### [C](../cpl/c.md) + +### [Cplusplus](../cpl/cplusplus.md) + +- []() ## Dev @@ -37,6 +43,11 @@ - [OpenGL](../cg/opengl.md) - [Shader](../cg/shader.md) +- [vulkan]() + - [Official Khronos Vulkan Samples](https://github.com/KhronosGroup/Vulkan-Samples) + - [Vulkan C++ examples and demos ](https://github.com/SaschaWillems/Vulkan) + - [Vulkan Guide](https://github.com/KhronosGroup/Vulkan-Guide) + - [Vulkan Tutorial ](https://vulkan-tutorial.com/) ### UI @@ -48,6 +59,7 @@ - [Bgfx](../cg/bgfx.md) - [Iolite a modern,portable game engine with an embedded editor. Completely scriptable in Lua, Free for personal](https://iolite-engine.com/) - [babylonjs](../babylonjs/index.md) +- [The-Forge](https://github.com/ConfettiFX/The-Forge) #### threejs diff --git a/index/standard.md b/index/standard.md index 979221f..5f33b7e 100644 --- a/index/standard.md +++ b/index/standard.md @@ -15,10 +15,11 @@ - [HTML Living Standard](https://html.spec.whatwg.org/multipage/) -## OpenGL +## khronos - [Khronos OpenGL Refpages](https://www.khronos.org/registry/OpenGL-Refpages/) - [Computer Graphics Matrix](../cg/cgMatrix.md) +- [vk spec](https://registry.khronos.org/vulkan/specs/1.2/pdf/vkspec.pdf) ## Images