For i As Integer = 0 To pixels.Count - 1 pixels(i) = &HFFFF Next tx2.SetData(Of Integer)(pixels)
Then I draw the texture in the Draw sub:
device.Clear(Color.Black) spriteBatch.Begin() spriteBatch.Draw(tx2, New Rectangle(100, 100, 200, 100), Color.White) spriteBatch.End()
A 200*100 block of color appears on the window. I set the pixels to hex FFFF so it should be blue, shouldn't it? But no, it's yellow. In fact every color I try comes out wrong except White. What is more, the color of the block is affected by the background. Black results in a fully saturated color, but if I clear the background to White, nothing is visible at all. Incidentally, if I don't clear the device the background color is BlueViolet, which seems like an odd choice for a default. Can anyone see what I am doing wrong?
This post has been edited by boops boops: 29 September 2011 - 03:42 AM