Skip to content

Commit 46e720a

Browse files
committed
Removed unused projectm_opengl_init_render_to_texture() API function.
1 parent e6b493a commit 46e720a

File tree

6 files changed

+0
-44
lines changed

6 files changed

+0
-44
lines changed

src/api/include/libprojectM/render_opengl.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ extern "C" {
4141
*/
4242
PROJECTM_EXPORT void projectm_opengl_render_frame(projectm_handle instance);
4343

44-
/**
45-
* @brief Enables render-to-texture.
46-
*
47-
* Useful if projectM output will be part of a more complex OpenGL scene. The size of the texture is determined by the
48-
* given viewport size and the dimensions should be a power of 2.
49-
*
50-
* @param instance The projectM instance handle.
51-
* @return A GLuint value with the texture ID projectM will render to.
52-
*/
53-
PROJECTM_EXPORT unsigned int projectm_opengl_init_render_to_texture(projectm_handle instance);
54-
5544
#ifdef __cplusplus
5645
} // extern "C"
5746
#endif

src/libprojectM/ProjectM.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ void ProjectM::LoadPresetData(std::istream& presetData, bool smoothTransition)
9999
}
100100
}
101101

102-
auto ProjectM::InitRenderToTexture() -> unsigned
103-
{
104-
return m_renderer->initRenderToTexture();
105-
}
106-
107102
void ProjectM::SetTexturePaths(std::vector<std::string> texturePaths)
108103
{
109104
m_textureSearchPaths = std::move(texturePaths);

src/libprojectM/ProjectM.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ PROJECTM_EXPORT class ProjectM
125125

126126
void RenderFrame();
127127

128-
auto InitRenderToTexture() -> unsigned;
129-
130128
void SetBeatSensitivity(float sensitivity);
131129

132130
auto GetBeatSensitivity() const -> float;

src/libprojectM/ProjectMCWrapper.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,6 @@ void projectm_opengl_render_frame(projectm_handle instance)
166166
projectMInstance->RenderFrame();
167167
}
168168

169-
unsigned int projectm_opengl_init_render_to_texture(projectm_handle instance)
170-
{
171-
auto projectMInstance = handle_to_instance(instance);
172-
return projectMInstance->InitRenderToTexture();
173-
}
174-
175169
void projectm_set_beat_sensitivity(projectm_handle instance, float sensitivity)
176170
{
177171
auto projectMInstance = handle_to_instance(instance);

src/libprojectM/Renderer/Renderer.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -408,25 +408,6 @@ void Renderer::reset(int viewportWidth, int viewportHeight)
408408
glClear(GL_COLOR_BUFFER_BIT);
409409
}
410410

411-
GLuint Renderer::initRenderToTexture()
412-
{
413-
if (textureRenderToTexture == 0)
414-
{
415-
glGenTextures(1, &textureRenderToTexture);
416-
glBindTexture(GL_TEXTURE_2D, textureRenderToTexture);
417-
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, m_textureSizeX, m_textureSizeY, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
418-
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
419-
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
420-
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
421-
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
422-
glBindTexture(GL_TEXTURE_2D, 0);
423-
}
424-
425-
return textureRenderToTexture;
426-
}
427-
428-
float title_y;
429-
430411
bool Renderer::timeCheck(const milliseconds currentTime, const milliseconds lastTime, const double difference) {
431412
milliseconds ms = std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - lastTime);
432413
double diff = ms.count();

src/libprojectM/Renderer/Renderer.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ class Renderer
7272
void SetTextureSearchPaths(std::vector<std::string>& textureSearchPaths);
7373
void SetPerPixelMeshSize(int meshX, int meshY);
7474
void reset(int viewportWidth, int viewportHeight);
75-
GLuint initRenderToTexture();
7675

7776
bool timeCheck(const milliseconds currentTime, const milliseconds lastTime, const double difference);
7877

0 commit comments

Comments
 (0)