MCPcopy Create free account
hub / github.com/SolarLune/masterplan / SetRenderTarget

Function SetRenderTarget

utils.go:1126–1137  ·  view source on GitHub ↗

SetRenderTarget allows you to set the renderer's backing rendering target; setting it to nil reverts it to the previous target, if there was one. This was done because exporting projects was busted on first export in some projects (shutin.plan, for one) due to setting the render target to be nil dur

(target *sdl.Texture)

Source from the content-addressed store, hash-verified

1124// SetRenderTarget allows you to set the renderer's backing rendering target; setting it to nil reverts it to the previous target, if there was one. This was done
1125// because exporting projects was busted on first export in some projects (shutin.plan, for one) due to setting the render target to be nil during the export.
1126func SetRenderTarget(target *sdl.Texture) {
1127
1128 if target != nil {
1129 renderTargets = append(renderTargets, target)
1130 } else if len(renderTargets) > 1 {
1131 renderTargets = renderTargets[:len(renderTargets)-1]
1132 }
1133
1134 target = renderTargets[len(renderTargets)-1]
1135
1136 globals.Renderer.SetRenderTarget(target)
1137}
1138
1139func placeCardInStack(card *Card, centerIfNoSelection bool) {
1140

Callers 7

RecreateMethod · 0.85
handleScreenshotsFunction · 0.85
RecreateMethod · 0.85
RenderTextMethod · 0.85
CreateGridTextureMethod · 0.85
UpdateTextureMethod · 0.85
NewSubPageContentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected