summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder_gl.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-09-16 16:23:27 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-10-04 22:51:45 +0300
commit440028d6c9a2e98234a71fee79c55791e1d2af2f (patch)
tree759442f16b82d06e81971a3f4df2aeabbe923c0e /src/qcam/viewfinder_gl.cpp
parent079afd17e7d8775efc809ec9ca4c6a3fcb4d2763 (diff)
qcam: viewfinder_gl: Rename shader files
Rename shader files to prepare for packed YUYV support: - The NV prefix isn't a good match for packed (or for 3-planar) formats, replace it with a YUV prefix - Use .frag and .vert extensions to differentiate between fragment and vertex shaders Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/qcam/viewfinder_gl.cpp')
-rw-r--r--src/qcam/viewfinder_gl.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp
index 76e4a900..0fa06a29 100644
--- a/src/qcam/viewfinder_gl.cpp
+++ b/src/qcam/viewfinder_gl.cpp
@@ -101,42 +101,42 @@ bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format)
case libcamera::formats::NV12:
horzSubSample_ = 2;
vertSubSample_ = 2;
- fragmentShaderSrc_ = ":NV_2_planes_UV_f.glsl";
+ fragmentShaderSrc_ = ":YUV_2_planes_UV.frag";
break;
case libcamera::formats::NV21:
horzSubSample_ = 2;
vertSubSample_ = 2;
- fragmentShaderSrc_ = ":NV_2_planes_VU_f.glsl";
+ fragmentShaderSrc_ = ":YUV_2_planes_VU.frag";
break;
case libcamera::formats::NV16:
horzSubSample_ = 2;
vertSubSample_ = 1;
- fragmentShaderSrc_ = ":NV_2_planes_UV_f.glsl";
+ fragmentShaderSrc_ = ":YUV_2_planes_UV.frag";
break;
case libcamera::formats::NV61:
horzSubSample_ = 2;
vertSubSample_ = 1;
- fragmentShaderSrc_ = ":NV_2_planes_VU_f.glsl";
+ fragmentShaderSrc_ = ":YUV_2_planes_VU.frag";
break;
case libcamera::formats::NV24:
horzSubSample_ = 1;
vertSubSample_ = 1;
- fragmentShaderSrc_ = ":NV_2_planes_UV_f.glsl";
+ fragmentShaderSrc_ = ":YUV_2_planes_UV.frag";
break;
case libcamera::formats::NV42:
horzSubSample_ = 1;
vertSubSample_ = 1;
- fragmentShaderSrc_ = ":NV_2_planes_VU_f.glsl";
+ fragmentShaderSrc_ = ":YUV_2_planes_VU.frag";
break;
case libcamera::formats::YUV420:
horzSubSample_ = 2;
vertSubSample_ = 2;
- fragmentShaderSrc_ = ":NV_3_planes_f.glsl";
+ fragmentShaderSrc_ = ":YUV_3_planes.frag";
break;
case libcamera::formats::YVU420:
horzSubSample_ = 2;
vertSubSample_ = 2;
- fragmentShaderSrc_ = ":NV_3_planes_f.glsl";
+ fragmentShaderSrc_ = ":YUV_3_planes.frag";
break;
default:
ret = false;
@@ -154,7 +154,7 @@ bool ViewFinderGL::createVertexShader()
vertexShader_ = new QOpenGLShader(QOpenGLShader::Vertex, this);
/* Compile the vertex shader */
- if (!vertexShader_->compileSourceFile(":NV_vertex_shader.glsl")) {
+ if (!vertexShader_->compileSourceFile(":YUV.vert")) {
qWarning() << "[ViewFinderGL]:" << vertexShader_->log();
return false;
}