]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/model-viewer/model-viewer.factor
use radix literals
[factor.git] / extra / model-viewer / model-viewer.factor
index 93bb0bd836e1d66020e1a03ee0f80dd27bbdd0a6..72d603540d78bfe0fcd941904d4a0ef12f9a1ac7 100644 (file)
@@ -88,12 +88,18 @@ TUPLE: vbo
     index-buffer index-count vertex-format texture bump ka ;
 
 : white-image ( -- image )
-    { 1 1 } BGR ubyte-components f
-    B{ 255 255 255 } image boa ;
+    <image>
+        { 1 1 } >>dim
+        BGR >>component-order
+        ubyte-components >>component-type
+        B{ 255 255 255 } >>bitmap ;
 
 : up-image ( -- image )
-    { 1 1 } BGR ubyte-components f
-    B{ 0 0 0 } image boa ;
+    <image>
+        { 1 1 } >>dim
+        BGR >>component-order
+        ubyte-components >>component-type
+        B{ 0 0 0 } >>bitmap ;
         
 : make-texture ( pathname alt -- texture )
     swap [ nip load-image ] [ ] if*
@@ -162,7 +168,7 @@ TUPLE: vbo
 : clear-screen ( -- )
     0 0 0 0 glClearColor 
     1 glClearDepth
-    HEX: ffffffff glClearStencil
+    0xffffffff glClearStencil
     flags{ GL_COLOR_BUFFER_BIT
       GL_DEPTH_BUFFER_BIT
       GL_STENCIL_BUFFER_BIT } glClear ;
@@ -211,7 +217,7 @@ M: model-world apply-world-attributes
              { windowed double-buffered }
            }
            { pref-dim { 1024 768 } }
-           { tick-interval-micros 16666 }
+           { tick-interval-nanos $[ 60 fps ] }
            { use-game-input? t }
            { model-path model-path }
         }