Code Monkey home page Code Monkey logo

Comments (7)

ofZach avatar ofZach commented on May 10, 2024

have uploaded an example here:

http://www.openframeworks.cc/files/macOnTop.zip

note you must call "MacGLUTFix(true)" every frame or else it doesn't work. right now this is in user code, but should be in the glut window code.

from openframeworks.

 avatar commented on May 10, 2024

But this approach requires us to add extra files to the OF folder. Or we would have to declare ofAppGlutWindow as a objcpp file type to make the cocoa calls work inside the cpp. Neither seem like ideal solutions to me.

Theo

from openframeworks.

ofZach avatar ofZach commented on May 10, 2024

See if you can fix it with c++ !

AFAIK, there's not much we can do if glut is cocoa based. I couldn't find a non objective c solution for this (short of modifying glut and shipping it instead of using the framework). Adding a .mm and .h to the OF folder doesn't seem that bad (it breaks backwards compatibility, and makes packaging a bit harder) compared to not fixing this, which just makes life super difficult for fullscreen mac apps.

from openframeworks.

 avatar commented on May 10, 2024

Yeah I have been looking - I am wondering if we can just include it in a .h - or something clever like that. Will see if I can find a better solution. Otherwise maybe we have an ofMacUtils.mm where we can put mac specific stuff (like QTUtils).

from openframeworks.

ofTheo avatar ofTheo commented on May 10, 2024

There doesn't seem to be a non-cocoa way to solve this. So I tried modifying GLUT itself. It worked out pretty well - http://www.openframeworks.cc/dev_videos/customGLUT.mov

I grabbed the GLUT project from here ( http://iihm.imag.fr/blanch/howtos/MacOSXGLUTMouseWheel.html ) and just changed the fullscreen level to a normal window level.

The plus side about bundling our own GLUT is we can make other improvements too - like adding scroll wheel support and FSAA.

from openframeworks.

ofTheo avatar ofTheo commented on May 10, 2024

the GLUT framework is in GIT - need to change the examples to use the framework.

from openframeworks.

ofTheo avatar ofTheo commented on May 10, 2024

updated examples to use compiled OF ( xcode ) and Glut. Closed by 2028077. Closed by 2028077. Closed by 2028077.

from openframeworks.

Related Issues (20)

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.