OpenGLES 3.1 - #8533
OpenGLES 3.1#8533danoli3 wants to merge 47 commits into
Conversation
|
Smoke tests on GL failing will investigate |
8d27b58 to
b15ce0c
Compare
ebd5b9c to
7ea5268
Compare
|
This is almost complete just to do physical device tests |
ae83f44 to
bae1ec5
Compare
# Conflicts: # libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp
The shared test always called drawInstanced, which is not in ES1/ES2 or GL 2.1, and the programmable GLES path never instanced even on ES3 (gated on 3.1, and ofVboMesh ignored primCount). Skip instancing unless the live context is GL 3.1+ / ES 3.0+, match VBO index type to ofIndexType on GLES, report WebGL2 as GLES 3, and give the Android lifecycle test ES2 shaders / an ES1 no-shader path.
- ofGraphics/ofGLRenderer: revert background-gradient relocation that used ofVboMesh without its header and dropped the renderer's drawBackgroundGradient definition (broke every build + link) - ofGraphics: revert illegal static_cast to ofBaseGLRenderer in ofEnable/DisablePointSprites, virtual dispatch already covers it - ofAppEGLWindow: rename glesVersion member to glesVersionMajor to match ofAppEGLWindow.cpp usage - ofAppAndroidWindow: drop dead overwrite of glesVersion from legacy field so settings getters take effect, init glesVersionMinor - ofxEmscriptenURLFileLoader: restore lowercase __EMSCRIPTEN_major__/ __EMSCRIPTEN_minor__ macros (uppercase form is never defined) - ofTexture: restore GL_TEXTURE_CUBE_MAP mipmap case on desktop, align bindAsImage cpp guard with header - ofConstants: make GLES3 includes live (unconditional on Linux ARM and Emscripten, API-gated on Android) so TARGET_OPENGLES_3 auto-detection actually works
- ofFbo::readToPixels: GLES has no glGetTexImage (ES 1/2/3), so the ES 3 branch returned empty pixels; read the bound FBO with glReadPixels on all GLES again, selecting the attachment with glReadBuffer on ES 3 contexts. - ofGLProgrammableRenderer::draw(ofMesh) on ES: line modes use the lines shader, which needs the line bundle; raw client arrays made GL_LINE_STRIP / GL_LINE_LOOP (circle and polyline outlines) collapse to nothing. Build the bundle like desktop (ofSetLineWidth works on ES again). - ofFbo::allocate(w, h, format): keep colour-only on ES; the combined depth+stencil renderbuffer was FRAMEBUFFER_INCOMPLETE_ATTACHMENT. - TARGET_OPENGLES_3 only means the ES 3 headers exist, which is true on iOS even for ES 1 / ES 2 contexts. Add ofIsGLES3Context() (headers + live context >= 3) and use it for sized RGBA8 / RGB8 internal formats (ES 2 rejects them with GL_INVALID_OPERATION); ofFbo::checkGLSupport accepts GL_OES_framebuffer_object for ES 1.1 contexts.
Rebased on master + GLES fixes + GL / GLES test matrixRebased onto current New commit
Test matrixTest app = Checks: context (renderer set up at the requested version) · texture upload → draw into FBO → readback colour · shader compile/link/draw → readback (programmable only) · smoke (indexed
macOS tops out at GL 4.1 (any 3.2+ core request returns 4.1); GL 4.2+ needs Linux/Windows. Android emulator (ES 1.1 / 2.0 / 3.0 / 3.1) and emscripten (WebGL 1 / 2) runs to follow. Also found: with older downloaded libs, ScreenshotsmacOS — GL 2.1 (fixed function) |
|
This is looking great! Getting Qwen 3.8 local ai to test and analyse everything and doing test qa passes |
Emscripten results (WebGL 1 / WebGL 2)Same test app (graphicsExample scene + Run in headless Chrome on the real GPU (
Note: Running total: macOS GL 2.1 / 3.2 / 3.3 / 4.0 / 4.1, iOS Simulator ES 1.1 / 2.0 / 3.0, emscripten WebGL 1 / 2 — all PASS. Android emulator (ES 1.1 / 2.0 / 3.0 / 3.1) next. Screenshots |










OpenGLES 3.1
Updated PR to #8512
Merged in @mruegenberg changes and patched them into the core.
Support for openGLES 3.0
Support for openGLES 3.1
Fixed up Emscripten defines to allow for ES3
This feature allows for emulation more easily in Dawn / Emscripten / Metal / Vulkan for Mobile platforms for ES
Merged with Tess2 fixes. Auto Short / Int determination (less defines)
TODO: