hw01 icon indicating copy to clipboard operation
hw01 copied to clipboard

第一次作业

Open knowledgaction opened this issue 2 years ago • 0 comments

stbi为什么使用了 STB_IMAGE_WRITE_IMPLEMENTATION 和'INCLUDE_STB_IMAGE_WRITE_H'这两个宏进行条件编译?我个人理解,这是一种“解耦”的设计,提高编译速度、减少可执行文件大小----试想一下,如果不通过宏控制函数定义,每个#include <stb_image_write.h>都要编译一遍(虽然函数是static的,可重复定义),每个都要编译一遍,会增加编译时间,同时增加可执行文件的体积。这个有些像是PIMPL的思想。

其他的,就是根据小彭老师课程内容,完成的常规的操作。

knowledgaction avatar Jul 14 '23 18:07 knowledgaction