{"id":1138,"date":"2014-01-29T01:51:33","date_gmt":"2014-01-28T16:51:33","guid":{"rendered":"http:\/\/mirror.boy.jp\/?p=1138"},"modified":"2014-01-29T01:51:33","modified_gmt":"2014-01-28T16:51:33","slug":"jit-gl-lua-%e5%8b%95%e7%94%bb%e3%83%86%e3%82%af%e3%82%b9%e3%83%81%e3%83%a3%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/mirror.boy.jp\/?p=1138","title":{"rendered":"jit.gl.lua \u52d5\u753b\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u5229\u7528\u3059\u308b"},"content":{"rendered":"<p>jit.gl.lua\u5185\u3067\u52d5\u753b\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u6271\u3046\u5834\u5408\u306b\u3001\u5916\u90e8\u304b\u3089matrix\u3067\u53d7\u3051\u53d6\u308a\u3001jit.gl.texture\u3068\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\u304c<a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/cycling74.com\/forums\/topic\/jit-gl-lua-how-to-bind-a-texture\/');\"  href=\"http:\/\/cycling74.com\/forums\/topic\/jit-gl-lua-how-to-bind-a-texture\/\">Forum<\/a>\u306b\u3042\u308a\u307e\u3057\u305f\u3002\u5c11\u3057\u305a\u3064OpenGL\u3068jit.gl.lua\u306e\u4f7f\u3044\u65b9\u304c\u5206\u304b\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><a onclick=\"javascript:pageTracker._trackPageview('\/downloads\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17.jpg');\"  href=\"http:\/\/mirror.boy.jp\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mirror.boy.jp\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17-1024x803.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-29 01.43.17\" width=\"1024\" height=\"803\" class=\"alignnone size-large wp-image-1140\" srcset=\"https:\/\/mirror.boy.jp\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17-1024x803.jpg 1024w, https:\/\/mirror.boy.jp\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17-400x313.jpg 400w, https:\/\/mirror.boy.jp\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17-304x238.jpg 304w, https:\/\/mirror.boy.jp\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-29-01.43.17.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>[javascript]<\/p>\n<p>local gl = require(&quot;opengl&quot;)<br \/>\nlocal GL = gl<\/p>\n<p>local tex = jit.new(&quot;jit.gl.texture&quot;, this.drawto)<\/p>\n<p>function jit_matrix(name)<br \/>\ntex:jit_matrix(name)<br \/>\nend<\/p>\n<p>function draw()<br \/>\njit.gl.bindtexture(tex.name, 0)<br \/>\ngl.Color(1., 1., 1., 1.)<\/p>\n<p>gl.Begin(GL.QUADS)<br \/>\n&#8211;top left<br \/>\ngl.TexCoord(0., 1.)<br \/>\ngl.Vertex(-0.5, 0.5, 0.)<\/p>\n<p>&#8211;bottom left<br \/>\ngl.TexCoord(0., 0.)<br \/>\ngl.Vertex(-0.5, -0.5, 0.)<\/p>\n<p>&#8211;bottom right<br \/>\ngl.TexCoord(1., 0.)<br \/>\ngl.Vertex(0.5, -0.5, 0.)<\/p>\n<p>&#8211;top right<br \/>\ngl.TexCoord(1., 1.)<br \/>\ngl.Vertex(0.5, 0.5, 0.)<br \/>\ngl.End()<\/p>\n<p>gl.PushMatrix()<br \/>\ngl.Translate(1,0,0)<br \/>\ngl.Begin(GL.QUADS)<br \/>\n&#8211;top left<br \/>\ngl.TexCoord(0., 1.)<br \/>\ngl.Vertex(-0.5, 0.5, 0.)<\/p>\n<p>&#8211;bottom left<br \/>\ngl.TexCoord(0., 0.)<br \/>\ngl.Vertex(-0.5, -0.5, 0.)<\/p>\n<p>&#8211;bottom right<br \/>\ngl.TexCoord(1., 0.)<br \/>\ngl.Vertex(0.5, -0.5, 0.)<\/p>\n<p>&#8211;top right<br \/>\ngl.TexCoord(1., 1.)<br \/>\ngl.Vertex(0.5, 0.5, 0.)<br \/>\ngl.End()<br \/>\ngl.PopMatrix()<\/p>\n<p>jit.gl.unbindtexture(tex.name, 0)<br \/>\nend<\/p>\n<p>[\/javascript]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>jit.gl.lua\u5185\u3067\u52d5\u753b\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u6271\u3046\u5834\u5408\u306b\u3001\u5916\u90e8\u304b\u3089matrix\u3067\u53d7\u3051\u53d6\u308a\u3001jit.gl.texture\u3068\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\u304cForum\u306b\u3042\u308a\u307e\u3057\u305f\u3002\u5c11\u3057\u305a\u3064OpenGL\u3068jit.gl.lua\u306e\u4f7f\u3044\u65b9\u304c\u5206\u304b\u3063\u3066\u304d\u307e\u3057\u305f &hellip; <a href=\"https:\/\/mirror.boy.jp\/?p=1138\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">jit.gl.lua \u52d5\u753b\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u5229\u7528\u3059\u308b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,47,45,46,26],"tags":[],"_links":{"self":[{"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=\/wp\/v2\/posts\/1138"}],"collection":[{"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1138"}],"version-history":[{"count":3,"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=\/wp\/v2\/posts\/1138\/revisions"}],"predecessor-version":[{"id":1142,"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=\/wp\/v2\/posts\/1138\/revisions\/1142"}],"wp:attachment":[{"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mirror.boy.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}