When I load my image in the setup: image.loadImage(ofToDataPath("test.exr"))
the following warning appears: _[warning] ofGLUtils: ofGetGLInternalFormat(): float textures not supported in OpenGL ES_
I digged a little bit and it seems to me that, as in line 92 of ofGLUtils.cpp, the correct pixel type would be defined at this point: #if not defined TARGET_OPENGLES || defined TARGET_EMSCRIPTEN
one of these two flags has been activated somewhere but as far as I’m concerned, these targets should be explicitly defined when creating the application.
Is this a bug or did I miss something?
Thanks in advance.
Hello Nick. thanks for your answer.
I’m currently targeting desktop platforms (I use Windows, but other people in our studio use macOS).
In older versions of Openframeworks, we used to load 32 bit float textures to store point cloud information and then use them in shaders.
If this is not going to be supported anymore I’m sure we can find a workaround
Let me know!
Thanks in advance.
Hi @cwrong,
Sorry, looking back at my answer it is lacking more information.
Float textures should be supported on desktop, including Windows, OSX and Linux. Seems like you might be using a nightly build?
The ofCubeMap class uses exr float images. Can you try compiling the materialPBR example.
string fpath = "modern_buildings_2_2k.exr";
img.load(fpath); // fails to load into ofImage, must use ofFloatImage
ofLoadImage(tex, fpath ); // fails to load into ofTexture
ofLoadImage(fpix, fpath); // succeeds in loading to ofFloatPixels
if( !tex.isAllocated() ) {
// The texture has failed to load, so load the float pixels data
tex.loadData( fpix );
}