diff --git a/extra/gpu/render/render.factor b/extra/gpu/render/render.factor index ce6e0e25ff..8f1679bfa8 100644 --- a/extra/gpu/render/render.factor +++ b/extra/gpu/render/render.factor @@ -8,7 +8,7 @@ gpu.textures gpu.textures.private half-floats images kernel lexer locals math math.order math.parser namespaces opengl opengl.gl parser quotations sequences slots sorting specialized-arrays.alien specialized-arrays.float specialized-arrays.int -specialized-arrays.uint strings tr ui.gadgets.worlds variants +specialized-arrays.uint strings ui.gadgets.worlds variants vocabs.parser words ; IN: gpu.render @@ -338,8 +338,6 @@ DEFER: [bind-uniform-tuple] texture-unit' value>>-quot { value-cleave 2cleave } append ; -TR: hyphens>underscores "-" "_" ; - :: [bind-uniform] ( texture-unit uniform prefix -- texture-unit' quot ) prefix uniform name>> append hyphens>underscores :> name uniform uniform-type>> :> type diff --git a/extra/gpu/shaders/shaders.factor b/extra/gpu/shaders/shaders.factor index d2dd29595a..58633d4a71 100755 --- a/extra/gpu/shaders/shaders.factor +++ b/extra/gpu/shaders/shaders.factor @@ -8,7 +8,7 @@ io.encodings.ascii io.files io.pathnames kernel lexer literals locals math math.parser memoize multiline namespaces opengl opengl.gl opengl.shaders parser quotations sequences specialized-arrays.alien specialized-arrays.int splitting -strings ui.gadgets.worlds variants vectors vocabs vocabs.loader +strings tr ui.gadgets.worlds variants vectors vocabs vocabs.loader vocabs.parser words words.constant ; IN: gpu.shaders @@ -65,6 +65,8 @@ MEMO: output-index ( program-instance output-name -- index ) underscores "-" "_" ; + : gl-vertex-type ( component-type -- gl-type ) { { ubyte-components [ GL_UNSIGNED_BYTE ] } @@ -125,12 +127,12 @@ MEMO: output-index ( program-instance output-name -- index ) } 0&& [ vertex-attribute inaccurate-feedback-attribute-error ] unless ; :: [bind-vertex-attribute] ( stride offset vertex-attribute -- stride offset' quot ) - vertex-attribute name>> :> name - vertex-attribute component-type>> :> type - type gl-vertex-type :> gl-type - vertex-attribute dim>> :> dim - vertex-attribute normalize?>> >c-bool :> normalize? - vertex-attribute vertex-attribute-size :> size + vertex-attribute name>> hyphens>underscores :> name + vertex-attribute component-type>> :> type + type gl-vertex-type :> gl-type + vertex-attribute dim>> :> dim + vertex-attribute normalize?>> >c-bool :> normalize? + vertex-attribute vertex-attribute-size :> size stride offset size + {