mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 13:32:05 +08:00
CameraView: use unique_ptr for CameraView::program (#23096)
old-commit-hash: 8c6242888c0b955e16651b04927f0c44ab9e43ba
This commit is contained in:
@@ -113,7 +113,7 @@ CameraViewWidget::~CameraViewWidget() {
|
||||
void CameraViewWidget::initializeGL() {
|
||||
initializeOpenGLFunctions();
|
||||
|
||||
program = new QOpenGLShaderProgram(context());
|
||||
program = std::make_unique<QOpenGLShaderProgram>(context());
|
||||
bool ret = program->addShaderFromSourceCode(QOpenGLShader::Vertex, frame_vertex_shader);
|
||||
assert(ret);
|
||||
ret = program->addShaderFromSourceCode(QOpenGLShader::Fragment, frame_fragment_shader);
|
||||
|
||||
@@ -40,7 +40,7 @@ protected:
|
||||
GLuint frame_vao, frame_vbo, frame_ibo;
|
||||
mat4 frame_mat;
|
||||
std::unique_ptr<EGLImageTexture> texture[UI_BUF_COUNT];
|
||||
QOpenGLShaderProgram *program;
|
||||
std::unique_ptr<QOpenGLShaderProgram> program;
|
||||
QColor bg = QColor("#000000");
|
||||
|
||||
std::string stream_name;
|
||||
|
||||
Reference in New Issue
Block a user