revert unused change

This commit is contained in:
Glenn Maynard
2003-03-23 23:06:49 +00:00
parent 050e9bbaa3
commit 8f74d7987b
2 changed files with 8 additions and 17 deletions
@@ -129,7 +129,7 @@ void MovieTexture_DShow::Update(float fDeltaTime)
return; return;
/* Just in case we were invalidated: */ /* Just in case we were invalidated: */
CreateTextures(); CreateTexture();
glBindTexture( GL_TEXTURE_2D, m_uGLTextureID ); glBindTexture( GL_TEXTURE_2D, m_uGLTextureID );
@@ -246,7 +246,7 @@ void MovieTexture_DShow::Create()
/* We've set up the movie, so we know the dimensions we need. Set /* We've set up the movie, so we know the dimensions we need. Set
* up the texture. */ * up the texture. */
CreateTextures(); CreateTexture();
// Start the graph running // Start the graph running
if( !PlayMovie() ) if( !PlayMovie() )
@@ -276,19 +276,13 @@ void MovieTexture_DShow::NewData(const char *data)
} }
void MovieTexture_DShow::CreateTexture()
void MovieTexture_DShow::CreateTextures()
{ {
if(!m_uGLTextureID) if(m_uGLTextureID)
m_uGLTextureID = CreateTexture(); return;
}
unsigned MovieTexture_DShow::CreateTexture() glGenTextures(1, &m_uGLTextureID);
{ glBindTexture( GL_TEXTURE_2D, m_uGLTextureID );
unsigned TextureID;
glGenTextures(1, &TextureID);
glBindTexture( GL_TEXTURE_2D, TextureID );
/* Initialize the texture and set it to black. */ /* Initialize the texture and set it to black. */
string buf(m_iTextureWidth*m_iTextureHeight*3, 0); string buf(m_iTextureWidth*m_iTextureHeight*3, 0);
@@ -310,8 +304,6 @@ unsigned MovieTexture_DShow::CreateTexture()
glTexImage2D(GL_TEXTURE_2D, 0, internalformat, glTexImage2D(GL_TEXTURE_2D, 0, internalformat,
m_iTextureWidth, m_iTextureHeight, 0, GL_BGR, GL_UNSIGNED_BYTE, buf.data()); m_iTextureWidth, m_iTextureHeight, 0, GL_BGR, GL_UNSIGNED_BYTE, buf.data());
return TextureID;
} }
bool MovieTexture_DShow::PlayMovie() bool MovieTexture_DShow::PlayMovie()
@@ -68,8 +68,7 @@ private:
void Create(); void Create();
unsigned CreateTexture(); void CreateTexture();
void CreateTextures();
bool PlayMovie(); bool PlayMovie();
void SkipUpdates(); void SkipUpdates();
void StopSkippingUpdates(); void StopSkippingUpdates();