Skip to content

Instantly share code, notes, and snippets.

@shiyuugohirao
shiyuugohirao / ofxMouseHandler.h
Last active August 16, 2024 12:58
handling mouse visibility in openFrameworks
#pragma once
#include "ofAppRunner.h"
/* [Note]
if you use ImGui, add bellow after .begin() not to control mouse by ImGui.
`ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;`
*/
inline void updateMouse(int mouseX, int mouseY, float hideTimef = 1.0) {
glm::vec2 cursorPos(mouseX, mouseY);
@shiyuugohirao
shiyuugohirao / ofxNotion.h
Last active February 21, 2024 03:15
simply use to send Notion for e.g. log
/*
ofxNotion
by shugohirao
simply use to send Notion for e.g. log
doc : https://shiyuugo.notion.site/ofxNotion-91b51c9d9fee458e94c1e9261dc7b294?pvs=4
*/
#pragma once
#include "ofMain.h"
@shiyuugohirao
shiyuugohirao / ofxMonitorUtils.h
Created March 8, 2024 10:00
get Moitor information for openframeworks
#pragma once
#include "ofLog.h"
#include "ofVectorMath.h"
#include "GLFW/glfw3.h"
namespace ofxMonitorUtils {
struct MonitorInfo {
int index;
std::string name;
@shiyuugohirao
shiyuugohirao / ofxUnsplash.h
Created October 3, 2024 13:24
tiny methods for UnsplashAPI with openFrameworks
#pragma once
#include "ofURLFileLoader.h"
#include "ofFileUtils.h"
#include "ofUtils.h"
namespace ofxUnsplash {
string AccessKey;
inline void setupAccessKey(const string& accessKey) {
AccessKey = accessKey;