supportVAOs is bool but tries to get pointer assigned

I have been using openFrameworks (0.8.1) on an iMac (Xcode). I wanted to try MS Visual Studio on my Windows 7 laptop so downloaded the appropriate oF version and installed MS VS Express2013 for Windows Desktop.

To test the combination I tried to compile the oF example imageSequenceExample. The first item in the error list refers to a line in ofVbo.cpp where the function ofVbo::setVertexData(…) is defined. The issue is that the return value of ofGetGLProgrammableRenderer() is a pointer but the statement (line 330) tries to assign this to variable supportVAOs which is of type bool.

What’s up?

Hey, I would try with VS 2012 express as i don’t think 2013 is supported yet - https://github.com/openframeworks/openFrameworks/blob/master/docs/visualstudio.md

I have been working with VS 2013 Express and so far this is the only incompatibility I have found (Other than compiling POCO from sources).

My project didn’t require vertex array objects to be active so I just deactivate that setting supportVAOs = false. If you just want to test on windows you can wrap that up between #ifdef TARGET_WIN32 #endif so the code would remain untouched on your Mac

Thanks, I will follow up with your advice.

Bob B.

just ran into this myself, you’ve probably figured it out, but making this change fixed it for me (not the recommended fix I’m sure, but good enough for corporate/govt work):

supportVAOs = (bool)ofGetGLProgrammableRenderer();

This was fixed 29 Jul 2014 as a fix for C++ 11.

https:// github.com/openframeworks/openFrameworks/commit/050445b8d6318319fd46c06c6c245a47ff074089

Don’t know why it is still present in 0.8.4 released Sept 2014.

The fix is:

supportVAOs = ofIsGLProgrammableRenderer();

For VS2013 replace the libs in the vs folders mentioned below with the libs from the corresponding vs folders in the VS2013 download.