Giter Club home page Giter Club logo

matus-chochlik / oglplus Goto Github PK

View Code? Open in Web Editor NEW
489.0 489.0 72.0 16.86 MB

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.

Home Page: http://oglplus.org/

License: Boost Software License 1.0

CMake 1.02% C++ 95.72% Shell 0.43% GLSL 0.29% Makefile 0.20% Java 0.03% C 0.01% PHP 0.15% XSLT 0.41% Python 1.14% Batchfile 0.13% POV-Ray SDL 0.14% Pawn 0.14% Roff 0.11% Less 0.07%

oglplus's People

Contributors

adamcavendish avatar bfops avatar callforsanity avatar cneumann avatar corngood avatar detunized avatar konstg avatar larspensjo avatar maikklein avatar mattg-sp avatar matus-chochlik avatar metiscus avatar msiedlarek avatar pushrax avatar regnirpsj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oglplus's Issues

May need to update README.rst `REQUIREMENTS` on apt

  1. 'sudo apt-get install doxygen cmake g++ libglew1.9-dev freeglut3-dev libpng12-dev'
    no longer works for Ubuntu 13.04 which libglew1.9-dev has changed to libglew-dev
  2. add package 'libglfw-dev' for glfw support
  3. You may ask users to build glfw3 from source, which package is not available on apt right now.
  4. You may ask users to build gl3w from source, and you may provide the link 'https://github.com/shakesoda/gl3w'
  5. add package 'qt4-default' for qt4 support
  6. add package 'libsdl1.2-dev libsdl2-dev' for SDL support

void:illegal sizeof operand

Sorry for bombarding today .Just trying to port Deferred renderer to OGLPlus.

I am getting "illegal sizeof operand" when calling .Data on UBO:

_lightUBO.Bind(Buffer::Target::Uniform);
_lightUBO.Data(Buffer::Target::Uniform,  NUM_LIGHTS * sizeof(light_t) ,(void*)0,BufferUsage::DynamicDraw);

Something wrong with how I am using it?

Use ARB_debug_output instead of glGetError()?

Hello,

glGetError is great, but sometimes it doesn't give you enough information on what has gone wrong, only that it has gone wrong.

I was wondering if a new feature could be added so that if the context is created as a debug context, and the extension exists, use ARB_debug_output (or AMD_debug_output) instead of glGetError for error diagnostics. The call stack will follow to the exact piece of code that fails, and you could also possible get exceptions on bad performance code as well as error code.

http://www.opengl.org/registry/specs/ARB/debug_output.txt
http://www.opengl.org/registry/specs/AMD/debug_output.txt

Test framework fixtures

Fixtures (similar to the harnesses used by examples) that will initialize a GL context and API need to be written for tests that (will) require a rendering context.

OGLplusLib.cmake strange behavior

After I've commented lines from the #22 issue, I get the warning

WARNING "OGLplus library cannot be built!"

Which is caused by failed try_run() command on
https://github.com/matus-chochlik/oglplus/blob/develop/config/OGLplusLib.cmake#L29
line. Tried both with Visual Studio 2012 and Visual Studio 2012 x64.
What does that warning mean? How to fix it? Your website says that oglplus is header-only library, so no actual library building should be involved!
Can I ignore that warning and still use oglplus? Will I be able to build the examples?

A little build problem

My Environment: Kubuntu 13.04 64-bit, 3.11.0-13-generic

I don't know whether GL3W is required or not on Linux, if it is not required it may be deleted from dependency.

  1. There's an warning from cmake that "OGLplus library cannot be built!", meanwhile it succeeded in configuring.
  2. I'm suffering from a build error and hope that will help.

This is configure info:

-- Found GLEW: /usr/include/GL /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Could NOT find GL3W
-- Found GLFW: /usr/include /usr/lib/libglfw.so
-- Found GLFW3: /usr/local/include glfw3;rt;Xrandr;Xi;GL;m;dl;Xrender;drm;Xdamage;X11-xcb;xcb-glx;xcb-dri2;Xxf86vm;Xfixes;Xext;X11;pthread;xcb;Xau;Xdmcp
-- Found SDL: /usr/include/SDL /usr/lib/x86_64-linux-gnu/libSDL.so
-- GLM header files not found
-- Found PNG: /usr/include /usr/lib/x86_64-linux-gnu/libpng.so
-- Found Pango/Cairo
-- Boost version: 1.54.0
-- Using GLX for GL context initialization.
-- Using native OpenGL API library
-- Detecting OpenGL version
-- Found GL version 4.2
-- Found GL extension: ARB_shader_subroutine
-- Found GL extension: ARB_shader_atomic_counters
-- Found GL extension: ARB_tessellation_shader
-- Found GL extension: ARB_separate_shader_objects
-- Found GL extension: ARB_transform_feedback2
-- Found GL extension: ARB_viewport_array
-- Found GL extension: ARB_compatibility
-- Found GL extension: EXT_direct_state_access
-- Found GLEW extension: EXT_direct_state_access
CMake Warning at config/OGLplusLib.cmake:44 (message):
  OGLplus library cannot be built!
Call Stack (most recent call first):
  CMakeLists.txt:179 (include)


-- Configuring done
-- Generating done
-- Build files have been written to: /files/SOURCE_code/OGLPlus/building/_build
# Configuration completed successfully.
# To build OGLplus do the following:

cd _build
make -j 3
make install

# NOTE: installing to '/usr/local' may require administrative privilegues

Build error:

Scanning dependencies of target oglplus_example_harness
[  0%] Generating OGLplus HTML documentation
[  1%] Building CXX object example/oglplus/CMakeFiles/oglplus_example_harness.dir/glx_main.cpp.o
Error: Tag file `/files/SOURCE_code/OGLPlus/building/_build/doc/doxygen/oglplus/../oalplus/doxygen.tags' does not exist or is not a file. Skipping it...
Error: Tag file `/files/SOURCE_code/OGLPlus/building/_build/doc/doxygen/oglplus/../eglplus/doxygen.tags' does not exist or is not a file. Skipping it...
/files/SOURCE_code/OGLPlus/building/example/standalone/002_triangle_compatibility.cpp:36: Warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon)
Linking CXX static library liboglplus_example_harness.a
[  1%] Built target oglplus_example_harness
Scanning dependencies of target texture-flower_glass
[  2%] Copying default fallback texture flower_glass
[  2%] Built target texture-flower_glass
Scanning dependencies of target 032_transitions
[  2%] Building CXX object example/oglplus/CMakeFiles/032_transitions.dir/032_transitions.cpp.o
Linking CXX executable 032_transitions
Warning: Include graph for 'all.hpp' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ActiveSubroutineInfo::ActiveSubroutineInfo(oglplus::aux::ProgramInterfaceContext&, unsigned int)':
032_transitions.cpp:(.text._ZN7oglplus3aux20ActiveSubroutineInfoC2ERNS0_23ProgramInterfaceContextEj[_ZN7oglplus3aux20ActiveSubroutineInfoC5ERNS0_23ProgramInterfaceContextEj]+0xc4): undefined reference to `glGetActiveSubroutineName'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::ProgramOps::GetStageIntParam(unsigned int, unsigned int) const':
032_transitions.cpp:(.text._ZNK7oglplus10ProgramOps16GetStageIntParamEjj[_ZNK7oglplus10ProgramOps16GetStageIntParamEjj]+0x91): undefined reference to `glGetProgramStageiv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_t(std::integral_constant<unsigned long, 1ul>, int const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKiz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKiz]+0xcb): undefined reference to `glProgramUniform1i'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_t(std::integral_constant<unsigned long, 1ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKfz]+0xcb): undefined reference to `glProgramUniform1f'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_v(std::integral_constant<unsigned long, 2ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm2EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm2EEPKfz]+0xcb): undefined reference to `glProgramUniform2fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_v(std::integral_constant<unsigned long, 3ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm3EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm3EEPKfz]+0xcb): undefined reference to `glProgramUniform3fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformMatrixSetters::_fns_v(std::integral_constant<unsigned long, 4ul>, std::integral_constant<unsigned long, 4ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux27ProgramUniformMatrixSetters6_fns_vESt17integral_constantImLm4EES3_PKfz[_ZN7oglplus3aux27ProgramUniformMatrixSetters6_fns_vESt17integral_constantImLm4EES3_PKfz]+0xcb): undefined reference to `glProgramUniformMatrix4fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::SubroutineUniformInitOps::_do_init_location(unsigned int, char const*) const':
032_transitions.cpp:(.text._ZNK7oglplus3aux24SubroutineUniformInitOps17_do_init_locationEjPKc[_ZNK7oglplus3aux24SubroutineUniformInitOps17_do_init_locationEjPKc]+0x85): undefined reference to `glGetSubroutineUniformLocation'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::SubroutineInitOps::_do_init_location(unsigned int, char const*) const':
032_transitions.cpp:(.text._ZNK7oglplus3aux17SubroutineInitOps17_do_init_locationEjPKc[_ZNK7oglplus3aux17SubroutineInitOps17_do_init_locationEjPKc]+0x85): undefined reference to `glGetSubroutineIndex'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::UniformSubroutines::_get_location_count(unsigned int, unsigned int)':
032_transitions.cpp:(.text._ZN7oglplus18UniformSubroutines19_get_location_countEjj[_ZN7oglplus18UniformSubroutines19_get_location_countEjj]+0x89): undefined reference to `glGetProgramStageiv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::UniformSubroutines::Apply()':
032_transitions.cpp:(.text._ZN7oglplus18UniformSubroutines5ApplyEv[_ZN7oglplus18UniformSubroutines5ApplyEv]+0x7b): undefined reference to `glUniformSubroutinesuiv'
collect2: error: ld returned 1 exit status
make[2]: *** [example/oglplus/032_transitions] Error 1
make[1]: *** [example/oglplus/CMakeFiles/032_transitions.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Warning: Include graph for 'lib.hpp' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
/files/SOURCE_code/OGLPlus/building/doc/include/oglplus/doc.hpp:225: Warning: Invalid list item found
[  2%] Built target oglplus-prebuild-doc
make: *** [all] Error 2

Setting draw buffers for texture attachment

Hi! I can't find how I can do this with OGLPlus:
static const GLenum draw_buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 };

glDrawBuffers(2, draw_buffers);

I found gl.DrawBuffers() accepts ColorBuffer which has no enums for color attachments.

configure.sh fails

configure.sh fails on archlinux with haswell igpu (which should support opengl 3.0 with mesa)

./configure.sh --prefix /usr --no-examples --no-docs

-- The C compiler identification is Clang 3.3.0
-- The CXX compiler identification is Clang 3.3.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- Found GLEW: /usr/include /usr/lib64/libGLEW.so
-- Could NOT find GL3W
-- Could NOT find GLFW
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLFW3_LIBRARIES
    linked by target "cmTryCompileExec3599318987" in directory /tmp/yaourt-tmp-manuel/aur-oglplus-git/src/oglplus-build/_build/ext_lib/CMakeFiles/CMakeTmp

CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Could NOT compile or link with GLFW3
-- Found GLUT: /usr/lib64/libglut.so  
-- Found wxWidgets: TRUE  
CMake Warning at /usr/share/cmake-2.8/Modules/FindQt4.cmake:659 (message):
  /usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib" but QtCore could not
  be found there.  Qt is NOT installed correctly for the target build
  environment.
Call Stack (most recent call first):
  config/FindQTGL.cmake:5 (find_package)
  CMakeLists.txt:60 (include)


-- Found SDL: /usr/include/SDL /usr/lib64/libSDL.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found PNG: /usr/include /usr/lib64/libpng.so
-- Found Pango/Cairo
-- Detecting support for c++11 feature 'SCOPED_ENUMS': TRUE
-- Detecting support for c++11 feature 'VARIADIC_MACROS': TRUE
-- Detecting support for c++11 feature 'VARIADIC_TEMPLATES': TRUE
-- Detecting support for c++11 feature 'UNIFIED_INITIALIZATION_SYNTAX': FALSE
-- Detecting support for c++11 feature 'INITIALIZER_LISTS': FALSE
-- Detecting support for c++11 feature 'DEFAULTED_FUNCTIONS': TRUE
-- Detecting support for c++11 feature 'DELETED_FUNCTIONS': TRUE
-- Detecting support for c++11 feature 'EXPLICIT_CONVERSION_OPERATORS': TRUE
-- Detecting support for c++11 feature 'FUNCTION_TEMPLATE_DEFAULT_ARGS': TRUE
-- Detecting support for c++11 feature 'UNICODE_LITERALS': TRUE
-- Detecting support for c++11 feature 'USER_DEFINED_LITERALS': FALSE
-- Detecting support for c++11 feature 'CONSTEXPR': TRUE
-- Detecting support for c++11 feature 'NOEXCEPT': FALSE
-- Detecting support for c++11 feature 'LAMBDAS': TRUE
-- Detecting support for c++11 feature 'NULLPTR': TRUE
-- Detecting support for c++11 feature 'CHRONO': FALSE
-- Detecting support for c++11 feature 'THREADS': FALSE
-- Boost version: 1.54.0
-- Skipping 'glx_main' because 'THREADS' not implemented properly.
-- Using GLUT for GL context initialization.
-- Using native OpenGL API library
-- Detecting OpenGL version
Could not detect GL version, assuming 3.0
-- Found GLEW extension: ARB_compatibility
-- Found GLEW extension: EXT_direct_state_access
-- Found GLEW extension: ARB_debug_output
-- Found GLEW extension: ATI_meminfo
-- Found GLEW extension: NV_path_rendering
-- Found GLEW extension: AMD_performance_monitor
CMake Warning at config/OGLplusLib.cmake:44 (message):
  OGLplus library cannot be built!
Call Stack (most recent call first):
  CMakeLists.txt:179 (include)


-- Configuring incomplete, errors occurred!
See also "/tmp/yaourt-tmp-manuel/aur-oglplus-git/src/oglplus-build/_build/CMakeFiles/CMakeOutput.log".
# Configuration failed with error code 1.

It complains about missing qt and glfw3 although i have both installed:
qt5-base 5.1.1-5
glfw 3.0.3-1

This happens with the git version and with 0.38

Accessing texture handle

I can't access OpenGL texture handle in oglplus::Texture.I am trying .getName() , getLocation() but these methods fail to compile.

Mat3f(const Mat4f&) gets optimized out.

The following code example:
Mat4f mat4;
Mat3f mat3(mat4);

Works fine in with g++ 4.7.3, in debug mode, and in un-optimized release mode. However if any of the -O{1,2,3} flags are specified, it won't work, the mat3 will become a null matrix, no matter what mat4 was.

A bit more accurately the "-fipa-pure-const" flag causes it go wrong, and that flag is part of all the three optimization options.

Fun fact that this also applies to glm's mat3(const mat4&) constructor. Actually I spotted this bug using glm ( I'm not using oglplus, I prefer using my own OpenGL wrapper :( ), just thought you might wanted to take a loot at it.

P.S:
In the readme you advice the busy to build with "./configure.sh ... --build-and-install", but the configure.sh doesn't have any flag called like that.

ill format of font resource file error message

I ran the standalone example 004_any_text_rendering and I get this error message which I consider ill-formated.

./004_any_text_rendering
Started
Error: Failed to open resource file 'fonts/FreeSans/.ttf'

Extra const in DrawElementsBaseVertex

In the DrawElementsBaseVertex function, where you can specify the BaseIndex, I mean this one:

DrawElementsBaseVertex (PrimitiveType primitive, GLsizei count, const T *indices, GLint base_vertex)

The 3rd parameter shouldn't be const, as the function glDrawElementsBaseVertex expects 'GLvoid_' not 'const GLvoid_' so the compiler cries that - invalid conversation from 'const void_' to 'void_' - or something like this.

No autocompletion with oglplus?

I am using archlinux, I have compiled oglplus with gcc 4.8. I am using freeglut and glew. No IDE (qtcreator, eclipse cdt) is able to autocomplete some classes in oglplus for example:

prog.AttachShader(vs);
fs.Source(....);
gs.Compile();

and many more. Do you have any idea what causes this?

I also made a question on stackoverflow http://stackoverflow.com/questions/16002432/is-it-possible-to-write-code-that-no-ide-is-able-to-parse?noredirect=1#comment22819782_16002432

Can not compile with Visual Studio 2010

2> glfw_main.cpp
2>D:\Code\oglplus\include\oglplus/auxiliary/enum_class.hpp(83): error C2027: use of undefined type 'oglplus::SLDataType'
2> D:\Code\oglplus\include\oglplus/auxiliary/uniform_typecheck.hpp(27) : see declaration of 'oglplus::SLDataType'
2> D:\Code\oglplus\include\oglplus/auxiliary/uniform_typecheck.hpp(29) : see reference to class template instantiation 'oglplus::EnumValueType' being compiled
2> with
2> [
2> Enum=oglplus::SLDataType
2> ]

It seems Visual Studio 2010 lacks some C++11 features. But I can not figure them out and solve the compiling problems. I only have Visual Studio 2010.

Fail to bind texture to tex units with OGLPlus API

Hi Matus.I have implemented DR in OGLPlus.But one thing I seems to be failed to do with the API and that's MRT bindings.For example:

   _gfboTex0.Active(0);
_gfboTex0.Bind();
_gfboTex1.Active(1);
_gfboTex1.Bind();

Doesn't bind correctly.Probably doesn't bind at all to units 0 and 1.
While this works fine:

glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, Expose(_gfboTex0).Name());
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, Expose(_gfboTex1).Name());

004_stbttf_text_rendering.cpp doesn't compile VS2012 VC11

Hi.I pulled the latest version (after we discussed it on google +) and this particular demo still doesn't run under windows.The errors begine from

typedef oglplus::text::STBTrueTypeRendering TextRendering;

line .Somehow the compiler can't find this declaration even though it clearly exists in the stb_truetype.hpp header.

Small bug at `drawing.hpp`

There's a build error here:

/files/SOURCE_code/OGLPlus/oglplus/include/oglplus/context/drawing.hpp:362:3: error: invalid conversion from ‘const GLsizei* {aka const int*}’ to ‘int*’ [-fpermissive]
   );
   ^

Fix it by adding a conversion at drawing.hpp line 358:
just change from
count,
to
(int *)(count)

Implement deferred/forward shading example

Hello.

I think it would be useful to leave this enhancement request documented here.

Seeing that deferred/forward shading is a very common feature used in game engines today, OGPlus should greatly benefit in showcasing said feature.

A few examples:

UPDATE: found more examples of a new lighting technique called forward tiled shading. Hopefully it will be helpful. Thanks!

http://aras-p.info/blog/2012/03/27/tiled-forward-shading-links/

lightindexed-deferredrender
https://code.google.com/p/lightindexed-deferredrender/

Tech Demo: Deferred Lighting http://youtu.be/Hw-coxW3G5o

Deferred shading with dynamic soft shadows: http://youtu.be/lydvh5dAB10

Crytek/Dabrovic Sponza in Nucleus - dynamic camera: https://vimeo.com/14721594

Please let me know if there's anything else I could o or specify.

Thank you for your time.

ComputeShader not recognize

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

generated config is not backwards compatible to older opengl versions

Applications using oglplus need to define GL_VERSION_3_3 and GL_VERSION_4_1 themselfs when ogplus was configured with opengl 3.3 or 4.1 enabled.

Without these defines I get compilation errors (using clang 3.3 on linux):

oglplus/program.ipp:93:18: error: out-of-line definition of 'GetBinary' does not match any declaration in 'oglplus::ProgramOps'
void ProgramOps::GetBinary(std::vector& binary, GLenum& format) const
                 ^~~~~~~~~
oglplus/texture.hpp:478:11: error: unknown type name 'TextureSwizzleTuple'
                typedef TextureSwizzleTuple SwizzleTuple;
                        ^

I also need to provide all opengl symbols up to the configured version.

It would be much nicer if a single oglplus configuration would work for any previous opengl version as well, choosing the target opengl version at compile time.

Shader classes design

Hi.I wonder why the API has a separate class for each type of shaders.VertexShader,FragmentShader,GeometryShader etc...It seems to be like a over-engineered design,unless I miss something here...

ObjectDescRegistryArchive Access violation reading location

Hi, I am using Visual Studio 2013, and currently doing stuff with shaders, vertexattributearrays, uniforms, and buffers. The issue reproduced with both the bleeding edge version, and version 0.42.0

I am using unique_ptr to manage my memory, but right now, after my program has returned I am running into the error that ObjectDescRegistryArchive is trying to access the _maps map variable with a key that no longer exist. Looking with the debugger, the _maps size is 0, but a call is made to read the element with the key '7'.

I am going to guess that it has something to do with the order that objects get destroyed, but I don't think a desctuctor should fail, not in this way at least.
Is there anything I could put into the constructors/destructors to get a better idea of which order everything is happening in?

The issue should be observable here (https://github.com/vif/3D-STG/tree/ec6aa61861c98c32b42038c1d1b1d3c73fae8f99), although it is likely not isolated enough to be useful.

I have attached a call stack below.

--------------------------
ntdll.dll!_NtRaiseException@12�()   Unknown
--------------------------
ntdll.dll!_KiUserExceptionDispatcher@8�()   Unknown
--------------------------
test.exe!std::_Tree<std::_Tmap_traits<int,std::map<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >,std::less<int>,std::allocator<std::pair<int const ,std::map<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > > >,0> >::_Lbound(const int & _Keyval) Line 2109 C++
--------------------------
test.exe!std::_Tree<std::_Tmap_traits<int,std::map<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >,std::less<int>,std::allocator<std::pair<int const ,std::map<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > > >,0> >::lower_bound(const int & _Keyval) Line 1575 C++
--------------------------
test.exe!std::map<int,std::map<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >,std::less<int>,std::allocator<std::pair<int const ,std::map<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > > > >::operator[](const int & _Keyval) Line 228  C++
--------------------------
test.exe!oglplus::aux::ObjectDescRegistryArchive(int id) Line 29    C++
--------------------------
test.exe!oglplus::aux::ObjectDescRegistry<oglplus::ProgramOps>::_archive() Line 159 C++
--------------------------
test.exe!oglplus::aux::ObjectDescRegistry<oglplus::ProgramOps>::_unregister_desc(unsigned int type, unsigned int name) Line 187 C++
--------------------------
test.exe!oglplus::Object<oglplus::ProgramOps>::_undescribe(const oglplus::Object<oglplus::ProgramOps> * that) Line 340  C++
--------------------------
test.exe!oglplus::Object<oglplus::ProgramOps>::_cleanup_if_needed() Line 452    C++
--------------------------
test.exe!oglplus::Object<oglplus::ProgramOps>::~Object<oglplus::ProgramOps>() Line 525  C++
--------------------------
[External Code] 
--------------------------

Compilation with Visual Studio 2013 ?

Hi,

Just a question: have you tried to compile with Visual Studio 2013 ?
This new version of the compiler seems to implement the c++11 default for special member function. => cmake define OGLPLUS_NO_DEFAULTED_FUNCTIONS

I have an error with all the constructors with double reference like that
Angle(Angle&&) = default; // line 71, file angle.hpp
also in vector.hpp and in named.hpp
Compiler say that it is not a special function

I haven't checked if this compiling with gcc, nor if a constructor with the double ref (&&) is considered as a special function (but it seams that for visual it is not, or maybe there is an option to add it at the compilation ?)

Thanks,
Alex

example 025_rendered_texture won't compile in VS2010

I can't make it to compile 025_rendered_texture in VS2010
the compiler stopped with the following info:
2>......\example\oglplus\025_rendered_texture.cpp(95): error C2661: "oglplus::AutoBind::AutoBind": no overloaded function takes 2 arguments
2> with
2> [
2> Object=oglplus::Texture
2> ]
the problem is at line 91: ", tex(Texture::Target::_2D, 0)"
it seems the second argument should be deleted. But new problem arises when I delete the second argument

I built oglplus under windows 8 + CMAKE2.8 + VS2010
below is the information showed when making oglplus

Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Found GLEW: E:/SDKs/glew-1.9.0/include E:/SDKs/glew-1.9.0/lib/glew32.lib
Could NOT find GL3W
Could NOT find GLES3
Could NOT find GLFW
Could NOT find GLFW3
Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
GLUT header file not found
Could NOT find wxWidgets (missing: wxWidgets_FOUND)
Could NOT find SDL
Could NOT find EGL
GLM header files not found
Could NOT find PNG
Could NOT find Boost
Using QT4GL for GL context initialization.
Using GLEW as GL API library
Detecting OpenGL version
Found GL version 4.4
Found GLEW extension: ARB_compatibility
Found GLEW extension: EXT_direct_state_access
Found GLEW extension: ARB_debug_output
Found GLEW extension: ATI_meminfo
Found GLEW extension: NV_path_rendering
Found GLEW extension: AMD_performance_monitor
CMake Warning at config/OGLplusLib.cmake:63 (message):
OGLplus library cannot be built!
Call Stack (most recent call first):
CMakeLists.txt:181 (include)

Could NOT find ImageMagick (missing: ImageMagick_mogrify_EXECUTABLE)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Skipping '002_shader_lit' because 'USER_DEFINED_LITERALS' not implemented properly.
Skipping '012_checker_sphere' because 'SCOPED_ENUMS' not implemented properly.
Skipping '016_textured_cube' because 'PNG' not found.
Skipping '016_textured_cube' because 'FUNCTION_TEMPLATE_DEFAULT_ARGS' not implemented properly.
Skipping '016_textured_cube_glsl120' because 'FUNCTION_TEMPLATE_DEFAULT_ARGS' not implemented properly.
Skipping '017_sky_box' because 'PNG' not found.
Skipping '018_stained_glass_cube' because 'PNG' not found.
Skipping '019_honeycomb_cube' because 'PNG' not found.
Skipping '020_cube_mapping' because 'SCOPED_ENUMS' not implemented properly.
Skipping '020_golf_ball' because 'SCOPED_ENUMS' not implemented properly.
Skipping '020_icosphere' because 'PNG' not found.
Skipping '020_icosphere' because 'SCOPED_ENUMS' not implemented properly.
Skipping '020_texture_projection' because 'PNG' not found.
Skipping '021_overdraw' because 'INITIALIZER_LISTS' not implemented properly.
Skipping '021_wooden_crate' because 'PNG' not found.
Skipping '021_wooden_crate' because 'FUNCTION_TEMPLATE_DEFAULT_ARGS' not implemented properly.
Skipping '022_volumetric_light' because 'PNG' not found.
Skipping '022_xyz_planes' because 'SCOPED_ENUMS' not implemented properly.
Skipping '023_sky' because 'PNG' not found.
Skipping '024_simple_picking' because 'SCOPED_ENUMS' not implemented properly.
Skipping '025_reflected_torus' because 'FUNCTION_TEMPLATE_DEFAULT_ARGS' not implemented properly.
Skipping '025_rendered_texture_mt' because 'THREADS' not implemented properly.
Skipping '026_furry_torus' because 'PNG' not found.
Skipping '027_brain_scan_vis' because 'INITIALIZER_LISTS' not implemented properly.
Skipping '027_flow' because 'PNG' not found.
Skipping '027_flow' because 'SCOPED_ENUMS' not implemented properly.
Skipping '027_smoke_trails' because 'INITIALIZER_LISTS' not implemented properly.
Skipping '028_monkeycraft' because 'PNG' not found.
Skipping '028_volume' because 'VARIADIC_TEMPLATES' not implemented properly.
Skipping '029_fire_hydrant' because 'PNG' not found.
Skipping '029_flares' because 'PNG' not found.
Skipping '029_flares' because 'SCOPED_ENUMS' not implemented properly.
Skipping '029_muddy_stones' because 'PNG' not found.
Skipping '029_muddy_stones' because 'SCOPED_ENUMS' not implemented properly.
Skipping '030_pool_tiles' because 'PNG' not found.
Skipping '030_rain' because 'PNG' not found.
Skipping '031_brick_torus' because 'PNG' not found.
Skipping '032_object_tracking' because 'UNICODE_LITERALS' not implemented properly.
Skipping '034_billiard_balls' because 'PNG' not found.
Skipping '034_billiard_balls' because 'INITIALIZER_LISTS' not implemented properly.
Skipping '040_jelly_cube' because 'FUNCTION_TEMPLATE_DEFAULT_ARGS' not implemented properly.
Skipping '041_blob_mt' because 'THREADS' not implemented properly.
Configuring done
Generating done

MacOS X support

I've started porting some of the code over to MacOS X.

The characteristic issues with MacOS X is that it does not have full OpenGL 3.3 support (it does 'support' GLSL 330 partially but does not report it).

It also does not have a Compatibility profile for OpenGL 3.x, only the Core Profile.

So far, with the combination of opening of OpenGL 3.3 forward compatible context using GLFW and loading the extensions with GLEW (with glewExperimental = GL_TRUE), I can run the initial examples but they have graphical artefacts and do not actually draw anything.

I'll need to investigate this further, but I was hoping you could shed some light :)

Oh +1 for moving to github ;).

VertexAttribArray:: Missing consts, missing func in documentation, plus wrong links

In the class VertexAttribArray there are a few minor issues:

  • The Pointer functions should probably be taking "const void *pointer" rather than "void *pointer", as the C OpenGL ones take constant pointers. For ex. glVertexAttribPointer takes "const GLvoid * pointer".
  • The LPointer function is missing from the documentation but it is implemented.
  • The integral and double types of format and pointer have wrong links under Related OpenGL symbols, as they are all documented under the main function, so both the IPointer and the LPointer functions are in documented the .../glVertexAttribPointer.xml

example 022_xyz_planes has a use-after-free bug

When explorering oglplus example, I found this bug:

std::stringstream plane_count_def;
...
plane_count_def.str().c_str() --> c-string from a temp std::string object

and I suggest a small fix :

diff --git a/example/oglplus/022_xyz_planes.cpp b/example/oglplus/022_xyz_planes.cpp
index 36846ec..c4d8a17 100644
--- a/example/oglplus/022_xyz_planes.cpp
+++ b/example/oglplus/022_xyz_planes.cpp
@@ -104,9 +104,11 @@ public:
std::stringstream plane_count_def;
plane_count_def <<"#define PlaneCount "<<plane.size()<<'\n';

  •   std::string plane_count_def_str=plane_count_def.str();
    
    • const GLchar* torus_vs_source[3] = {
      "#version 330\n",
  •       plane_count_def.str().c_str(),
    
  •       plane_count_def_str.c_str(),
        "uniform mat4 ProjectionMatrix, ModelMatrix, CameraMatrix;"
        "uniform float ClipSign[PlaneCount];"
        "uniform vec4 ClipPlane[PlaneCount];"
    
    @@ -183,9 +185,10 @@ public:
    attr.Enable();
    }
  •   const GLchar\* plane_vs_source[3] = {
          "#version 330\n",
    
  •       plane_count_def.str().c_str(),
    
  •       plane_count_def_str.c_str(),
        "uniform mat4 ProjectionMatrix, CameraMatrix;"
        "uniform float ClipSign[PlaneCount];"
        "uniform vec4 ClipPlane[PlaneCount];"
    

Detection of support for std thread and mutex

The build system needs to detect if standard C++11 thread and mutexes are supported (including support for move-construction) and if not disable the building of multi-threaded examples.

Strict OpenGL Version Detection Fails

I have tried building both the stable and development packages, but both of them show the same message. Being pretty new to CMake, I am confused. Is there a problem with my machine(specs below) or I have to set something else?

My machine specs:
CMake GUI 2.8.12.1
Windows 8.1
MinGW with g++ 4.8.1

Get indices of obj mesh

I can not figure out how to get the indices from an obj mesh. Indices() method returns an empty vector:

    /// Returns element indices that are used with the drawing instructions
    IndexArray Indices(void) const
    {
        return IndexArray();
    }

Is this simply not implemented yet or is there another way to get the index array?

TextureOps::SwizzleRGBA calls wrong OpenGL function.

The function 'static TextureSwizzle TextureOps::SwizzleRGBA(Target target);'

is calling glTexParameteri(target, GL_TEXTURE_SWIZZLE_RGBA, mode), but this call generates GL_INVALID_ENUM, since GL_TEXTURE_SWIZZLE_RGBA should be called with glTexParameteriv, not glTexParameteri.

The macro itself is usually used to set all four swizzle target, with an array of swizzle modes. Though it would definitely make sense to be able to use it to set all four targets to the same mode, but you'll still have to give an array to glTexParameteriv.

Also the getter should return an array, instead of a single swizzle mode value.

GL detection and extensions

Hi,

I use oglplus for several months and I like it.
But on my new linux (ubuntu 13.10) install I have a problem with Gl and extension detection.

  1. If I run
    ./configure.py --no-examples --from-scratch --include-dir=/home/alex/lib/glew-1.10.0/include --library-dir=/home/alex/lib/glew-1.10.0/lib

It finds GL 4.4 but stop at compiling
-- Found GL extension: EXT_direct_state_access
But glewinfo gives that this extension is ok

  1. If I force glew
    ./configure.py --no-examples --from-scratch --use-glew --include-dir=/home/alex/lib/glew-1.10.0/include --library-dir=/home/alex/lib/glew-1.10.0/lib

It can not detect GL:
-- Detecting OpenGL version
Could not detect GL version, assuming 3.0
and stop at
-- Found GLEW extension: AMD_performance_monitor
which is normal since GLEW tell that this extension is missing:
GL_AMD_performance_monitor: MISSING

Can I bypass these tests ?
Many thanks,
Alex
PS: On my laptop (Windows 8.1) every thing is ok (ok it not the same hardware, nor OS).

OGLplus 0.40 examples won't build on Debian Wheezy 7.3

Hi Matus. Jesus here.

I'm trying to build the examples for version 0.40 but it seems some functions can't be found during the link stage. Here's a pastebin of the python configure script execution: http://pastebin.com/is4WpzW5

I chose to use FreeGLUT + GLEW:

sudo apt-get install doxygen cmake g++ libglew-dev freeglut3-dev libpng12-dev

Debian Wheezy ships with libglew1.7 so I had to manually upgrade it to libglew1.10 from Jessie's testing sources. Here's the build log after the configure script is done: http://pastebin.com/M6MiW2eV

By no means am I an expert on the CMake build system so I'm out of ideas as to what I'm doing wrong. Any help is appreciated.

Thanks for your time!

[feature request] glGetTexImage

Is there any reason, why oglplus::Texture has glGetCompressedTexImage implemented, but it doens't provide any function for glGetTexImage? The later one seems to be a lot more often used function.

A little build problem

My Environment: Kubuntu 13.04 64-bit, 3.11.0-13-generic

I don't know whether GL3W is required or not on Linux, if it is not required it may be deleted from dependency.

  1. There's an warning from cmake that "OGLplus library cannot be built!", meanwhile it succeeded in configuring.
  2. I'm suffering from a build error and hope that will help.

This is configure info:

-- Found GLEW: /usr/include/GL /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Could NOT find GL3W
-- Found GLFW: /usr/include /usr/lib/libglfw.so
-- Found GLFW3: /usr/local/include glfw3;rt;Xrandr;Xi;GL;m;dl;Xrender;drm;Xdamage;X11-xcb;xcb-glx;xcb-dri2;Xxf86vm;Xfixes;Xext;X11;pthread;xcb;Xau;Xdmcp
-- Found SDL: /usr/include/SDL /usr/lib/x86_64-linux-gnu/libSDL.so
-- GLM header files not found
-- Found PNG: /usr/include /usr/lib/x86_64-linux-gnu/libpng.so
-- Found Pango/Cairo
-- Boost version: 1.54.0
-- Using GLX for GL context initialization.
-- Using native OpenGL API library
-- Detecting OpenGL version
-- Found GL version 4.2
-- Found GL extension: ARB_shader_subroutine
-- Found GL extension: ARB_shader_atomic_counters
-- Found GL extension: ARB_tessellation_shader
-- Found GL extension: ARB_separate_shader_objects
-- Found GL extension: ARB_transform_feedback2
-- Found GL extension: ARB_viewport_array
-- Found GL extension: ARB_compatibility
-- Found GL extension: EXT_direct_state_access
-- Found GLEW extension: EXT_direct_state_access
CMake Warning at config/OGLplusLib.cmake:44 (message):
  OGLplus library cannot be built!
Call Stack (most recent call first):
  CMakeLists.txt:179 (include)


-- Configuring done
-- Generating done
-- Build files have been written to: /files/SOURCE_code/OGLPlus/building/_build
# Configuration completed successfully.
# To build OGLplus do the following:

cd _build
make -j 3
make install

# NOTE: installing to '/usr/local' may require administrative privilegues

Build error:

Scanning dependencies of target oglplus_example_harness
[  0%] Generating OGLplus HTML documentation
[  1%] Building CXX object example/oglplus/CMakeFiles/oglplus_example_harness.dir/glx_main.cpp.o
Error: Tag file `/files/SOURCE_code/OGLPlus/building/_build/doc/doxygen/oglplus/../oalplus/doxygen.tags' does not exist or is not a file. Skipping it...
Error: Tag file `/files/SOURCE_code/OGLPlus/building/_build/doc/doxygen/oglplus/../eglplus/doxygen.tags' does not exist or is not a file. Skipping it...
/files/SOURCE_code/OGLPlus/building/example/standalone/002_triangle_compatibility.cpp:36: Warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon)
Linking CXX static library liboglplus_example_harness.a
[  1%] Built target oglplus_example_harness
Scanning dependencies of target texture-flower_glass
[  2%] Copying default fallback texture flower_glass
[  2%] Built target texture-flower_glass
Scanning dependencies of target 032_transitions
[  2%] Building CXX object example/oglplus/CMakeFiles/032_transitions.dir/032_transitions.cpp.o
Linking CXX executable 032_transitions
Warning: Include graph for 'all.hpp' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ActiveSubroutineInfo::ActiveSubroutineInfo(oglplus::aux::ProgramInterfaceContext&, unsigned int)':
032_transitions.cpp:(.text._ZN7oglplus3aux20ActiveSubroutineInfoC2ERNS0_23ProgramInterfaceContextEj[_ZN7oglplus3aux20ActiveSubroutineInfoC5ERNS0_23ProgramInterfaceContextEj]+0xc4): undefined reference to `glGetActiveSubroutineName'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::ProgramOps::GetStageIntParam(unsigned int, unsigned int) const':
032_transitions.cpp:(.text._ZNK7oglplus10ProgramOps16GetStageIntParamEjj[_ZNK7oglplus10ProgramOps16GetStageIntParamEjj]+0x91): undefined reference to `glGetProgramStageiv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_t(std::integral_constant<unsigned long, 1ul>, int const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKiz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKiz]+0xcb): undefined reference to `glProgramUniform1i'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_t(std::integral_constant<unsigned long, 1ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKfz]+0xcb): undefined reference to `glProgramUniform1f'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_v(std::integral_constant<unsigned long, 2ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm2EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm2EEPKfz]+0xcb): undefined reference to `glProgramUniform2fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_v(std::integral_constant<unsigned long, 3ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm3EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm3EEPKfz]+0xcb): undefined reference to `glProgramUniform3fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformMatrixSetters::_fns_v(std::integral_constant<unsigned long, 4ul>, std::integral_constant<unsigned long, 4ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux27ProgramUniformMatrixSetters6_fns_vESt17integral_constantImLm4EES3_PKfz[_ZN7oglplus3aux27ProgramUniformMatrixSetters6_fns_vESt17integral_constantImLm4EES3_PKfz]+0xcb): undefined reference to `glProgramUniformMatrix4fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::SubroutineUniformInitOps::_do_init_location(unsigned int, char const*) const':
032_transitions.cpp:(.text._ZNK7oglplus3aux24SubroutineUniformInitOps17_do_init_locationEjPKc[_ZNK7oglplus3aux24SubroutineUniformInitOps17_do_init_locationEjPKc]+0x85): undefined reference to `glGetSubroutineUniformLocation'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::SubroutineInitOps::_do_init_location(unsigned int, char const*) const':
032_transitions.cpp:(.text._ZNK7oglplus3aux17SubroutineInitOps17_do_init_locationEjPKc[_ZNK7oglplus3aux17SubroutineInitOps17_do_init_locationEjPKc]+0x85): undefined reference to `glGetSubroutineIndex'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::UniformSubroutines::_get_location_count(unsigned int, unsigned int)':
032_transitions.cpp:(.text._ZN7oglplus18UniformSubroutines19_get_location_countEjj[_ZN7oglplus18UniformSubroutines19_get_location_countEjj]+0x89): undefined reference to `glGetProgramStageiv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::UniformSubroutines::Apply()':
032_transitions.cpp:(.text._ZN7oglplus18UniformSubroutines5ApplyEv[_ZN7oglplus18UniformSubroutines5ApplyEv]+0x7b): undefined reference to `glUniformSubroutinesuiv'
collect2: error: ld returned 1 exit status
make[2]: *** [example/oglplus/032_transitions] Error 1
make[1]: *** [example/oglplus/CMakeFiles/032_transitions.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Warning: Include graph for 'lib.hpp' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
/files/SOURCE_code/OGLPlus/building/doc/include/oglplus/doc.hpp:225: Warning: Invalid list item found
[  2%] Built target oglplus-prebuild-doc
make: *** [all] Error 2

Typo in shapes::Cube::Tangent?

Hello!

In the function shapes::Cube::Tangent in the n array:
const T n[6][3] = {
{ T(0), T(0), -T(1)},
{+T(1), T(0), T(0)},
{+T(1), T(0), T(0)},
{ T(0), T(0), +T(1)},
{-T(1), T(0), T(0)},
{-T(1), T(0), T(0)}
};
I believe n[4][0] should be +T(1) rather than -T(1). Just check the TexCoords, it should definitely be the negate of n[5][0]. And for example at Tut22_parallax_mapping, it is really visible that on the face where the normal is -y (which is the normal that belongs to n[4]) the bump pops out of the cube, but it should be going in the opposite way. (Note that you have to wait a like 10 seconds to see that face.) And if I replace the Tangent expression in the VS to (Normal == vec3(0.0, -1.0, 0.0) ? -Tangent : Tangent) the result looks correct.

Btw I REALLY love your library, awesome work!
Cheers:
Tomius

Text font styles

Hi.Is it possible to set font styles to the bitmap text layouts? NV_PATH I can do it but how about other text renderers?Thanks.

cmake can't find opengl version, assumes 3.0. but my glxinfo says i have opengl 4.3

Hello,

when building oglplus it says: "can't get opengl version, assuming 3.0", problem with that is that a lot of examples don't get built after because it says certain extensions aren't setup properly (that require 3.0+). i tried setting --max-gl-version 4.3 but that didn't work. is there a --min-gl-version?

here's my glxinfo | grep OpenGL output:
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon(TM) HD 6480G
OpenGL core profile version string: 4.3.12438 Core Profile Context 13.20.5
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.3.12438 Compatibility Profile Context 13.20.5
OpenGL shading language version string: 4.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:

i'm using glfw3 for context creation, since glfw3 changed a few things from version 2 (i had to edit FindGLFW.cmake for it to work) maybe that's what causing not getting the right opengl version?

thanks in advance.

oglplus::Texture::MaxLevel?

The title tells it all. Didn't you forget to wrap this one, did you? Currently, I need it for my project. Can I just use (I mean mix this bare call with OGLplus calls)

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);

for the time being until you fix it?

GLSLSource::FromFile problem

Hi,
I am new to oglplus, and having some troubles with GLSLSource::FromFile(), the resulting GLSLSource instance doesn't appear to be valid : I get a compilation error for the shader after passing it to ShaderOps::Source().
However this issue only appears on one computer (Windows 7 with AMD GPU), after some research and digging into the sources, it seems that the value returned by

GLint InputStreamGLSLSrcWrap::_check_and_get_size(std::istream& in)

and therefore GLSLSource::Lengths() is wrong : Using an hard coded value for the length and manually passing the tree arguments to ShaderOps::Source solves the problem.

The original source looks like this :

oglplus::VertexShader m_vs;
m_vs.Source( GLSLSource::FromFile("Path.glsl") );
m_vs.Compile();

I read that counting characters from an istream cannot be completely reliable, could this be a bug, or am I doing something wrong ?
(I checked my shader file, rewrote it from scratch to avoid any copy/paste bull**** etc...)

Thanks !

incorrect indices for Plane

the indices array returned of the plane shape contains indices for points which are not in the positions array

with the default udiv(2) and vdiv(2) the index 14 is contained in the index array although there are only 9 points / 27 floats

i think the bug is in plane.ipp line 32:
indices[k++] = pri;
you probably meant the last point whereas pri is the number of indices.

Can't cmake nor use the bat file to make a working snl project...

windows7x64, vs2010:
Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/yanko/Desktop/oglplus-0.33.0/_build/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA2\MICROS2.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec1303100210

Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1>------ Build started: Project: cmTryCompileExec1303100210, Configuration: Debug Win32 ------

1>Build started 14/07/2013 11:43:56 PM.

1>PrepareForBuild:

1> Creating directory "C:\Users\yanko\Desktop\oglplus-0.33.0_build\CMakeFiles\CMakeTmp\Debug".

1>InitializeBuildStatus:

1> Creating "cmTryCompileExec1303100210.dir\Debug\cmTryCompileExec1303100210.unsuccessfulbuild" because "AlwaysCreate" was specified.

1>ClCompile:

1> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

1> Copyright (C) Microsoft Corporation. All rights reserved.

1>

1> cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec1303100210.dir\Debug" /Fd"C:/Users/yanko/Desktop/oglplus-0.33.0/_build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1303100210.pdb" /Gd /TC /analyze- /errorReport:prompt testCCompiler.c

1>

1> testCCompiler.c

1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:00.19

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/yanko/Desktop/oglplus-0.33.0/_build/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA2\MICROS2.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec659603825

Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1>------ Build started: Project: cmTryCompileExec659603825, Configuration: Debug Win32 ------

1>Build started 14/07/2013 11:44:17 PM.

1>PrepareForBuild:

1> Creating directory "C:\Users\yanko\Desktop\oglplus-0.33.0_build\CMakeFiles\CMakeTmp\Debug".

1>InitializeBuildStatus:

1> Creating "cmTryCompileExec659603825.dir\Debug\cmTryCompileExec659603825.unsuccessfulbuild" because "AlwaysCreate" was specified.

1>ClCompile:

1> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

1> Copyright (C) Microsoft Corporation. All rights reserved.

1>

1> cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec659603825.dir\Debug" /Fd"C:/Users/yanko/Desktop/oglplus-0.33.0/_build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec659603825.pdb" /Gd /TC /analyze- /errorReport:prompt testCCompiler.c

1>

1> testCCompiler.c

1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:00.13

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Please Help!

THank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.