Operating systems and shaders

Hi guys, I developed an OpenGL engine, with version 3.3, it works, but today I tried to move the project from my Windows 7 pc to a Windows 10 laptop and doesn’t work here. I can compile it and it runs but, when debugging, in the shaders compilation and linking, first I got a cast error which I resolved (I don’t think so), then I got a linking error “out of resources”, it seems that some input in the fragment shader is not written in the previous shader.
There is something to consider when compiling the shaders on different operating systems?
If you want to see some code I can provide it, but since it works in my pc, I think is a simple issue to resolve(I hope), reading on the forum I’ve not found a solution.

The issue isn’t the OS, but with different OpenGL implementations. The video hardware vendor (e.g. nVidia, AMD, Intel) and driver version are more relevant than the OS.

First, ensure that the laptop actually supports the version of OpenGL which you’re using. Desktop systems with discrete video cards based upon nVidia or AMD chips will typically support a higher OpenGL version than a laptop using Intel integrated graphics.

Second, some implementations are more fault-tolerant than others, so the fact that a GLSL program compiles and links without error with one implementation doesn’t mean that it’s correct. It’s important to learn what is valid and what isn’t for any given GLSL version, rather than relying upon the GLSL compiler to tell you.

I checked the versions and both support the 3.3, but in the laptop I have less extensions supported (both are nVidia cards).
The error comes when creating the shader that makes the shadowmaps, I use a geometry shader for render vertices depths to a cubemap(shamelessly copied from a tutorial).
Maybe have I to check if some important extension is supported?
There are some “basic” extension to check?

Only if you’re actually using an extension. If you’re only using functionality which is part of OpenGL 3.3, then you only need to check that the implementation supports OpenGL 3.3.

Another possibility is that you’re exceeding an implementation limit (e.g. the maximum number of uniforms or similar). Look at the various limits in the glGet reference page (anything with “MAX” in the name). Note that the minimum values listed in that page are for 4.0; some of the minimum values will be lower for 3.3. Either refer to the 3.3 specification or use glGet() to query the limit at run time.

The laptop has a nVidia card, yes, but also an Intel, which obviously was the default one!!!:doh:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.