Skip to content
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

ofFloatImage throw warning: [warning] ofGLUtils: ofGetGLInternalFormat(): float textures not supported in OpenGL ES #1

Open
docdude opened this issue Aug 9, 2021 · 0 comments

Comments

@docdude
Copy link

docdude commented Aug 9, 2021

I am trying to get HDR and EXR images rendered using your addon. Every call to ofImage routines, e.g update, rotate90, draw throws this warning:

[warning] ofGLUtils: ofGetGLInternalFormat(): float textures not supported in OpenGL ES

The code responsible is in ofGLUtils :
`
int ofGetGLInternalFormat(const ofFloatPixels& pixels) {
#ifndef TARGET_OPENGLES
switch(pixels.getNumChannels()) {
case 3: return GL_RGB32F;
case 4: return GL_RGBA32F;
case 2:
if(ofIsGLProgrammableRenderer()){
return GL_RG32F;
}else{
return GL_LUMINANCE_ALPHA32F_ARB;
}
default:
if(ofIsGLProgrammableRenderer()){
return GL_R32F;
}else{
return GL_LUMINANCE32F_ARB;
}
}
#else
ofLogWarning("ofGLUtils") << "ofGetGLInternalFormat(): float textures not supported in OpenGL ES";
switch(pixels.getNumChannels()) {
case 3: return GL_RGB;
case 4: return GL_RGBA;
case 2:
return GL_LUMINANCE_ALPHA;
default:
return GL_LUMINANCE;
}
#endif
}

From ofxTinyEXR here is where the warning is generated:
`
image.getPixels().setFromPixels(pixels, exr_image.width, exr_image.height, exr_header.num_channels);
image.update();

// 4. Free image data
FreeEXRImage(&exr_image);
FreeEXRHeader(&exr_header);

`

Here is the output from my app:

`

[notice ] -----EGL-----
[notice ] EGL_CLIENT_APIS = OpenGL OpenGL_ES
[notice ] EGL_VENDOR = Mesa Project
[notice ] EGL_VERSION = 1.4
[notice ] EGL_EXTENSIONS = EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
[notice ] GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 3.10
[notice ] GL_RENDERER = V3D 4.2
[notice ] GL_VERSION = OpenGL ES 3.1 Mesa 21.3.0-devel (git-6751d832c5)
[notice ] GL_VENDOR = Broadcom
[notice ] -------------
[verbose] GL INFO
[verbose] version: "OpenGL ES 3.1 Mesa 21.3.0-devel (git-6751d832c5)"
[verbose] shading language version: "OpenGL ES GLSL ES 3.10"
[verbose] vendor: "Broadcom"
[verbose] renderer: "V3D 4.2"
[verbose] extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_draw_instanced GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_ANGLE_pack_reverse_row_order GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_NV_pixel_buffer_object GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_primitive_bounding_box GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_NV_image_formats GL_OES_draw_elements_base_vertex GL_OES_primitive_bounding_box GL_OES_shader_io_blocks GL_OES_texture_border_clamp GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_EXT_buffer_storage GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_MESA_framebuffer_flip_y GL_EXT_texture_query_lod GL_MESA_bgra "
[verbose] ===================================

file /var/lib/PGenerator/images/Ted Lightspace CMS Calibration Disk/Pre Calibration Tools/BrightRings.exr
channels 3
[notice ] ofxTinyEXR: dims: 800, 800, channels: 3
[warning] ofGLUtils: ofGetGLInternalFormat(): float textures not supported in OpenGL ES
[warning] ofGLUtils: ofNode: /dev/dri/card0

`
TinyEXR is showing 3 channels. Nothing however is rendered on the screen. I am using the addon ofxRPI4Window to bypass X and draw directly to screen. Images that are not desigated as ofFloatImage render fine using this addon.

As you can see GL_EXTENSIONS have GL_OES_texture_float listed in my GL libraries I would think floating textures should be handled.

I compiled linux kernel is 5.10 which includes handling of HDR metadata in the vc4 driver on the Raspberry PI4. This is output from a tool called drm_info:

`
├───Driver: vc4 (Broadcom VC4 graphics) version 0.0.0 (20140616)
│ ├───DRM_CLIENT_CAP_STEREO_3D supported
│ ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES supported
│ ├───DRM_CLIENT_CAP_ATOMIC supported
│ ├───DRM_CLIENT_CAP_ASPECT_RATIO supported
│ ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS supported
│ ├───DRM_CAP_DUMB_BUFFER = 1
│ ├───DRM_CAP_VBLANK_HIGH_CRTC = 1
│ ├───DRM_CAP_DUMB_PREFERRED_DEPTH = 24
│ ├───DRM_CAP_DUMB_PREFER_SHADOW = 0
│ ├───DRM_CAP_PRIME = 3
│ ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│ ├───DRM_CAP_ASYNC_PAGE_FLIP = 1
│ ├───DRM_CAP_CURSOR_WIDTH = 64
│ ├───DRM_CAP_CURSOR_HEIGHT = 64
│ ├───DRM_CAP_ADDFB2_MODIFIERS = 1
│ ├───DRM_CAP_PAGE_FLIP_TARGET = 0
│ ├───DRM_CAP_CRTC_IN_VBLANK_EVENT = 1
│ ├───DRM_CAP_SYNCOBJ = 1
│ └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: platform brcm,bcm2711-vc5
│ └───Available nodes: primary
├───Framebuffer size
│ ├───Width: [0, 7680]
│ └───Height: [0, 7680]
├───Connectors
│ ├───Connector 0
│ │ ├───Object ID: 32
│ │ ├───Type: HDMI-A
│ │ ├───Status: disconnected
│ │ ├───Encoders: {0}
│ │ └───Properties
│ │ ├───"EDID" (immutable): blob = 0
│ │ ├───"DPMS": enum {On, Standby, Suspend, Off} = Off
│ │ ├───"link-status": enum {Good, Bad} = Good
│ │ ├───"non-desktop" (immutable): range [0, 1] = 0
│ │ ├───"TILE" (immutable): blob = 0
│ │ ├───"CRTC_ID" (atomic): object CRTC = 0
│ │ ├───"Colorspace": enum {Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater} = Default
│ │ ├───"left margin": range [0, 100] = 0
│ │ ├───"right margin": range [0, 100] = 0
│ │ ├───"top margin": range [0, 100] = 0
│ │ ├───"bottom margin": range [0, 100] = 0
│ │ ├───"max bpc": range [8, 12] = 8
│ │ └───"HDR_OUTPUT_METADATA": blob = 0
│ ├───Connector 1
│ │ ├───Object ID: 40
│ │ ├───Type: HDMI-A
│ │ ├───Status: connected
│ │ ├───Physical size: 2250x1190 mm
│ │ ├───Subpixel: unknown
│ │ ├───Encoders: {1}
│ │ ├───Modes
│ │ │ ├───[email protected] preferred driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver nhsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver nhsync nvsync 16:9
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ ├───[email protected] driver nhsync nvsync 16:9
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ ├───[email protected] driver nhsync nvsync 16:9
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ └───[email protected] driver nhsync nvsync
│ │ └───Properties
│ │ ├───"EDID" (immutable): blob = 223
│ │ ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│ │ ├───"link-status": enum {Good, Bad} = Good
│ │ ├───"non-desktop" (immutable): range [0, 1] = 0
│ │ ├───"TILE" (immutable): blob = 0
│ │ ├───"CRTC_ID" (atomic): object CRTC = 83
│ │ ├───"Colorspace": enum {Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater} = Default
│ │ ├───"left margin": range [0, 100] = 0
│ │ ├───"right margin": range [0, 100] = 0
│ │ ├───"top margin": range [0, 100] = 0
│ │ ├───"bottom margin": range [0, 100] = 0
│ │ ├───"max bpc": range [8, 12] = 8
│ │ └───"HDR_OUTPUT_METADATA": blob = 0
│ └───Connector 2
│ ├───Object ID: 48
│ ├───Type: writeback
│ ├───Status: connected
│ │ ├───Physical size: 2250x1190 mm
│ │ ├───Subpixel: unknown
│ │ ├───Encoders: {1}
│ │ ├───Modes
│ │ │ ├───[email protected] preferred driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 256:135
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9
│ │ │ ├───[email protected] driver phsync pvsync interlace 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver phsync pvsync 16:9
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-top-and-bottom
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-frame-packing
│ │ │ ├───[email protected] driver phsync pvsync 16:9 3d-side-by-side-half
│ │ │ ├───[email protected] driver nhsync nvsync
│ │ │ ├───[email protected] driver phsync pvsync
│ │ │ ├───[email protected] driver nhsync nvsync 16:9
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ ├───[email protected] driver nhsync nvsync 16:9
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ ├───[email protected] driver nhsync nvsync 16:9
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ ├───[email protected] driver nhsync nvsync 4:3
│ │ │ └───[email protected] driver nhsync nvsync
│ │ └───Properties
│ │ ├───"EDID" (immutable): blob = 223
│ │ ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│ │ ├───"link-status": enum {Good, Bad} = Good
│ │ ├───"non-desktop" (immutable): range [0, 1] = 0
│ │ ├───"TILE" (immutable): blob = 0
│ │ ├───"CRTC_ID" (atomic): object CRTC = 83
│ │ ├───"Colorspace": enum {Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater} = Default
│ │ ├───"left margin": range [0, 100] = 0
│ │ ├───"right margin": range [0, 100] = 0
│ │ ├───"top margin": range [0, 100] = 0
│ │ ├───"bottom margin": range [0, 100] = 0
│ │ ├───"max bpc": range [8, 12] = 8
│ │ └───**"HDR_OUTPUT_METADATA": blob = 0**

`
I can output HDR content on same kernel using KODI.

Not sure what the problem is. I realize this is a warning but can't figure why no output.
Thank you for your addon BTW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant