-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOIL_load_OGL_cubemap returning null type #40
Comments
Hi! Please print |
Thanks SpartanJ, also massive respect for this library. SOIL_last_result() prints "No cube map capability present" |
Perfect, basically that means that your GPU does not support the capability, but I don't think that's even possible in 2020 unless you're running some ancient hardware. So to be sure I'll request you to print the OpenGL extensions supported by your GPU and copy that result here, you should have: GL_ARB_texture_cube_map or GL_EXT_texture_cube_map present. Try something like: int NumberOfExtensions;
glGetIntegerv(GL_NUM_EXTENSIONS, &NumberOfExtensions);
for(i=0; i<NumberOfExtensions; i++) {
const char *ccc= (const char *)glGetStringi(GL_EXTENSIONS, I);
printf("%s ", ccc);
} |
Thanks SpartanJ, I think you are spot on, and tbh an absolute genius to figure it out that quick. The GPU is an Intel HD graphics 620. It isn't good. Absolute nightmare for AI applications. It's part of a Lenovo Yoga 720-13 laptop and I think they cheaped out on certain parts to keep it affordable. I'll update my hardware at some point but for the time being I'll stick to alternative methods for implementing cube maps. I can't get an output for the code you mentioned (even by changing the typos). If it is important to you, let me know and I'll keep trying. I'm happy to mark this as closed for now though. Massive thanks and massive respect for what you do here. |
@eddie2302 Hi! Sorry for coming back so late. I think your GPU is OK, the problem must be something related with the GL context, I just pushed some changes to SOIL2 that might help with the issue you were having. If you are still there you might be interested to try. Thanks. |
Apologies if there is some issue with my code/machine that I should have noticed. I'm using SOIL2 on Ubuntu 20.04, using G++ to compile it. I am returning a null type for the SOIL_load_OGL_cubemap function every time. An example code is:
GLuint textureRef;
textureRef = SOIL_load_OGL_cubemap("xp.jpg", "xn.jpg", "yp.jpg", "yn.jpg", "zp.jpg", "zn.jpg", SOIL_LOAD_RGB, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS);
if (textureRef == 0) std::cout << "Yeah... this shouldn't print but it does" << std::endl;
(xp.jpg etc. are all JPEG image files in the same folder as the code is being run)
I would mention that the rest of the SOIL2 library appears to work fine (and is massively useful). For example I regularly use SOIL_load_OGL_texture to load in textures (I'm actually using it in the same code which I am trying to implement the cubemap function.
The text was updated successfully, but these errors were encountered: