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

[irteus/irtgl.l] add :string method to glviewsurface. #530

Merged
merged 1 commit into from
Jun 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions irteus/irtgl.l
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,24 @@
;; transpose
(transpose-image-rows img)
img))
(:string
(x y str &optional (fid x:font-courb24))
"Draw string to irtviewer. x:font-courb24 and x::font-helvetica-bold-12 are supported for fid."
(send self :makecurrent)
(glMatrixMode GL_PROJECTION)
(glPushMatrix)
(send self :2d-mode)
(unless (eq (get self :glxusexfont) fid)
(setf (get self :glxusexfont) fid)
(glxUseXfont fid 32 96 (+ 1000 32)))
(glRasterPos2i (round x) (- (send self :height) (round y)))
(glListBase 1000)
(glCallLists (length str) GL_UNSIGNED_BYTE str)
(send self :3d-mode)
(glMatrixMode GL_PROJECTION)
(glPopMatrix)
(glMatrixMode GL_MODELVIEW)
)
)

(defun draw-globjects (vwr draw-things &key (clear t) (flush t) (draw-origin 150) (draw-floor nil))
Expand Down