Changeset 88
- Timestamp:
- 08/02/08 03:55:49 (2 years ago)
- Files:
-
- 1 modified
-
yuvplayer/win/yuvplayer/OpenGLView.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
yuvplayer/win/yuvplayer/OpenGLView.cpp
r77 r88 39 39 { 40 40 CDocument* pDoc = GetDocument(); 41 HDC dc = ::GetDC(m_hWnd); 41 42 42 43 // TODO: add draw code here … … 59 60 glEnd(); 60 61 } 61 SwapBuffers( ::GetDC(m_hWnd) ); 62 SwapBuffers( dc ); 63 64 ::ReleaseDC( m_hWnd, dc ); 62 65 63 66 } … … 182 185 void COpenGLView::LoadTexture(unsigned char* rgba) 183 186 { 184 loaded = TRUE;185 187 186 188 glBindTexture(GL_TEXTURE_2D, texture ); 187 glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, t_width, t_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba ); 188 189 if( loaded ) 190 glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, t_width, t_height, GL_RGBA, GL_UNSIGNED_BYTE, rgba ); 191 else{ 192 glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, t_width, t_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba ); 193 loaded = TRUE; 194 } 189 195 Invalidate(NULL); 190 196 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)