@@ -123,8 +123,6 @@ public:
Span<const std::string> shaderEnv);
int linkProgram(GLuint &programId, GLuint fragmentshaderId, GLuint vertexshaderId);
void dumpShaderSource(GLuint shaderId);
- void useProgram(GLuint programId);
- void deleteProgram(GLuint programId);
void syncOutput();
void flushOutput();
@@ -464,34 +464,6 @@ void eGL::makeCurrent()
}
}
-/**
- * \brief Activate a shader program for rendering
- * \param[in] programId OpenGL program object ID
- *
- * Sets the specified program as the current rendering program. All
- * subsequent draw calls will use this program's shaders.
- */
-void eGL::useProgram(GLuint programId)
-{
- ASSERT(tid_ == Thread::currentId());
-
- glUseProgram(programId);
-}
-
-/**
- * \brief Delete a shader program
- * \param[in] programId OpenGL program object ID
- *
- * Deletes a shader program and frees associated resources. The program
- * must not be currently in use.
- */
-void eGL::deleteProgram(GLuint programId)
-{
- ASSERT(tid_ == Thread::currentId());
-
- glDeleteProgram(programId);
-}
-
/**
* \brief Add a preprocessor definition to shader environment
* \param[in,out] shaderEnv Vector of shader environment strings
@@ -261,7 +261,7 @@ int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputForm
egl_.dumpShaderSource(fragmentShaderId_);
/* Ensure we set the programId_ */
- egl_.useProgram(programId_);
+ glUseProgram(programId_);
err = glGetError();
if (err != GL_NO_ERROR) {
LOG(Debayer, Error) << "Use program error " << err;
`eGL::deleteProgram()` is currently unused, and the only user of `eGL::useProgram()` is `debayer_egl.cpp`, which is already using numerous gl calls directly without going through the `eGL` type. So remove these trivial wrappers. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- include/libcamera/internal/egl.h | 2 -- src/libcamera/egl.cpp | 28 ---------------------- src/libcamera/software_isp/debayer_egl.cpp | 2 +- 3 files changed, 1 insertion(+), 31 deletions(-)