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
// From Buffer to ArrayBuffer: | |
utils.toArrayBuffer = function toArrayBuffer(buffer) { | |
var ab = new ArrayBuffer(buffer.length); | |
var view = new Uint8Array(ab); | |
for (var i = 0; i < buffer.length; ++i) { | |
view[i] = buffer[i]; | |
} | |
return ab; | |
} |
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
<!DOCTYPE HTML> | |
<html lang="en"><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Zooming via HTML5 Canvas Context</title> | |
<style type="text/css" media="screen"> | |
body { background:#eee; margin:1em; text-align:center; } | |
canvas { display:block; margin:1em auto; background:#fff; border:1px solid #ccc } | |
</style> | |
</head><body> |
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 <cmath> | |
// GLEW | |
#define GLEW_STATIC | |
#include <GL/glew.h> | |
// GLFW | |
#include <GLFW/glfw3.h> |
NewerOlder