Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't work with ofGLProgrammableRenderer #8

Closed
julapy opened this issue Feb 27, 2015 · 11 comments
Closed

doesn't work with ofGLProgrammableRenderer #8

julapy opened this issue Feb 27, 2015 · 11 comments

Comments

@julapy
Copy link

julapy commented Feb 27, 2015

when enabling the ofGLProgrammableRenderer, ofxGramCam only partially works.

int main( ){

    ofGLFWWindowSettings windowSettings;
    windowSettings.setGLVersion(4, 1);
    windowSettings.width = 1024;
    windowSettings.height = 768;
    windowSettings.windowMode = OF_WINDOW;

    ofCreateWindow(windowSettings);

    ofRunApp( new testApp());

}

cursor functionality does not work.

looks like gl calls need to go through OF API for this addon to work on fixed pipeline and programmable.

@elliotwoods
Copy link
Owner

can you explain what doesn’t work?
my guess is that it doesn’t grab the depth value correctly
is this what you are experiencing?

screenshot would be great

@julapy
Copy link
Author

julapy commented Feb 27, 2015

hey @elliotwoods, thats right, the depth value is always coming back as (0, 0, 0) and so the cursor only sticks to that point.

@elliotwoods
Copy link
Owner

any suggested fix? ;)

@julapy
Copy link
Author

julapy commented Mar 3, 2015

hey,
i only had a brief look...
but it seemed that the instead of using raw gl call, the addon needs to call the OF api for the ofGLProgrammableRenderer to work correctly.
thats as much as i can look into it... flat out with other work atm :/

@elliotwoods
Copy link
Owner

ofGLFWWindowSettings doesn't exist in my oF, is this something new with 0.9.0?

@elliotwoods
Copy link
Owner

edit : i'm on 0.8.4

@julapy
Copy link
Author

julapy commented Mar 11, 2015

yeah thats the new method for setting up a window with the latest master.

i think the old method for enabling the programmable renderer is,

int main() {
    ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
    ofSetupOpenGL(1024, 768, OF_WINDOW);
    ofRunApp(new ofApp());
}

i pulled that out of an older app which i think was built against 084 or there abouts.

@elliotwoods
Copy link
Owner

elliotwoods commented Mar 12, 2015 via email

@elliotwoods
Copy link
Owner

i'm on 0.9.0 now and am getting crashes sometimes when using ofxGrabCam with it so i'm actively looking to rewrite now. looking into it!

@elliotwoods
Copy link
Owner

ok i've rewritten the existing functionality and it works in the programmable renderer
image

this is pushed to master
sorry about the incredibly long wait!

i noticed that when you initialise the window this way (rather than the previous way) that it causes the pixels to draw 1:1 on highdpi screens (i.e. ignores highdpi settings. testing on windows).
this is curious because i didn't know there was any way to turn highdpi on/off in windows.

@julapy
Copy link
Author

julapy commented Aug 6, 2015

awesome! looks forward to using it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants