Skip to content

Instantly share code, notes, and snippets.

@baixiaohub
baixiaohub / pmx21.md
Created April 2, 2021 06:49 — forked from felixjones/pmx21.md
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@baixiaohub
baixiaohub / cool-game-programming-blogs.opml
Last active April 3, 2020 14:06 — forked from Reedbeta/cool-game-programming-blogs.opml
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline title="Tech News" text="Tech News">
<outline text="Ars Technica" title="Ars Technica" type="rss" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com" rssfr-favicon="https://icons.feedercdn.com/arstechnica.com" rssfr-updateInterval="600000"/>
<outline text="Polygon - Full" title="Polygon - Full" type="rss" xmlUrl="http://www.polygon.com/rss/index.xml" htmlUrl="http://www.polygon.com/" rssfr-favicon="https://icons.feedercdn.com/www.polygon.com" rssfr-updateInterval="600000"/>
<outline text="Road to VR" title="Road to VR" type="rss" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="http://www.roadtovr.com" rssfr-favicon="https://icons.feedercdn.com/www.roadtovr.com" rssfr-updateInterval="600000"/>
@baixiaohub
baixiaohub / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created March 19, 2020 09:19 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@baixiaohub
baixiaohub / gist:1a06511fea50f1bfc90e2090ec551524
Created July 31, 2019 10:02 — forked from RangelReale/gist:3e6392289d8ba1a52b6e70cdd7e10282
How to compile ffmpeg + x264 using Visual Studio 2015
##### How to compile ffmpeg + x264 using Visual Studio 2015 #####
##### Building this way will make the DLLs compatible with SEH, so there will be no need to use /SAFESEH:NO when compiling your code #####
##### SOURCES:
### https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html
### https://gist.github.com/sailfish009/8d6761474f87c074703e187a2bc90bbc
### http://roxlu.com/2016/057/compiling-x264-on-windows-with-msvc
* Download "MSYS2 x86_64" from "http://msys2.github.io" and install into "C:\workspace\windows\msys64"
@baixiaohub
baixiaohub / dbg.h
Created July 11, 2019 11:51 — forked from rioki/dbg.h
Debug Helpers
//
// Debug Helpers
//
// Copyright (c) 2015 - 2017 Sean Farrell <sean.farrell@rioki.org>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@baixiaohub
baixiaohub / devices.c
Created September 9, 2018 09:01 — forked from courtneyfaulkner/devices.c
List OpenCL platforms and devices
#include <stdio.h>
#include <stdlib.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
int main() {
@baixiaohub
baixiaohub / README.md
Last active May 17, 2018 14:33 — forked from allanmac/README.md
Macros for neatly error checking OpenCL API functions.

Simply adding two parentheses cl(...) gives you error checking for OpenCL API functions that return a cl_int error code.

The second cl_ok(err) macro is for error checking API functions that initialize their error code as an argument.

The header also includes a useful function for converting OpenCL errors to strings:

char const * clGetErrorString(cl_int const err);