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
// $ em++ -lwebsocket.js -o index.html main.cpp | |
#include <emscripten/emscripten.h> | |
#include <emscripten/websocket.h> | |
#include <stdio.h> | |
EM_BOOL onopen(int eventType, const EmscriptenWebSocketOpenEvent *websocketEvent, void *userData) { | |
puts("onopen"); | |
EMSCRIPTEN_RESULT result; |
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 <QtGui/QOpenGLExtraFunctions> | |
#include <QtGui/QSurfaceFormat> | |
#include <QtGui/QVector3D> | |
#include <QtOpenGL/QOpenGLFramebufferObject> | |
#include <QtWidgets/QApplication> | |
#include <QtWidgets/QLabel> | |
#include <QtWidgets/QWidget> | |
#include <QtWidgets/QVBoxLayout> | |
#include <QtOpenGLWidgets/QOpenGLWidget> |
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 <QtGui/QOpenGLExtraFunctions> | |
#include <QtGui/QSurfaceFormat> | |
#include <QtGui/QVector3D> | |
#include <QtOpenGL/QOpenGLFramebufferObject> | |
#include <QtWidgets/QApplication> | |
#include <QtWidgets/QLabel> | |
#include <QtWidgets/QWidget> | |
#include <QtWidgets/QVBoxLayout> | |
#include <QtOpenGLWidgets/QOpenGLWidget> |
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
const jsBeautify = require('js-beautify')['js_beautify']; | |
const fs = require('fs'); | |
const glob = require('glob'); | |
const options = { | |
indent_size: 4, | |
indent_char: ' ', | |
indent_with_tabs: false, | |
eol: '\n', | |
end_with_newline: true, |
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
// https://coliru.stacked-crooked.com/a/7765d15fe603a3d9 | |
// https://gamedev.stackexchange.com/a/196955/115807 | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <memory> | |
#include <map> | |
struct b2Fixture; |
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
QT += core gui widgets | |
SOURCES += main.cpp | |
TARGET = app |
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
# Build: | |
# | |
# as -o hello.obj | |
# ld -o hello.exe hello.obj -L C:\\tools\\mingw64\\x86_64-w64-mingw32\\lib -lkernel32 | |
# | |
# Requires MinGW | |
.extern GetStdHandle | |
.extern WriteFile | |
.extern ExitProcess |
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 { mat4, quat, vec3 } from "gl-matrix"; | |
import { gl } from "./webgl-context.js"; | |
import { getEuler } from "./math-helpers.js" | |
// This class implements debug drawing callbacks that | |
// are invoked inside b2World::Step | |
export default class DebugDrawer { | |
constructor(program, pixelsPerMeter) { | |
this.program = program; |
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
#!/usr/bin/python | |
# coding=utf-8 | |
import os, pygame, time, random, uuid, sys | |
class myRect(pygame.Rect): | |
""" Add type property """ | |
def __init__(self, left, top, width, height, type): | |
pygame.Rect.__init__(self, left, top, width, height) | |
self.type = 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
import sys | |
from OpenGL.GL import * | |
from PyQt6.QtCore import QSize, Qt | |
from PyQt6.QtOpenGLWidgets import QOpenGLWidget | |
from PyQt6.QtWidgets import QApplication, QPushButton, QVBoxLayout | |
class OpenGLWidget(QOpenGLWidget): |
NewerOlder