Skip to content

testshade: use renderer's error handler, convert raw pointers to unique_ptr#2082

Open
lgritz wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
lgritz:lg-testshade-errhandler
Open

testshade: use renderer's error handler, convert raw pointers to unique_ptr#2082
lgritz wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
lgritz:lg-testshade-errhandler

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Feb 27, 2026

Replace testshade's standalone global ErrorHandler with the renderer's own errhandler() so that error output is properly routed through the renderer rather than a disconnected handler. This ensures errors during shading are visible in the same context as the renderer that owns the ShadingSystem.

Also replace some raw pointers with new/delete with std::unique_ptr.

…ue_ptr

Replace the standalone global ErrorHandler with the renderer's own
errhandler() so that error output is properly routed through the
renderer rather than a disconnected handler. This ensures errors during
shading are visible in the same context as the renderer that owns the
ShadingSystem.

Also replace some raw pointers with `new`/`delete` with
std::unique_ptr.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Copy link
Contributor

@fpsunflower fpsunflower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz force-pushed the lg-testshade-errhandler branch from 6360777 to 2983e48 Compare February 28, 2026 02:49
@lgritz
Copy link
Collaborator Author

lgritz commented Feb 28, 2026

After Chris's review, I did notice a test failure -- some things were printed in Debug builds but that the split ErrorHandler situation was causing not to show up in the output. After this patch fixed that situation, those extra messages appeared! So I pushed a very minor update to address this and match the old test output.

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.

2 participants