matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
492 stars 72 forks source link

ComputeShader not recognize #36

Closed ucacaxm closed 10 years ago

ucacaxm commented 10 years ago

Hi,

I have a problem with ComputeShader on the last git version on Linux (it works fine on Windows MSVC with 0.38). The compilation of oglplus is ok with GL 4.4: all examples compile.

My code:

include <oglplus/all.hpp>

... oglplus::ComputeShader m_cs;

gives the error: error: ‘ComputeShader’ in namespace ‘oglplus’ does not name a type oglplus::ComputeShader m_cs;

I hope it is not a stupid bug on my code but since it works on Windows (MSVC) ... I think there is no example with a ComputeShader to compare ?

Maybe it is because I use GLEW and the site_config.hpp gives

define OGLPLUS_USE_GLEW 0

? when I force --use-glew it detects GL 4.2 whereas I have 4.4 and glewinfo gives 4.4 also. And I still have the error.

Maybe I can search to debug where the define GL_COMPUTE_SHADER is defined and when in the config process ?

Thanks, Alex

matus-chochlik commented 10 years ago

Hi,

what version of GLEW are you using ? The ComputeShader class is defined only if the GL_COMPUTE_SHADER PP symbol is defined. Maybe your GLEW header does not define it.

And yes, unfortunately right now, there is no ComputeShader example, I'll try to come up something showing its usage.

ucacaxm commented 10 years ago

ack ! you're right ! (damned ubuntu 13.10 with glew 1.8: I never had so much trouble compiling stuff on Linux, usually the problems are on windows and now it is the reverse, after reinstalling my laptop on window 8.1 it worked directly and on Linux with Ubuntu 13.10 I had lot of problem). Everything is running now on both platforms ...

Sorry for this stupid question and thank you, alex

2013/12/10 Matus Chochlik notifications@github.com

Hi,

what version of GLEW are you using ? The ComputeShader class is defined only if the GL_COMPUTE_SHADER PP symbol is defined. Maybe your GLEW header does not define it.

— Reply to this email directly or view it on GitHubhttps://github.com/matus-chochlik/oglplus/issues/36#issuecomment-30255058 .

matus-chochlik commented 10 years ago

No problem, good to hear that it works.