Skip to content

V0 tomluchowski 14.x - #1

Merged
tomluchowski merged 6 commits into
tomluchowski:v0from
slapin:v0-tomluchowski-14.x
Aug 19, 2026
Merged

V0 tomluchowski 14.x#1
tomluchowski merged 6 commits into
tomluchowski:v0from
slapin:v0-tomluchowski-14.x

Conversation

@slapin

@slapin slapin commented Jun 13, 2026

Copy link
Copy Markdown

Update to Ogre v14.x

@slapin

slapin commented Jun 13, 2026

Copy link
Copy Markdown
Author

This PR is requirement for tomluchowski/OpenDungeonsPlus#15

@Upabjojr

Copy link
Copy Markdown

Heads-up from the OpenDungeonsPlus port work (tomluchowski/OpenDungeonsPlus#15), since Disabled the scissors test and implemented draw() functions in this PR touch the same area:

Nested auto rendering surfaces render nothing in the Ogre renderer. Any widget with AutoRenderingSurface=True (CEGUI renders its subtree into its own RenderingSurface, then composites) draws nothing at all — the widget is alive, visible and correctly positioned in the tree, but never reaches the screen, and CEGUI logs nothing because from its point of view everything worked.

Reproduced with the sliders in OpenDungeons' WindowSettings.layout: with the property on, only the label above each slider rendered; with it off, track and thumb render fine. OD side was fixed by dropping the property (it was the only user), so nothing in OD currently exercises the bug — but anything that turns AutoRenderingSurface on will hit the same silent nothing. FrameWindow defaults it to on in stock CEGUI, so it is easy to trip over.

Verified against this branch (v0-tomluchowski-14.x) built from source with Ogre 14.6 (2ebfcfd).

🤖 Generated with Claude Code

Widgets with AutoRenderingSurface=True rendered nothing: their content
was drawn into the texture target, but the quad that composites that
texture back onto the parent surface never reached a render queue.

The draw-mode merge gave RenderingWindow::draw and GUIContext::draw a
drawModeMask parameter but left the base virtuals argless, so the
derived functions hid RenderingSurface::draw()/drawContent() instead of
overriding them. Window::render's 'ctx.surface->draw()' therefore
dispatched to the base implementation, which renders the queues into
the texture and stops — the composite-quad logic only exists in
RenderingWindow::draw(drawModeMask). The doc comment on
RenderingSurface::draw already described the mask parameter the
signature was missing.

Give the base virtuals the drawModeMask parameter (defaulted to
DrawModeMaskAll, so external callers are unaffected), which turns the
derived functions into real overrides, and pass the mask through at the
call sites. This also reconnects GUIContext::drawContent — the mouse
cursor drawing — to virtual dispatch, which had been severed the same
way.

Verified against Ogre 14.6 with OpenDungeonsPlus: a slider with
AutoRenderingSurface=True went from rendering nothing to rendering
normally, and the stock (surfaceless) path is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Upabjojr

Copy link
Copy Markdown

Update: found the root cause and fixed it — slapin#1 (stacked on this PR's branch).

It's a hidden-virtual: the draw-mode merge gave RenderingWindow::draw and GUIContext::draw the uint32 drawModeMask parameter but left RenderingSurface::draw()/drawContent() argless, so the derived functions hid the base virtuals instead of overriding them. Window::render's ctx.surface->draw() therefore always ran the base implementation — content rendered into the texture target, but the composite-quad logic in RenderingWindow::draw(drawModeMask) was never reached. Details and verification in the PR.

🤖 Generated with Claude Code

slapin and others added 3 commits August 15, 2026 00:23
Make nested rendering surfaces (AutoRenderingSurface) composite again
Scissor testing was disabled wholesale in the Ogre geometry buffer
(d8c7290) because the scissor rectangle CEGUI left enabled after its
draw was clipping the render-to-texture work OpenDungeons does
afterwards, breaking its generated large textures. But with the test
disabled nothing clips at all: scrollable-pane content paints right
across the pane border, over the scrollbars and over whatever sits
under the pane, which is exactly what the OpenDungeons settings window
has been showing.

Turn the scissor test back on for batches that ask for clipping, and
add the state discipline that was actually missing: disable the
scissor test again once the buffer has drawn its batches, so no
enabled scissor rectangle ever outlives the CEGUI draw and later Ogre
render passes start from a clean state.

Verified with OpenDungeons against Ogre 14.6 (GL3+): the settings
window now clips its video options at the pane edge instead of
painting them over the Apply/Cancel buttons, and the in-game HUD,
drawn minimap and map editor (both render-to-texture users) are
unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014hrk8PiEUMgjYJnTxLF2PU
Ogre: clip geometry batches again, without leaking scissor state
@tomluchowski
tomluchowski merged commit 4fee4a6 into tomluchowski:v0 Aug 19, 2026
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

Successfully merging this pull request may close these issues.

3 participants