openframeworks / openframeworks/openFrameworks

Discuss: Make programmable rendered default + Option for running GL/GLES Latest

Open
#7,689 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

At the moment testing projects on the Pi, so many don't work because of mismatched GL Versions specified in main.cpp.
But this affects other platforms too. Supporting emscripten for an example becomes quite messy and then there is no guarantee the example will work on RPI.

eg:

int main( ){
// PBR only works with the programmable renderer
#ifdef TARGET_EMSCRIPTEN
	ofGLESWindowSettings settings;
	settings.glesVersion = 3;
#else
	//Use ofGLFWWindowSettings for more options like multi-monitor fullscreen
	ofGLWindowSettings settings;
	settings.setSize(1200, 768);
	settings.setGLVersion(3,2);
#endif
	
	settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN
	auto window = ofCreateWindow(settings);
	
	ofRunApp(window, std::make_shared<ofApp>());
	ofRunMainLoop();
}

What if we switched to programmable renderer by default and while still allowing GL and GLES versions we have something like this:

int main( ){

	ofWindowSettings settings; 
 	settings.setRenderer(OF_GL_LATEST); //uses latest GL or GLES version supported, this could even be the default behavior
	settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN
	auto window = ofCreateWindow(settings);
	
	ofRunApp(window, std::make_shared<ofApp>());
	ofRunMainLoop();
}

With legacy (current) behavior:

int main( ){

	ofGLWindowSettings settings; 
 	settings.setRenderer(OF_GL_LEGACY); //can use this to use the old default 
	//settings.setGLVersion(3,2); //or uncomment to specify a specific version 
	settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN
	auto window = ofCreateWindow(settings);
	
	ofRunApp(window, std::make_shared<ofApp>());
	ofRunMainLoop();
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the example main.cpp shown in the issue and trace how ofWindowSettings, ofGLWindowSettings, ofGLESWindowSettings, setRenderer, and setGLVersion are handled. Compare the current legacy and programmable renderer paths across the mentioned platforms, including Raspberry Pi and Emscripten. Done requires an agreed design for defaults, latest GL/GLES selection, legacy behavior, and version overrides.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.