Open bfops opened 9 years ago
Ah, I notice I have OpenGL version string: 3.0 Mesa 10.3.2
as well as OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.3.2
installed; does oglplus rely on non-core features?
Oops, I was building the develop branch. The build succeeds for me on master, but the examples seem to be using the non-core OpenGL. I'm getting a lot of errors like:
Program build error
Source file: '/home/ben/devl/oglplus/implement/oglplus/shader.ipp'
Source line: 50
Source function: 'Compile'
Message: 'OpenGL shading language compilation error'
GL constant: 'VERTEX_SHADER'
Object type: 'SHADER'
Object: (1)
Log:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
001_triangle: /home/ben/devl/oglplus/example/oglplus/glut_main.cpp:117: static void oglplus::SingleExample::CloseFunc(): Assertion `SingleInstance()' failed.
Aborted
The master build only succeeds because ./configure.sh
infers GL_VERSION_3_3
; it still fails if I pass --max-gl-version 3_1
or lower. When the build succeeds with 3_2
or 3_3
, I get those errors from the examples.
The cloud_trace
example fails because this operator is only defined in 3_2
and above in include/oglplus/framebuffer.hpp
:
inline FramebufferTarget operator << (
FramebufferTargetAndAttch taa,
TextureName tex
)
Removing that example makes the build succeed with 3_1
for me.
Hi,
yeah, most of the examples use GLSL 3.30 or higher, there are however some using GLSL 1.40. And (un)fortunately most of my machines support at least GL version 3.3. I'll have to install Mesa somewhere and test it with that.
I'm noticing that quite a few of the examples are labeled OpenGL 3.0 and still use GLSL 330; downgrading to #version 130
makes them run fine.
Also, quite a few examples are labeled GL_VERSION_3_0
but use geometry shaders, which need GL_VERSION_3_2
.
If you don't feel like doing all that fiddling, I can work on a PR to fix the GL_VERSION_3_0
examples to either work with OpenGL 3.0 or to have a higher version constraint.
I'm also a little confused because my machine does support OpenGL 3.3 (GLSL 330) core profile, but the binaries don't seem to realize they have that option. It's probably an environment issue on my end, but I don't really know how to go about diagnosing it..
Unfortunately, I'm still at a loss for getting the build to pass with --max-gl-version 3_0
, even without the cloud_trace
example built in.
Oh, the configure script does mention that the build will fail with OpenGL 3.0. I feel like it should be possible to get a successful build with 3.0 and 3.1 though.
I actually did manage to get the examples to use the core profile instead of compatibility, just by adding glutInitContextVersion (3, 3);
to glut_main.cpp
, and all the ones I tried worked fine.
This seems intentional - should the
configure
script just fail if it can't find OpenGL > 3.0, or should this component just be disabled?