Somebody using ofxPBRHelper with 0.10?


#1

hey, I am trying to build ofxPBRHelper with several of the forks/branches (from ofxPBR too) without success.
I am getting several errors like:

/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:11:19: Too few arguments to function call, expected at least 2, have 1
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:24:2: 'setup' declared here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:38:9: No member named 'makeDepthMap' in 'ofxPBR'
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:43:25: Too many arguments to function call, expected 0, have 1
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:43:2: 'drawEnvironment' declared here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:76:9: 'begin' is a private member of 'ofxPBR'
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:72:7: Declared private here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:76:15: Too many arguments to function call, expected 0, have 2
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:72:2: 'begin' declared here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:95:9: 'end' is a private member of 'ofxPBR'
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:73:7: Declared private here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:97:9: 'begin' is a private member of 'ofxPBR'
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:72:7: Declared private here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:97:15: Too many arguments to function call, expected 0, have 1
/Users/myUser/Documents/openFrameworks/addons/ofxPBR/src/ofxPBR.h:72:2: 'begin' declared here
/Users/myUser/Documents/openFrameworks/addons/ofxPBRHelper/03-geometryShaderExample/src/ofApp.cpp:101:9: 'end' is a private member of 'ofxPBR'

Any help about what versions/forks are working are appreciated.


#2

I tried by using https://github.com/neilmendoza/ofxPBR and https://github.com/neilmendoza/ofxPBRHelper and it worked. I did have to change two things though:

  • Find two instances of float GetOcclusion and make sure it returns 1.0 instead of 1 (float vs int).
  • In main.cpp, replace setting the width and height properties (now private) by settings.setSize(1280, 720);

Can you try with those two forks and see if it works for you?

note: I realized part of the changes I made are already implemented upstream.


#3

Cool thanks a lot @hamoid ! It works like you say. (OF masterbranch, Xcode9, High Sierra) Int to Float change not was mandatory.

The only problem is that it crashes when clicking gui button to load change the texture or cubemap/panorama.:

This happens with ofxImgui both masterbranch or 1.62 release version…


#4

I see you were trying 04-vboMesh_InstancingExample. That one has a missing data/ofxPBRAssets/textures folder which you can copy from 03-geometryShaderExample.

Does that fix the issue?


#5

that do not fixed the crash. I copied the textures folder. All the 4 examples are getting the same crash when clicking on this gui buttons.


#6

I see now that I’m using an old ofxImGui… In mine clicking the images do nothing, and in yours they crash. I’ll try to fix that.

Update: so if I update ofxImGui to the latest version I get the same crash as you do. It seems to happen here:

I guess because it sets

showTextureWindow = true;

I guess there’s something wrong in this function

but I have no time to debug now… Maybe you could try commenting out the content of that function and add it back line by line until you figure out where it happens. The console is not showing anything useful, even in debug mode…


#7

hey @hamoid, good news in the house :wink:
@yasuhiro0122 just made all the update work: