From 92886baaa3bf6f626ec7942eca0deb56d683752d Mon Sep 17 00:00:00 2001 From: Dario Date: Thu, 11 Jul 2024 23:53:26 -0300 Subject: [PATCH] Use string view on render params text. --- src/render/rt64_raster_shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/rt64_raster_shader.cpp b/src/render/rt64_raster_shader.cpp index 89962e9..0ae1093 100644 --- a/src/render/rt64_raster_shader.cpp +++ b/src/render/rt64_raster_shader.cpp @@ -198,7 +198,7 @@ namespace RT64 { // Generate vertex shader. std::stringstream vss; - vss << RenderParamsText; + vss << std::string_view(RenderParamsText, sizeof(RenderParamsText)); vss << "RenderParams getRenderParams() {" + renderParamsCode + "; return rp; }"; vss << "void RasterVS(const RenderParams, in float4, in float2, in float4, out float4, out float2, out float4, out float4);" @@ -224,7 +224,7 @@ namespace RT64 { // Generate pixel shader. std::stringstream pss; - pss << RenderParamsText; + pss << std::string_view(RenderParamsText, sizeof(RenderParamsText)); pss << "RenderParams getRenderParams() {" + renderParamsCode + "; return rp; }"; pss << "bool RasterPS(const RenderParams, bool, float4, float2, float4, float4, uint, out float4, out float4, out float);"