shensunbo Blog

「离开世界之前 一切都是过程」

vscode 背景色修改"

恢复之前的设置 Settings Sync: Show Synced Data 背景色和字体模板 settings.json 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 4...
人赞过

在docker中安装lcov2.3

dockerfile 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 ...
人赞过

github上创建android stuidio 项目

push an existing repository from the command line git remote add origin https://github.com/shensunbo/android_native.git git branch -M main git push -u origin main
人赞过

交叉编译android native cpp lib

编译 build(for android studio simulator) 1 2 3 4 5 6 7 8 export ANDROID_NDK=/opt/ndk cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \ -DANDROID_ABI=x86...
人赞过

vscode正则表达式

为mesh名称添加后缀 (“mesh_name”:\s*”)([^”]+)(“) $1$2_suffix$3
人赞过

phong 模型

光照 环境光颜色与漫反射颜色相乘作为环境光 法线 将法线由模型空间变换到世界空间 使用去除平移后的模型矩阵的逆转置矩阵,需要再CPU端进行计算。(如果模型矩阵不包含非同一缩放,逆转置矩阵等于模型矩阵) glm::mat3 normalMatrix = glm::transpose(glm::inverse(glm::mat3(modelMatrix))) 法线贴图 ...
人赞过

figma导出svg

figma导出svg 选中要导出的元素 ctrl + shift + E or file -> export 如果显示无法导出,在properties中选择export 的+号增加一个导出配置,可以选择svg或者png
人赞过

程序、链接和库

linux 进程布局 Linux Process Memory Layout
人赞过

H.264 BASIC

overview SPS 存储视频序列的​​全局编码参数​​,解码器需要先读取 SPS 才能正确解析后续的视频数据 PPS 存储​​单帧图像的编码参数​​,解码每一帧前需先读取对应的 PPS [NAL Unit 1: SPS] → [NAL Unit 2: PPS] → [NAL Unit 3: I-slice] → [NAL Unit 4: P-slice]... f...
人赞过

cpp 中的锁

demo 简单的锁与条件变量实例 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include <condition_variable> #include <mutex> std::mutex mtx; std::condition_variable cv; bool ready = false; void ...
人赞过