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

Fix get current surface for Android if use SDL #3236

Merged
merged 5 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions OgreMain/include/OgreRenderSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ namespace Ogre
| externalWlDisplay | wl_display address as an integer | 0 (none) | Wayland display connection | Linux |
| externalWlSurface | wl_surface address as an integer | 0 (none) | Wayland onscreen surface | Linux |
| currentGLContext | true, false | false | Use an externally created GL context. (Must be current) | OpenGL |
| currentEGLSurface | true, false | false | Use an externally created EGL surface. | Android |
| minColourBufferSize | Positive integer (usually 16, 32) | 16 | Min total colour buffer size. See EGL_BUFFER_SIZE | OpenGL |
| windowProc | WNDPROC | DefWindowProc | function that processes window messages | Win 32 |
| colourDepth | 16, 32 | Desktop depth | Colour depth of the resulting rendering window; only applies if fullScreen | Win32 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ namespace Ogre {
"EGLWindow::create");
}

if((opt = miscParams->find("currentEGLSurface")) != end &&
StringConverter::parseBool(opt->second))
{
mEglSurface = eglGetCurrentSurface(EGL_DRAW);
}

mEglDisplay = eglGetCurrentDisplay();
}

Expand Down
Loading