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
#include "SDL.h" | |
// OSX only - change on other platforms | |
#include <OpenGL/gl3.h> | |
#include <stdlib.h> //rand() | |
#include <iostream> | |
#include <string> | |
static bool quitting = false; | |
static SDL_Window *window = NULL; |
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
// | |
// Created by Morten Nobel-Jørgensen on 20/11/2016. | |
// | |
#include "Handle.hpp" |
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
#include "SDL.h" | |
// OSX only - change on other platforms | |
#include <OpenGL/gl3.h> | |
#include <stdlib.h> //rand() | |
#include <iostream> | |
#include <string> | |
static bool quitting = false; | |
static SDL_Window *window = NULL; |
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
while (running){ | |
frame(deltaTime); | |
auto tick = Clock::now(); | |
deltaTime = std::chrono::duration_cast<FpSeconds>(tick - lastTick).count(); | |
// todo fix busy wait | |
// https://forum.lazarus.freepascal.org/index.php?topic=35689.0 | |
while (deltaTime < timePerFrame){ | |
SDL_Delay((Uint32) ((timePerFrame - deltaTime) / 1000)); | |
tick = Clock::now(); | |
deltaTime = std::chrono::duration_cast<FpSeconds>(tick - lastTick).count(); |
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
// Naive port of https://github.com/CreativeInquiry/ofxBussIK | |
#include <iostream> | |
#include "sre/Texture.hpp" | |
#include "sre/Renderer.hpp" | |
#include "sre/Material.hpp" | |
#include "LinearR3.h" | |
#include "Tree.h" | |
#include "Jacobian.h" |
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
import javax.imageio.ImageIO; | |
import javax.swing.*; | |
import javax.swing.border.LineBorder; | |
import java.awt.*; | |
import java.awt.datatransfer.DataFlavor; | |
import java.awt.datatransfer.Transferable; | |
import java.awt.datatransfer.UnsupportedFlavorException; | |
import java.awt.dnd.*; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; |
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
// | |
// Event.h | |
// | |
// Created by Morten Nobel-Jørgensen on 8/18/13. | |
// Copyright (c) 2013 morten. All rights reserved. | |
// Open Source under New BSD License (http://opensource.org/licenses/BSD-3-Clause) | |
#pragma once | |
#include <iostream> |
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
#include "GLError.h" | |
#include <iostream> | |
#include <string> | |
#ifdef WIN32 | |
# include <GL/glew.h> | |
#elif __APPLE__ | |
# include <OpenGL/gl3.h> | |
#else | |
# include <GL3/gl3.h> |
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
import javax.imageio.ImageIO; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.util.*; | |
/** | |
* Create an ASCII letters sorted by intensity. By including the inverse letters | |
* the number of combinations are increased. | |
* |