Skip to content

GL CachedConverter : Add convert() overload specifying result type - #1582

Open
johnhaddon wants to merge 1 commit into
ImageEngine:RB-10.7from
johnhaddon:glCachedConverterResultType
Open

johnhaddon wants to merge 1 commit into
ImageEngine:RB-10.7from
johnhaddon:glCachedConverterResultType

Conversation

@johnhaddon

@johnhaddon johnhaddon commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

This allows the result type to be chosen when several ToGLConverters have been registered against the same source type. I think the "different result types create different cache entries" gotcha is reasonable, since we've never needed to specify result type at all to date. I only have one niche use case in mind (in Gaffer's GL renderer) so the only clients to pass result types will be ones that need a different result than the default.

@danieldresser, the intention here is to make the special pointinstancer-to-partitioned-arrays converter we talked about yesterday (see GafferHQ/gaffer#7294 for the implementation) a bit more palatable. By calling convert( instancer, RenderableTypeId ) you can get the old PointsPrimitive conversion, and by calling conver( instancer, ObjectVector ) you can get the new funky one.

This allows the result type to be chosen when several ToGLConverters have been registered against the same source type. I think the "different result types create different cache entries" gotcha is reasonable, since we've never needed to specify result type at all to date. I only have one niche use case in mind (in Gaffer's GL renderer) so the only client to pass result types will be ones that _need_ a different result than the default.
@johnhaddon johnhaddon self-assigned this Nov 27, 2026
@johnhaddon
johnhaddon changed the base branch from main to RB-10.7 November 27, 2026 15:36
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.

1 participant