Skip to content
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

fix OpenGL example's idle callback. #61

Open
i-makinori opened this issue Nov 8, 2023 · 0 comments
Open

fix OpenGL example's idle callback. #61

i-makinori opened this issue Nov 8, 2023 · 0 comments

Comments

@i-makinori
Copy link

Thank you for great Lisp GUI toolkit which can use OpenGL.

I make it animated by fixing idle callback at the OpenGL example of README.

      ;; FIXME      (iup-cffi::%iup-set-function :idle_action 'idle)
      ;; into
      (iup-cffi::%iup-set-function :idle_action (cffi:callback idle-cb))
;;; FIXME
;; (cffi:defcallback idle-cb :int ()
;; ...
;; into
(cffi:defcallback idle-cb :int ()
  (incf *tt*)
  (iup-gl:make-current *canvas*)
  (repaint *canvas* 0 0) ;; FIXME: true posx posy. or simply, call canvas action.
  iup::+default+)

referenced : iup-examples/examples/C/gl/opengl3D.c at master · LuaDist/iup-examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant