This is the glisph Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 05:22:36 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
glisph
Glyph rendering engine using OpenGL shading language
Tamamu
MIT
# GLisph
[![Quicklisp](http://quickdocs.org/badge/glisph.svg)](http://quickdocs.org/glisph/)
![Screen Shot](screenshot.gif)
GLisph is a glyph rendering engine using OpenGL shader language. The engine draws string clearly by vector based font rendering on an OpenGL context. TrueType (TTF) is the only drawable format currently.
## Usage
Initialize the engine as below first.
“‘lisp
(gli:init 800 600)
“‘
Load TrueType font file and make glyph table. Glyph table manages the contour points of the glyphs.
“‘lisp
(defvar *font* (gli:open-font-loader "/path/to/display-font.ttf")
(defvar *glyph-table* (gli:make-glyph-table *font*))
“‘
Then you can regist and draw glyphs!
“‘lisp
;;; For CL-GLUT, you should require these display mode keywords before display-window section.
(glut:set-display-mode :stencil :multisample)
;; Before draw section
(defvar *text-buffer*
(gli:draw *glyph-table*
’(:x 120 :y 40 :size 20
:text "Hello World!"
:y 64
:text "Common Lisp")))
;;; In draw section, you can set some parameters to draw for GLisph context.
(gli:gcolor 0.8 0.2 0.5)
;;; This is rotation example.
(gli:grotate 0.0 0.0 0.5)
;; Render
(gli:render *text-buffer*)
“‘
## Dependencies
* cl-annot
* cl-opengl
* cl-glu
* zpb-ttf
* cl-glut (optional - only required when you test GLisph)
## Installation
* Quicklisp
“‘lisp
(ql:quickload :glisph)
“‘
* Roswell
“‘bash
$ ros install glisph
“‘
* Test
“‘lisp
(asdf:test-system :glisph)
“‘
## Author
* Tamamu
## Copyright
Copyright (c) 2017 Tamamu
## License
Licensed under the MIT License.
0.1
cl-annot
(system).
cl-opengl
(system).
cl-glu
(system).
cl-reexport
(system).
zpb-ttf
(system).
src
(module).
Modules are listed depth-first from the system components tree.
glisph/src
glisph
(system).
glisph.lisp
(file).
shader.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
glisph/src/glisph.lisp
shader.lisp
(file).
src
(module).
%draw-string
(function).
%set-glyph-table
(macro).
%set-letter-spacing
(macro).
%set-size
(macro).
%set-x
(macro).
%set-y
(macro).
delete-glyph-table
(function).
draw
(macro).
finalize
(function).
gcolor
(function).
grotate
(function).
gscale
(function).
gtrans
(function).
init
(function).
make-glyph-table
(macro).
regist-glyphs
(macro).
render
(function).
set-render-size
(function).
%add-glyph
(function).
%calc-advance-width
(function).
%calc-kerning
(function).
*bounding-box-color*
(special variable).
*bounding-box-program*
(special variable).
*bounding-box-rotate*
(special variable).
*bounding-box-scale*
(special variable).
*bounding-box-translation*
(special variable).
*glyph-program*
(special variable).
*glyph-rotate*
(special variable).
*glyph-rotate-mat*
(special variable).
*glyph-scale*
(special variable).
*glyph-scale-mat*
(special variable).
*glyph-trans-mat*
(special variable).
*glyph-translation*
(special variable).
*render-height*
(special variable).
*render-width*
(special variable).
+bounding-box-vertex-loc+
(special variable).
+glyph-attrib-loc+
(special variable).
+glyph-vertex-loc+
(special variable).
context
(structure).
context-count
(reader).
(setf context-count)
(writer).
context-glyph-table
(reader).
(setf context-glyph-table)
(writer).
context-letter-spacing
(reader).
(setf context-letter-spacing)
(writer).
context-p
(function).
context-size
(reader).
(setf context-size)
(writer).
context-vertex
(reader).
(setf context-vertex)
(writer).
context-x
(reader).
(setf context-x)
(writer).
context-y
(reader).
(setf context-y)
(writer).
copy-context
(function).
copy-text-buffer
(function).
copy-vglyph
(function).
create-program
(function).
make-context
(function).
make-gl-array
(macro).
make-text-buffer
(function).
make-vglyph
(function).
matrix4f
(function).
regist-glyph-helper
(macro).
text-buffer
(structure).
text-buffer-count
(reader).
(setf text-buffer-count)
(writer).
text-buffer-fill-buffer
(reader).
(setf text-buffer-fill-buffer)
(writer).
text-buffer-height
(reader).
(setf text-buffer-height)
(writer).
text-buffer-p
(function).
text-buffer-polygon-buffer
(reader).
(setf text-buffer-polygon-buffer)
(writer).
text-buffer-width
(reader).
(setf text-buffer-width)
(writer).
vector-push-extend-to
(macro).
vertex-fill
(function).
vglyph
(structure).
vglyph-count
(reader).
(setf vglyph-count)
(writer).
vglyph-p
(function).
vglyph-source
(reader).
(setf vglyph-source)
(writer).
vglyph-vertex
(reader).
(setf vglyph-vertex)
(writer).
vglyph-xmax
(reader).
(setf vglyph-xmax)
(writer).
vglyph-xmin
(reader).
(setf vglyph-xmin)
(writer).
vglyph-ymax
(reader).
(setf vglyph-ymax)
(writer).
vglyph-ymin
(reader).
(setf vglyph-ymin)
(writer).
glisph/src/shader.lisp
src
(module).
+bounding-box-fs+
(special variable).
+bounding-box-vs+
(special variable).
+glyph-fs+
(special variable).
+glyph-vs+
(special variable).
Packages are listed by definition order.
glisph
Glyph rendering engine using OpenGL shading language
gli
common-lisp
.
%draw-string
(function).
%set-glyph-table
(macro).
%set-letter-spacing
(macro).
%set-size
(macro).
%set-x
(macro).
%set-y
(macro).
delete-glyph-table
(function).
draw
(macro).
finalize
(function).
gcolor
(function).
grotate
(function).
gscale
(function).
gtrans
(function).
init
(function).
make-glyph-table
(macro).
regist-glyphs
(macro).
render
(function).
set-render-size
(function).
%add-glyph
(function).
%calc-advance-width
(function).
%calc-kerning
(function).
*bounding-box-color*
(special variable).
*bounding-box-program*
(special variable).
*bounding-box-rotate*
(special variable).
*bounding-box-scale*
(special variable).
*bounding-box-translation*
(special variable).
*glyph-program*
(special variable).
*glyph-rotate*
(special variable).
*glyph-rotate-mat*
(special variable).
*glyph-scale*
(special variable).
*glyph-scale-mat*
(special variable).
*glyph-trans-mat*
(special variable).
*glyph-translation*
(special variable).
*render-height*
(special variable).
*render-width*
(special variable).
+bounding-box-vertex-loc+
(special variable).
+glyph-attrib-loc+
(special variable).
+glyph-vertex-loc+
(special variable).
context
(structure).
context-count
(reader).
(setf context-count)
(writer).
context-glyph-table
(reader).
(setf context-glyph-table)
(writer).
context-letter-spacing
(reader).
(setf context-letter-spacing)
(writer).
context-p
(function).
context-size
(reader).
(setf context-size)
(writer).
context-vertex
(reader).
(setf context-vertex)
(writer).
context-x
(reader).
(setf context-x)
(writer).
context-y
(reader).
(setf context-y)
(writer).
copy-context
(function).
copy-text-buffer
(function).
copy-vglyph
(function).
create-program
(function).
make-context
(function).
make-gl-array
(macro).
make-text-buffer
(function).
make-vglyph
(function).
matrix4f
(function).
regist-glyph-helper
(macro).
text-buffer
(structure).
text-buffer-count
(reader).
(setf text-buffer-count)
(writer).
text-buffer-fill-buffer
(reader).
(setf text-buffer-fill-buffer)
(writer).
text-buffer-height
(reader).
(setf text-buffer-height)
(writer).
text-buffer-p
(function).
text-buffer-polygon-buffer
(reader).
(setf text-buffer-polygon-buffer)
(writer).
text-buffer-width
(reader).
(setf text-buffer-width)
(writer).
vector-push-extend-to
(macro).
vertex-fill
(function).
vglyph
(structure).
vglyph-count
(reader).
(setf vglyph-count)
(writer).
vglyph-p
(function).
vglyph-source
(reader).
(setf vglyph-source)
(writer).
vglyph-vertex
(reader).
(setf vglyph-vertex)
(writer).
vglyph-xmax
(reader).
(setf vglyph-xmax)
(writer).
vglyph-xmin
(reader).
(setf vglyph-xmin)
(writer).
vglyph-ymax
(reader).
(setf vglyph-ymax)
(writer).
vglyph-ymin
(reader).
(setf vglyph-ymin)
(writer).
glisph.shader
common-lisp
.
+bounding-box-fs+
(special variable).
+bounding-box-vs+
(special variable).
+glyph-fs+
(special variable).
+glyph-vs+
(special variable).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Make glyphs cache table.
Regist glyphs of the string to the glyph table.
Delete font data from the glyph table.
Delete GLisph shader programs.
Please call this function before exit program.
Set render color of glyphs.
Set the rotate matrix of glyphs.
Set the scale matrix of glyphs.
Set the translation matrix of glyphs.
Initialize GLisph engine.
Please call this function before draw glyphs.
Render the text buffer.
Calc offsets of kerning and advance width between two glyphs.
size
.
Create GLSL program.
Make vertex of filled region of the glyph.
xmax
.
xmin
.
ymax
.
ymin
.
structure-object
.
hash-table
array
(make-array 0 :element-type (quote single-float) :fill-pointer 0 :adjustable t)
fixnum
0
fixnum
0
fixnum
10
fixnum
0
common-lisp
.
fixnum
0
structure-object
.
float
0.0
float
0.0
common-lisp
.
fixnum
0
structure-object
.
zpb-ttf::glyph
single-float
0.0
single-float
0.0
single-float
1.0
single-float
1.0
array
common-lisp
.
fixnum
0
Jump to: | %
(
C D F G I M R S T V |
---|
Jump to: | %
(
C D F G I M R S T V |
---|
Jump to: | *
+
C F G H L P S V W X Y |
---|
Jump to: | *
+
C F G H L P S V W X Y |
---|
Jump to: | C F G M P S T V |
---|
Jump to: | C F G M P S T V |
---|