-
Notifications
You must be signed in to change notification settings - Fork 125
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
Std explicit #62
base: master
Are you sure you want to change the base?
Std explicit #62
Conversation
+ use inline glsl instead of external shader files to render imgui
+ use consistent string literal marker for inlined glsl source code.
@@ -29,7 +29,7 @@ namespace ofxImGui | |||
virtual void onKeyReleased(ofKeyEventArgs& event) = 0; | |||
virtual void onWindowResized(ofResizeEventArgs& window); | |||
|
|||
virtual GLuint loadTextureImage2D(unsigned char * pixels, int width, int height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've changed this here, as the base engine should be agnostic of its final rendering backend - and GLuint inserts a dependency to OpenGL.
What's the benefit of explicit std? |
It looks like openFrameworks > 0.10 will be a bit more picky about namespaces. ... it allows us to keep the global namespace a bit cleaner - oF before 0.10, in The strongest itch comes from having this Note that it's perfectly ok to do The namespace drive is part of a more general drive of disentangling the oF headers, and streamlining dependencies, all yak shaving operations to ultimately reduce complexity and compile times :) |
I'm super skeptical about modern cpp practices and the promises it brings. I tend to agree with this comment I guess it's best to fall in line with what our dependency is doing. You seem to be working on this more than I am so I've invited you as a collaborator - if you want just join and merge whenever you see fit |
Oh, it's not a modern cpp practice - The way i read the comment you linked, it seems to approve of not using I believe openFrameworks had the line But oF has grown, and there are many libraries that somehow interact with it, and the more oF makes sure to keep the global namespace tidy, the less unintended side-effects we might run into in the future. Debugging header-dependency- and namespace collisions is really tough... |
I wish 17 years seemed like a long time ago. It's entirely possible I don't fully understand the issue and will look at some of the links. (I've only had a conflict once with ctime.h which clashed with boost). |
Hi guys, I tried to compile ofxImGui against the current OF master branch and experienced those namespace errors that weren't in OF 0.9.8. Not sure it's due to pre-release or simply because as @tgfrerer mentioned OF has embraced that safer practice. In any case, adding std:: make it compile cleanly. |
use explicit
std
, in header files,using namespace std
in .cpp files. This is necessary for latest openFrameworks, which (finally) has more stricter handling of namespaces.