Hi, when I run this code using the html target everything works but when I compile it for the Window 8 target and run it using Visual Studio 2013 I get an Access Violation error. Visual studio shows the error occurs in the writepixel function. Am I doing something wrong?
Import Mojo
Class Emulator8 Extends App
Field Pixel:Image
Method OnCreate()
Pixel = CreateImage(10,15)
Local Pixels:Int[150]
For Local i:Int = 0 To 150-1
Pixels[i] = $FFFFFFFF
Next
Pixel.WritePixels(Pixels,0,0,10,15)
End Method
Method OnUpdate()
End Method
Method OnRender()
Cls
DrawImage Pixel,10,10
End Method
End Class
Function Main()
New Emulator8
End Function
|