Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned char* buffer = (unsigned char*) malloc(4 * iHeight * iWidth * sizeof(unsigned char));
- for(int i = 0; i < 4 * iHeight * iWidth * sizeof(unsigned char); i+=4)
- {
- buffer[i] = 0;
- buffer[i+1] = 0;
- buffer[i+2] = 255;
- buffer[i+3] = 255;
- }
- //surface()->DrawSetTexture( m_nTextureID );
- surface()->DrawSetColor( Color( 255, 255, 255, GetAlpha() ) );
- surface()->DrawSetTextureRGBA(m_nTextureID, buffer, iWidth, iHeight, false, true);
- surface()->DrawTexturedRect(0,0, iWidth, iHeight);
- free(buffer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement