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
function main() { | |
let canvas = document.getElementById("my-canvas"); | |
// setupWebGL is defined in webgl-utils.js, it returns a WebGLRenderingContext | |
let gl = WebGLUtils.setupWebGL(canvas); | |
// Load the shader pair. 2nd arg is vertex shader, 3rd arg is fragment shader | |
ShaderUtils.loadFromFile(gl, "vshader.glsl", "fshader.glsl") | |
.then( (prog) => { // | |
// Use black RGB=(0,0,0) for the clear color |
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 gl; | |
function main() { | |
let canvas = document.getElementById("my-canvas"); | |
// setupWebGL is defined in webgl-utils.js, it returns a WebGLRenderingContext | |
gl = WebGLUtils.setupWebGL(canvas); | |
// Load the shader pair. 2nd arg is vertex shader, 3rd arg is fragment shader | |
ShaderUtils.loadFromFile(gl, "vshader.glsl", "fshader.glsl") | |
.then(drawIt); |
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
function main() { | |
let canvas = document.getElementById("my-canvas"); | |
// setupWebGL is defined in webgl-utils.js | |
let gl = WebGLUtils.setupWebGL(canvas); | |
// Use black RGB=(0,0,0) for the clear color | |
gl.clearColor(0.0, 0.0, 0.0, 1.0); | |
// clear the color buffer |
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 charset="UTF-8"> | |
<script type="text/javascript" src="webgl-utils.js"></script> | |
<script type="text/javascript" src="render.js"></script> | |
<title>My First WebGL</title> | |
</head> | |
<body onload="main()"> | |
<p>Hello World!</p> |
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 <stdio.h> | |
#include <stdlib.h> | |
int main () { | |
char command[80] = "date +%A"; | |
char name[32]; | |
printf ("Enter your nickname: "); | |
gets (name); | |
printf ("Hi, %s. Today is: ", name); |
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 <stdio.h> | |
#include <stdlib.h> | |
int main () { | |
char command[80] = "date +%A"; | |
char name[32]; | |
printf ("Enter your nickname: "); | |
gets (name); | |
printf ("Hi, %s. Today is: ", name); |
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 <stdio.h> | |
#include <stdlib.h> | |
int main () { | |
char name[80]; | |
char command[80]; | |
printf ("Enter your eos username: "); | |
scanf ("%s", name); | |
sprintf (command, "groups %s", name); |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#define SIZE 30 | |
int main (int argc, char *argv[]) { |
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 <stdio.h> | |
#include <dirent.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <errno.h> | |
int main() | |
{ | |
DIR *dirPtr; | |
struct dirent *entryPtr; |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <errno.h> | |
int main(int argc, char *argv[]) | |
{ | |
struct stat statBuf; |