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
| void Game::render() { | |
| GLenum buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }; | |
| glViewport(0, 0, w, h); | |
| glBindFramebuffer(GL_FRAMEBUFFER, fbo); | |
| glDrawBuffers(2, buffers); | |
| glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, t_col, 0); | |
| glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, t_norm, 0); | |
| glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, t_depth, 0); | |
| glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
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
| #pragma mark - | |
| #pragma mark Default shader | |
| /*** | |
| * ____ _ _ | |
| * / ___|| |__ __ _ __| | ___ _ __ | |
| * \___ \| '_ \ / _` |/ _` |/ _ \ '__| | |
| * ___) | | | | (_| | (_| | __/ | | |
| * |____/|_| |_|\__,_|\__,_|\___|_| | |
| * | |
| */ |
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
| for (int x = 0; x < CX; x++) { | |
| for (int y = 0; y < CY; y++) { | |
| for (int z = 0; z < CZ; z++) { | |
| if (!contents[x][y][z]) continue; | |
| uint8_t type = contents[x][y][z]; | |
| // -x | |
| if (!get(x - 1, y, z)) { | |
| vertices[i++] = vec3b(x, y, z ); vertices[i++] = vec3b(x - 1, y, z); | |
| vertices[i++] = vec3b(x, y, z + 1); vertices[i++] = vec3b(x - 1, y, z); |
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
| // header | |
| private: | |
| Chunk* chunks[SCX][SCY][SCZ]; | |
| // | |
| // ctor |
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
| #ifndef __SHTEST_BATCH_H__ | |
| #define __SHTEST_BATCH_H__ | |
| #include <stdarg.h> | |
| #include <glm/glm.hpp> | |
| #include <glm/gtc/matrix_transform.hpp> | |
| #include "glutil.h" | |
| class SpriteBatch { | |
| public: |
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
| RAW USER user irc.esper.net bla :Blabla | |
| RAW NICK Blabla | |
| RAW JOIN #foobar | |
| :aperture.esper.net NOTICE * :*** Looking up your hostname... | |
| :aperture.esper.net NOTICE * :*** Checking Ident | |
| :aperture.esper.net NOTICE * :*** Found your hostname | |
| :aperture.esper.net NOTICE * :*** No Ident response |
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
| 495 virtualenv treeoflife; cd treeoflife; git clone https://github.com/lahwran/tree-of-life. tree-of-life; source ../bin/activate; python setup.py develop; open .; python cocoa.py | |
| 496 source bin/activate; python setup.py develop; open .; python cocoa.py | |
| 497 source bin/activate | |
| 498 git clone https://github.com/lahwran/tree-of-life tree-of-life; | |
| 499 source bin/activate; python setup.py develop; open .; python cocoa.py | |
| 500 source bin/activate; python setup.py develop; open .; python cocoa.py | |
| 501 history | tail -n 50 | curl -F 'sprunge=<-' http://sprunge.us |
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
| /*@strictfp*/def init() { | |
| var f: Float = 0f | |
| for (i <- 0 until 10000) { | |
| f += 0.1f | |
| } | |
| println(10000 * 0.1f) | |
| println(f) | |
| } |
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
| package ee.tmtu.shototsu | |
| class Pointer[T](value: T) { | |
| private[this] val _arr = new Array[T](1) | |
| def apply(): T = _arr(0) | |
| def update(value: T): Unit = _arr(0) = value | |
| } |
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
| object Font { | |
| val left: String = "left" | |
| val right: String = "right" | |
| val center: String = "center" | |
| val colors: mutable.HashMap[String, Color] = mutable.HashMap[String, Color]( | |
| "白" -> Color.WHITE, // Shiro | |
| "黒" -> Color.BLACK, // Kuro | |
| "赤" -> Color.RED, // Aka | |
| "青" -> Color.BLUE, // Ao | |
| "緑" -> Color.GREEN // Midori |