Kaydet (Commit) 10e8194d authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

remove unused functions

Change-Id: I5e176c705cc373333831e4b833386ed707418d2e
üst 6d6ba15f
...@@ -588,95 +588,6 @@ void OpenGLRender::renderToBitmap() ...@@ -588,95 +588,6 @@ void OpenGLRender::renderToBitmap()
glFlush(); glFlush();
} }
int OpenGLRender::RenderTexture2FBO(GLuint TexID)
{
CHECK_GL_ERROR();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDepthMask(GL_FALSE);
glUseProgram(m_RenderProID);
glEnableVertexAttribArray(m_RenderVertexID);
glBindBuffer(GL_ARRAY_BUFFER, m_RenderVertexBuf);
glVertexAttribPointer(
m_RenderVertexID, // attribute. No particular reason for 0, but must match the layout in the shader.
3, // size
GL_FLOAT, // type
GL_FALSE, // normalized?
0, // stride
(void*)0 // array buffer offset
);
glEnableVertexAttribArray(m_RenderTexCoordID);
glBindBuffer(GL_ARRAY_BUFFER, m_RenderTexCoordBuf);
glVertexAttribPointer(
m_RenderTexCoordID, // attribute. No particular reason for 0, but must match the layout in the shader.
2, // size
GL_FLOAT, // type
GL_FALSE, // normalized?
0, // stride
(void*)0 // array buffer offset
);
glBindTexture(GL_TEXTURE_2D, TexID);
glUniform1i(m_RenderTexID, 0);
//TODO: moggi: get rid fo GL_QUADS
glDrawArrays(GL_QUADS, 0, 4);
glDisableVertexAttribArray(m_RenderTexCoordID);
glDisableVertexAttribArray(m_RenderVertexID);
glBindTexture(GL_TEXTURE_2D, 0);
glUseProgram(0);
glDepthMask(GL_TRUE);
CHECK_GL_ERROR();
m_fZStep += Z_STEP;
return 0;
}
int OpenGLRender::RenderTexture(GLuint TexID)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glUseProgram(m_RenderProID);
glEnableVertexAttribArray(m_RenderVertexID);
glBindBuffer(GL_ARRAY_BUFFER, m_RenderVertexBuf);
glVertexAttribPointer(
m_RenderVertexID, // attribute. No particular reason for 0, but must match the layout in the shader.
3, // size
GL_FLOAT, // type
GL_FALSE, // normalized?
0, // stride
(void*)0 // array buffer offset
);
glEnableVertexAttribArray(m_RenderTexCoordID);
glBindBuffer(GL_ARRAY_BUFFER, m_RenderTexCoordBuf);
glVertexAttribPointer(
m_RenderTexCoordID, // attribute. No particular reason for 0, but must match the layout in the shader.
2, // size
GL_FLOAT, // type
GL_FALSE, // normalized?
0, // stride
(void*)0 // array buffer offset
);
glBindTexture(GL_TEXTURE_2D, TexID);
glUniform1i(m_RenderTexID, 0);
//TODO: moggi: get rid fo GL_QUADS
glDrawArrays(GL_QUADS, 0, 4);
glDisableVertexAttribArray(m_RenderTexCoordID);
glDisableVertexAttribArray(m_RenderVertexID);
glBindTexture(GL_TEXTURE_2D, 0);
glUseProgram(0);
#if defined( WNT )
SwapBuffers(glWin.hDC);
#elif defined( MACOSX )
#elif defined( UNX )
glXSwapBuffers(glWin.dpy, glWin.win);
#endif
glFlush();
m_fZStep += Z_STEP;
return 0;
}
int OpenGLRender::CreateTextureObj(int width, int height) int OpenGLRender::CreateTextureObj(int width, int height)
{ {
glGenTextures(1, &m_TextureObj); glGenTextures(1, &m_TextureObj);
......
...@@ -191,8 +191,6 @@ private: ...@@ -191,8 +191,6 @@ private:
int CreateTextureObj(int width, int height); int CreateTextureObj(int width, int height);
int CreateRenderObj(int width, int height); int CreateRenderObj(int width, int height);
int CreateFrameBufferObj(); int CreateFrameBufferObj();
int RenderTexture(GLuint TexID);
int RenderTexture2FBO(GLuint TexID);
#if defined( _WIN32 ) #if defined( _WIN32 )
int InitTempWindow(HWND *hwnd, int width, int height, PIXELFORMATDESCRIPTOR inPfd); int InitTempWindow(HWND *hwnd, int width, int height, PIXELFORMATDESCRIPTOR inPfd);
bool WGLisExtensionSupported(const char *extension); bool WGLisExtensionSupported(const char *extension);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment