How to enable GL ES extensions?

Is there an easy way to do that? Thanks.

on the main.cpp file just say what you want to use like this :

int main( ){

	ofSetLogLevel(OF_LOG_VERBOSE);
	int windowWidth = 1024;
	int windowHeight = 500;
	
	#ifdef TARGET_OPENGLES
    	ofGLESWindowSettings settings;
	settings.width = windowWidth;
	settings.height = windowHeight;
	settings.setGLESVersion(2);
	ofCreateWindow(settings);
	#else
	ofSetupOpenGL(windowWidth, windowHeight, OF_WINDOW);
	#endif

	ofRunApp( new ofApp());

check the examples/gl/shaderexample

1 Like

@cyrstem thanks. Maybe I was asking wrong. I know how to use GL ES, but I am not sure how to enable certain extensions (actually they are for webGL, but that is what is used for Emscripten): Using WebGL extensions - Web APIs | MDN

Searched a little more and I guess here is a good answer: c++ - Enable WebGL-extensions from Asm.js/emscripten? - Stack Overflow

@Jona ohh ok . yup that’s another thing i haven’t try much emscripten so can’t help there
sorry

Hey @Jona, have you ever run the glInfoExample with Emscripten? I wonder if it would work, if it would print all the available extensions when the space bar is pressed.

Hey @TimChi thank you. Good idea. I already made a PR regarding the example, so I can just read out the information.

1 Like