问题标签 [soil]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 代码在 Xcode 中编译,但不是从命令行编译
所以我有一个迷你 OpenGL 项目,我在 Xcode 中用 C++ 做。我正在使用几个库,包括 SOIL 和 GLEW 库、它们各自的头文件以及 SDL2、OpenGL 和 Corefoundation 框架。该项目在 Xcode 中构建得很好,具有以下编译器选项:C++ 语言方言设置为 -std=c++11,C++ 标准库设置为 libc++。但是,当我尝试在命令行上使用 clang 构建这个项目时,使用以下命令:
我收到以下错误:
我不明白我是如何使用与 Xcode 相同的设置进行编译的,但在终端中,我无法让它工作。
c++ - 错误未定义引用
我正在尝试在 SDL 中使用 SOIL(简单的 opengl 图像库),在编译时(在 WindowsXP 中使用 CodeBlocks)给出以下错误 57 次:
G:\mingw32\lib\libSOIL.a (SOIL.o) : SOIL.c || undefined reference to `glTexParameteri @ 12 '|
.
我认为问题出在 OpenGL 中,但是,没有找到 SOIL 的功能可用并在我的项目中工作。我正在导入标题soil.h
并将其libSoil.a
与 SDL 库一起放置。
给出错误的方法:
c++ - XCode 中的 libSOIL 链接器错误
所以,我从https://github.com/smibarber/libSOIL下载了 libSoil并运行make
,然后sudo make install
在终端中运行。没有错误,似乎很顺利。
但是当我尝试将 libSOIL.dylib 添加到我的 XCode 项目中的“Link Binary With Libraries”列表中时,当我尝试编译时出现链接器错误。
它说:
我设法安装 GLFW3 并将其链接到我的项目没有任何问题,所以我不确定这里的问题是什么。
c++ - SOIL_load_OGL_texture 返回 NULL,可能是工作目录问题(XCode 6)
好的,所以我正在尝试使用 SOIL 加载“纹理”文件夹中的 .png 文件。纹理文件夹与代码位于同一目录中。我已经进入了 XCode 项目的方案设置,并将工作目录更改为文件夹所在的目录。然而,当我做这个简单的测试时,它总是表明 GLUint 纹理为 NULL。
我不确定我是否在 SOIL 方面做错了什么,但我的直觉是该文件根本没有被读取。正如我所说,我更改了 XCode 中的工作目录,但这并没有改变任何东西。
c++ - 镜像(翻转)使用 SOIL_load_image 加载的 JPG 图像
我已经使用库 libsoil-dev 成功加载了 .jpg 图像,使用命令为 Debian 找到
后两个参数是int* channels和int force_channels任何可能的详细含义,但它们似乎涉及 alpha 通道之类的东西。
使用所述命令,我知道图像的宽度和高度(以像素为单位)。
现在我想水平翻转它(意味着左右边缘交换边)。如果我知道uchar* img的大小,这将很容易。但是,就目前情况而言,我不知道,因为我无法确定一个像素有多少个 uchar 。另外,我不知道像素在内存中是如何排序的(按行、按列、从上到下或反之亦然,你可以命名它)。有任何想法吗?
c++ - SOIL 库 - 无法链接
在构建我的项目时,我遇到了同样的问题,在这个链接中解决了: SOIL not linking correct , SOIL setup in Visual Studio 2010
我尝试了所有建议的解决方案:
- 构建 VC8 和 VC9 库以获取 SOIL.lib(我使用的是 VS 2013)
- 链接库(链接器 - 附加依赖项)
- 将 libSoil.a 重命名为 SOIL.lib
但仍然有同样的错误:
任何想法,其他解决方案?
c++ - How to embed any *.jpg image inside win32 executable and use it at run time
I am doing a project in pure OpenGL and FREEGLUT named Space Voyager. Problem is that during run time when programe calls a function to load all the images player has to wait around 2 minutes on loading screen!!!! Some of the images are like 16 MB files otherwise 1 MB in average. There are like 20 images in all. I need to load all the images before staring the level.
Now I am using SOIL for loading the images in my game. SOIL has a function to load images from memory SOIL_load_OGL_texture_load_from_memory( unsigned char *image_in_RAM ,...).
My solution is to embed all the images in *.exe file of the game and use it at run time so as to save the time to load all the images in game.
I am pretty much lost as how to exactly embed the jpg images in executable and
use it at run time as unsigned char* imagePointer ?????
c++ - SOIL 未解析的外部符号
好的,在有人将此问题标记为重复之前,我已经查看了什么是未定义的引用/未解决的外部符号错误以及如何修复它?和许多其他在线帖子。我已经尝试了所有我遇到的解决方案,但我仍然无法修复这些错误:
我在 Windows 8 上使用 Visual Studio 2012。我尝试重建库,并检查了我所有的包含和目录。这是我拥有的 SOIL 包含/目录:
这是我的代码。SOIL_load_image 函数是导致错误的原因:
我整天都在做这件事,但我无法弄清楚我做错了什么,这非常令人沮丧。注意:我知道 SOIL.lib 的原始名称是“libSOIL.a”。我尝试使用该名称使用它并得到相同的错误。
c++ - 使用 SOIL 使用 OpenGL 映射纹理
尝试使用 OpenGL 和 SOIL 完成基本纹理贴图到表面,但我没有生成任何东西。
然而,这张脸画成蓝色,我没有纹理。我有第二个窗口,除了位置之外,唯一的区别是我使用 Frustrum 而不是 Orthogonal
纹理画得很好。