This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nvgImageSize(vg, fb->image, &fboWidth, &fboHeight); | |
| winWidth = (int)(fboWidth / pxRatio); | |
| winHeight = (int)(fboHeight / pxRatio); | |
| // Draw some stuff to an FBO as a test | |
| nvgluBindFramebuffer(fb); | |
| glViewport(0, 0, fboWidth, fboHeight); | |
| glClearColor(0, 0, 0, 0); | |
| glClear(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); | |
| nvgBeginFrame(vg, winWidth, winHeight, pxRatio); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (let ((state (aa:make-state))) ; create the state | |
| ;; the 1st triangle | |
| (aa:line-f state 200 50 250 150) ; describe the 3 sides | |
| (aa:line-f state 250 150 50 100) ; of the first triangle | |
| (aa:line-f state 50 100 200 50) | |
| ;; the 2nd triangle | |
| (aa:line-f state 75 25 10 75) ; describe the 3 sides | |
| (aa:line-f state 10 75 175 100) ; of the second triangle | |
| (aa:line-f state 175 100 75 25) | |
| (let* ((image (opticl:make-8-bit-rgba-image 200 300 :initial-element 255))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; The following lines added by ql:add-to-init-file: | |
| #-quicklisp | |
| (let ((quicklisp-init #P"/wsr/lisp/quicklisp/setup.lisp")) | |
| (when (probe-file quicklisp-init) | |
| (load quicklisp-init))) | |
| (defun start-swank-server (&key (port 4006)) | |
| "Starts a swank-server on the localhost interface." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Copyright 2010 Nurullah Akkaya */ | |
| /* lisp.c is free software: you can redistribute it and/or modify it */ | |
| /* under the terms of the GNU General Public License as published by the */ | |
| /* Free Software Foundation, either version 3 of the License, or (at your */ | |
| /* option) any later version. */ | |
| /* lisp.c is distributed in the hope that it will be useful, but WITHOUT */ | |
| /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * hello-scheme for illustration how to embed | |
| * the tiny scheme interpreter in a C program | |
| * | |
| * 2012, OL | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include "scheme.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Ensure unix binaries on path | |
| (setenv "PATH" (concat "C:\\wsr\\apps\\Git\\bin" path-separator "C:\\wsr\\apps\\emacs-24.3\\bin" path-separator (getenv "PATH"))) | |
| ;;; basic load-path setup | |
| ;;; ------------------------------------------------------------------ | |
| (defun add-subdirs-to-load-path (dir) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum eClass | |
| { | |
| MODEL, | |
| RENDERABLE, | |
| ATTACHMENT, | |
| LOCATION | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import getopt | |
| import os | |
| import os.path | |
| import subprocess | |
| import ConfigParser | |
| # Example config | |
| # [Global] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defpackage #:trivial-gui | |
| (:use #:cl)) | |
| (in-package #:trivial-gui) | |
| (defmethod glop:on-key (window pressed keycode keysym text) | |
| (format t "Key ~:[released~;pressed~]: ~D (~S ~S)~%" pressed keycode keysym text) | |
| (format t "Key pressed: ~S~%" (glop:key-pressed keycode)) | |
| (when (and (not pressed) (eq keysym :escape)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defparameter *x* 45) | |
| (defparameter *y* 20) | |
| (defparameter *running* t) | |
| (defun main () | |
| (tcod:console-init-root 80 50 :title "Libtcod Lisp Tutorial" :fullscreen? nil :renderer :renderer-sdl) | |
| (loop | |
| while *running* | |
| do |