-
Notifications
You must be signed in to change notification settings - Fork 5
How to use drawImage? #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@noughtmare I'd try using the |
@dmjio |
@noughtmare I think the type needs to be |
@dmjio If I use
|
@noughtmare there's been some fixes (related to double free'ing of pointers) that are now in HEAD, am working on the Graphics module now with success. As I inspect more with what the C++ is doing before it sends it to the C, we'll have better working visualization code, and examples ! main :: IO ()
main = do
window <- createWindow 800 600 "hey"
let x = iota [60,1] [1,60] / 29
y = iota [1,60] [60,1] / 29
go window (0 :: Array Float) x y
where
go window t x y = do
let z = 10*x*(-abs(y)) * cos(x*x*(y+t))+sin(y*(x+t))-1.5
drawSurface window x y z (Cell (-1) (-1) "there" ColorMapDefault)
closed <- isWindowClosed window
unless closed $ go window (t + 0.07) x y |
@noughtmare, for main :: IO ()
main = render =<< createWindow 800 600 "hey"
where
render window = do
let x = iota [1,60] [60,1] / (30 :: Array Float)
cell = Cell (-1) (-1) "" ColorMapDefault
drawImage window x cell
closed <- isWindowClosed window
unless closed (render window) I'll update the documentation to reflect this. |
Your documentation contains an example:
I adapted it to:
That gives the error:
The text was updated successfully, but these errors were encountered: