Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1.         unsigned char* buffer = (unsigned char*) malloc(4 * iHeight * iWidth * sizeof(unsigned char));
  2.         for(int i = 0; i < 4 * iHeight * iWidth * sizeof(unsigned char); i+=4)
  3.         {
  4.             buffer[i] = 0;
  5.             buffer[i+1] = 0;
  6.             buffer[i+2] = 255;
  7.             buffer[i+3] = 255;
  8.         }
  9.        
  10.         //surface()->DrawSetTexture( m_nTextureID );
  11.         surface()->DrawSetColor( Color( 255, 255, 255, GetAlpha() ) );
  12.         surface()->DrawSetTextureRGBA(m_nTextureID, buffer, iWidth, iHeight, false, true);
  13.         surface()->DrawTexturedRect(0,0, iWidth, iHeight);
  14.         free(buffer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement