This file contains 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
template < TerminalEnumType template_type > | |
class Terminal : public JoeLang::Parser::Token | |
{ | |
public: | |
Terminal() = default; | |
virtual ~Terminal() = default; | |
static Terminal< template_type >* Parse( vector<Token*>::const_iterator& stream_begin, vector<Token*>::const_iterator stream_end ); | |
static TokenEnumType m_tokenType = template_type; |
This file contains 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
template <std::string literal, std::string name> | |
std::unique_ptr< LiteralTerminal< literal, name > > LiteralTerminal::Parse( std::string::const_iterator& stream_begin, std::string::const_iterator stream_end ) | |
{ | |
if( ( stream_end - stream_begin ) < literal.size() ) | |
{ | |
if( std::equal( literal.begin(), literal.end(), stream_begin ) ) | |
{ | |
stream_begin += literal.size(); | |
return std::unique_ptr< LiteralTerminal< literal, name > >( new LiteralTerminal< literal, name > ); | |
} |
This file contains 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
template <std::string literal, std::string name> | |
std::unique_ptr< LiteralTerminal< literal, name > > LiteralTerminal::Parse( std::string::const_iterator& stream_begin, std::string::const_iterator stream_end ) | |
{ | |
if( ( end - begin ) < literal.size() ) | |
{ | |
if( std::equal( literal.begin(), literal.end(), stream_begin ) ) | |
{ | |
stream_begin += literal.size(); | |
return std::unique_ptr< LiteralTerminal< literal, name > >( new LiteralTerminal< literal, name > ); | |
} |
This file contains 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
Normal frame: | |
:: 0.206600 ms | |
:: 0.212000 ms | |
:: 0.216400 ms | |
:: 0.218600 ms | |
:: 0.222000 ms | |
(now glutSwapBuffers happens) | |
:: 7.620100 ms | |
7.621300 ms |
This file contains 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
#!/bin/sh | |
#Take a screenshot, upload it to outpost, and write to IRC | |
#James Stanley 2010 | |
filename=`date +images/%Y%m%d-%H%M.png` | |
scrot /home/james/$filename | |
scp /home/james/$filename pillbox:public_html/$filename & |
This file contains 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
/* lighting vertex shader (not quite phong) | |
* http://www.lighthouse3d.com/opengl/glsl/index.php/index.php?ogldir1 | |
* James Stanley 2011 | |
*/ | |
#version 120 | |
void main() { | |
vec3 normal, lightDir; | |
vec4 diffuse, ambient; |
This file contains 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
/* glCreateProgram test case */ | |
#include "GLee.h" | |
#include <stdio.h> | |
#include <GL/glut.h> | |
int main(int argc, char **argv) { | |
glutInit(&argc, argv); | |
glutInitDisplayString("rgb double depth>=32"); |
NewerOlder