You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 04d2e08
Browse filesBrowse the repository at this point in the historyBrowse files
* Android: sync NDK / API / build-tools with apothecary
Match apothecary's Android CI (build-android.yml, android_configure.sh)
so the core, the template and the prebuilt libs use the same toolchain:
- NDK r29 29.0.14206865 (template + core gradle ndkVersion, cmake.sh,
of.yml env); previously 28.2 in gradle, "27" / newest folder in
cmake.sh and the runner's latest NDK in CI
- min API 25 (template was 24, core gradle and cmake.sh were 34, so the
core wouldn't load below Android 14)
- build-tools 37.0.0 (was 35.0.0)
- cmake.sh: use the pinned $NDK under the SDK (or ANDROID_NDK_ROOT /
ANDROID_NDK_HOME) instead of silently taking the newest ndk folder,
which also picked up half-installed NDKs; ANDROID_PLATFORM follows
ANDROID_API; honour ANDROID_HOME / ANDROID_SDK_ROOT on macOS
- android.toolchain.cmake: NDKs ship only darwin-x86_64 (universal) /
linux-x86_64, so fall back to the x86_64 prebuilt when the arm64 host
folder doesn't exist (failed on Apple silicon before)
* Enable new functionality of GL ES 2/3/3.1 via ifdefs
* Android Studio 1.3/1.4 compatibility, and a fix.
* Get an OpenGL ES 3.1 context if possible.
* Fixes.
* Misc fixes
* Minor fixes when using GLES1.
* More consistent API.
* Update EGL window class to use new GLES settings class.
TODO: iOS
* Fixed problem with broken textures.
* Smaller fixes
* .
* Remove old android changes
* ofImageType
* ofGLRenderer
* ofGLUtils fix
* Update ofAppEGLWindow.cpp
* OpenGLES 3 changes for ofFbo and ofGLProgrammableRenderer
* Refactor GLES version variables in ofGLESWindowSettings
* OpenGLES 3.0 and Emscripten
* ofBufferObject OpenGLES 3 fixes
* ofVbo and ofFbo OpenGLES 3 fixes
* ofWindowSettings fix for scope
* OpenGLES 3 fixes for ofGLProgrammableRenderer and BaseTypes
* OpenGLES 3
* OpenGLES fixes
* OpenGLES shader defaults fixed
* ofMaterial fixes
* Android Window
* ofAppAndroidWindow Fix
* ofAppAndroidWindow
* Android Window
* ofGLUtils Android Fix
* OpenGLES 3.0
# Conflicts:
# libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp
* ofWindowSettings with hidpi c++ default cpy ctor
* OpenGLES defines with targetable undefs in ofConstants
* ofMesh Mode to Triangles on init
* ofShader Fix
* OpenGL fixes
* Update Emscripten to 6.0.6
* Fix client-side mesh indices on OpenGL ES 2
* Restore line topology for ofMesh axis
* Guard desktop buffer invalidation on OpenGL ES
* Android View null fix
* Add Android GLES lifecycle hardware stress test
* Make GL smoke tests safe on ES1, ES2, ES3 and desktop OpenGL
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.
* Fix PR compile failures across all CI platforms
- 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
* Fix GLES regressions found testing ES 1.1 / 2.0 / 3.0 on iOS
- 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.
* ofFbo: only accept GL_OES_framebuffer_object for ES 1.1 on iOS
On Android an ES 1 context has no GLES2 entry points, so
glGenFramebuffers resolved to a null function pointer and ofFbo::allocate
crashed (SIGSEGV, pc 0) on ES 1.1 contexts. iOS shares one GL library
across ES versions, so the OES path stays enabled there; Android ES 1.1
now reports FBOs as unsupported instead of crashing.
* Fix GL_INVALID_ENUM on ES 1 / ES 2 contexts
Found with a glGetError trace after every setup/draw step on the
Android emulator (ES 1.1) and iOS Simulator (ES 1.1 / 2.0):
- ofGLRenderer: loadViewMatrix / enableLighting / setLightPosition /
setLightSpotDirection queried glGetIntegerv(GL_MATRIX_MODE), which some
ES 1.1 drivers reject, then restored glMatrixMode() from the
uninitialised result (two errors per setupScreen, every frame). Restore
the matrix mode oF already tracks in matrixStack instead.
- ofTexture::loadData: on ES 1.1 (fixed function) the Android emulator
rejects glTexSubImage2D with GL_LUMINANCE / GL_LUMINANCE_ALPHA /
GL_ALPHA and leaves the texture empty, so ofDrawBitmapString drew
nothing. Full-size updates re-specify the level with glTexImage2D.
- ofFbo::checkGLSupport: GL_MAX_COLOR_ATTACHMENTS / GL_MAX_DRAW_BUFFERS /
GL_MAX_SAMPLES are ES 3 queries; on ES 1 / ES 2 contexts built with
ES 3 headers (iOS) use 1 / 1 / 0 instead of querying.
Now zero GL errors on macOS GL 2.1 / 3.2, iOS ES 1.1 / 2.0 / 3.0 and
Android ES 1.1 / 2.0 / 3.0 / 3.1.
* Android ES 1.1: OES framebuffer entry points, disabled on the emulator
On Android an ES 1.1 context provides FBOs through GL_OES_framebuffer_object
in libGLESv1_CM (glGenFramebuffersOES, ...); the core names resolve to
libGLESv2 and are null in an ES 1 context. Add ofGLFramebuffer.h with
ofGLGenFramebuffers / ofGLBindFramebuffer / ... wrappers that call the OES
entry points on Android fixed-function contexts and the core names
everywhere else (enum values are identical), and use them in ofFbo,
ofGLRenderer and ofTexture (generateMipmap).
The Android emulator's ES 1 driver (goldfish GLESv1_enc) advertises the
extension but can't be used: glDeleteFramebuffersOES crashes
(GLClientState::removeFramebuffers locks renderbuffer state that is only
set up for ES 2+) and rebinding framebuffer 0 doesn't return drawing to
the window. ofIsAndroidEmulatorGLES1() detects it from GL_RENDERER;
ofGLRenderer::setup() logs a startup warning that FBOs won't work on the
emulator with ES 1.1 but will on devices, and ofFbo reports them as
unsupported there.
---------
Co-authored-by: Marcel Ruegenberg <ruegenbe@in.tum.de>
0 commit comments