OpenGL 纹理:如何创建图像路径?

问题描述

我在尝试上传纹理时遇到困难:

// The FileSystem::getPath(...) is part of the GitHub repository so we can find files on any IDE/platform; replace it with your own image path.
    unsigned char *data = stbi_load(FileSystem::getPath("resources/textures/container.jpg").c_str(),&width,&height,&nrChannels,0);

关于上面的评论,我如何将其替换为我自己的图像路径?我试过这样的事情:

unsigned char *data = stbi_load("Desktop/container.jpg").c_str(),0);

但它没有用,当然,我的小脑袋现在超负荷了,我无法直视。那么... 我如何指定图像路径?

更新:这是我收到的错误消息:

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)