User avatar
Zuzu_Typ
Posts: 355
Joined: Sun Mar 02, 2014 10:26 pm

Bandicam doesn't correctly hook OpenGL's Core-Profile

Wed Jul 19, 2017 7:23 am

So we meet again, Bandicam!
(actually I love how that rhymes)

As the title suggests, Bandicam doesn't hook OpenGL applications correctly that use the core profile, to be more precise, it causes repeating errors on the given application's OpenGL context.
Those errors seem to be either 0x0502 (GL_INVALID_OPERATION) or 0x0501 (GL_INVALID_VALUE).

These errors are generated together with basically any OpenGL function call (like glClear, glDrawArrays, glBindBuffer, etc.), until Bandicam is closed or hooked onto another process.

This wouldn't be a problem to me, if I wasn't working on a Python application that uses Python's OpenGL bindings, because it crashes when any error is generated, while C++' OpenGL bindings simply ignore any errors.

Never the less this probably isn't intended behaviour.

I wish you the best luck when resolving this issue.
Best regards,
--Zuzu_Typ--

User avatar
Bandicam Company
Site Admin
Posts: 7840
Joined: Mon Dec 20, 2010 12:19 pm

Re: Bandicam doesn't correctly hook OpenGL's Core-Profile

Wed Jul 19, 2017 11:27 am

Hello Zuzu_Typ,

For further investigation, could you give us more specific information such as the name of the application that uses Python's OpenGL bindings?
Could you let us know how to recreate the issue step by step?

We look forward to your reply.
Thank you.

User avatar
Zuzu_Typ
Posts: 355
Joined: Sun Mar 02, 2014 10:26 pm

Re: Bandicam doesn't correctly hook OpenGL's Core-Profile

Wed Jul 19, 2017 10:31 pm

Ok, so I have prepared two examples, where you can see the behaviour.

In this archive you will find a (modified) C++ version and a Python port of LearnOpenGL's Hello Triangle Tutorial (original source code).

The C++ version is pre-compiled and will print any OpenGL errors to the console.
(You can find the source code in the C++/ directory of the archive)

The Python version comes with Python already pre-configured and runs the main.py file that is in the Python/ directory of the archive (you can run it using the BATCH files). This means you can simply edit main.py to e.g. switch to OpenGL's COMPATIBILITY profile for comparison (there is a comment in main.py explaining how to do that).
If you want to use your own Python installation, make sure you're not using Python 2.7.13 (which will not work with DLLs due to a bug) and have the following packages installed:
  • glfw
    pyopengl
    numpy

Both versions come with a glfw3.dll library that was compiled using Visual Studio 2017 (with which the C++ version was also compiled).


The C++ version will print 1280 (= 0x0500 = GL_INVALID_ENUM, not 0x0501 as I said in the last post) as soon as you hook it with Bandicam and will then repeatedly print 1282 (= 0x0502 = GL_INVALID_OPERATION) until it is no longer hooked. (OpenGL error reference)

Thanks to elmindreda for helping me track down this issue.

Best regards,
--Zuzu_Typ--

User avatar
Bandicam Company
Site Admin
Posts: 7840
Joined: Mon Dec 20, 2010 12:19 pm

Re: Bandicam doesn't correctly hook OpenGL's Core-Profile

Thu Jul 20, 2017 10:58 am

Hello Zuzu_Typ,

Thank you for getting back to us.
We were able to recreate your issue and hopefully our development team will solve it soon.

Sorry for the inconvenience.

Return to “Bandicam - General Discussion”

Who is online

Users browsing this forum: Google [Bot] and 5 guests