Reduce retained stroke preview helper surface
This commit is contained in:
@@ -5,11 +5,6 @@
|
||||
|
||||
namespace pp::panopainter {
|
||||
|
||||
struct LegacyStrokePreviewCopySize {
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
};
|
||||
|
||||
struct LegacyVrColorUniforms {
|
||||
glm::vec4 color { 1.0f };
|
||||
glm::mat4 mvp { 1.0f };
|
||||
@@ -40,24 +35,6 @@ inline void setup_legacy_vr_stroke_preview_shader(const LegacyVrStrokePreviewUni
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, uniforms.mvp);
|
||||
}
|
||||
|
||||
template <
|
||||
typename SetupCheckerboard,
|
||||
typename DrawPlane,
|
||||
typename BindBackgroundTexture,
|
||||
typename CopyFramebufferToTexture>
|
||||
void execute_legacy_stroke_preview_background_capture(
|
||||
SetupCheckerboard&& setup_checkerboard,
|
||||
DrawPlane&& draw_plane,
|
||||
BindBackgroundTexture&& bind_background_texture,
|
||||
CopyFramebufferToTexture&& copy_framebuffer_to_texture,
|
||||
LegacyStrokePreviewCopySize copy_size)
|
||||
{
|
||||
setup_checkerboard();
|
||||
draw_plane();
|
||||
bind_background_texture();
|
||||
copy_framebuffer_to_texture(0, 0, 0, 0, copy_size.width, copy_size.height);
|
||||
}
|
||||
|
||||
template <
|
||||
typename SetupCompositeShader,
|
||||
typename BindCompositeSamplers,
|
||||
@@ -100,14 +77,4 @@ void execute_legacy_stroke_preview_live_pass(
|
||||
copy_preview_result();
|
||||
}
|
||||
|
||||
template <typename BindPreviewTexture, typename CopyFramebufferToTexture>
|
||||
void copy_legacy_stroke_preview_texture(
|
||||
BindPreviewTexture&& bind_preview_texture,
|
||||
CopyFramebufferToTexture&& copy_framebuffer_to_texture,
|
||||
LegacyStrokePreviewCopySize copy_size)
|
||||
{
|
||||
bind_preview_texture();
|
||||
copy_framebuffer_to_texture(0, 0, 0, 0, copy_size.width, copy_size.height);
|
||||
}
|
||||
|
||||
} // namespace pp::panopainter
|
||||
|
||||
Reference in New Issue
Block a user