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
var express = require("express"); | |
var app = express(); | |
app.configure(function() | |
{ | |
app.use(express.compress()); | |
app.use(express.bodyParser()); | |
app.use("/", express.static(__dirname + "/public/", {maxAge: 86400000})); | |
}); |
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
while(1) | |
{ | |
calculateDT | |
disaptch inbound packets (you don't pass DT here, instead, this should have a reference to your gamestate object) | |
update accordingly (pass DT HERE) | |
render | |
} |
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
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <cmath> | |
#define TIME_WASTE_MAGIC_NUMBER 5000000 | |
using std::chrono::duration_cast; | |
using std::chrono::milliseconds; | |
using std::chrono::monotonic_clock; |
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
<Texture2D name="optional name" description="optional description"> | |
<ImageData encoding="base64" format="rgba" bpp="8"> | |
[base64 encoded data here] | |
</ImageData> | |
<TextureAttribute>blah blah blah filtering modes and shit</TextureAttribute> | |
</Texture2D> | |
<Asset name="optional name" description="optional description"> | |
<AssetAttribute>some shit</AssetAttribute> | |
<Texture2D src="file containing texture xml decl"/> |
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 face = 0; face < scene->mMeshes[0]->mNumFaces; face++) | |
{ | |
glBegin(GL_TRIANGLES); | |
/* iterate through face indicies */ | |
for (int face = 0; face < scene->mMeshes[0]->mNumFaces; face++) | |
{ | |
glVertex3f((scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[0]]).x,(scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[0]]).y,(scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[0]]).z); | |
glVertex3f((scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[1]]).x,(scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[1]]).y,(scene->mMeshes[0]->mVertices[[scene->mMeshes[1]->mFaces[face]->mIndicies[0]]).z); | |
glVertex3f((scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[2]]).x,(scene->mMeshes[0]->mVertices[[scene->mMeshes[0]->mFaces[face]->mIndicies[2]]).y,(scene->mMeshes[0]->mVertices[[scene->mMeshes[2]->mFaces[face]->mIndicies[0]]).z); |