Skip to content

Instantly share code, notes, and snippets.

@heuripedes
heuripedes / gist:ef4bfc033252d511075b
Last active June 2, 2022 01:52 — forked from aliaspider/gist:6ba6667f64d161d8f265
libco pthread by aliaspider
#define LIBCO_C
#include <libco.h>
#include <stdlib.h>
#include <pthread.h>
#ifdef __cplusplus
extern "C" {
#endif

RetroArch's osmesa context

The osmesa context makes use of the OSMesa offscreen rendering library in order to provide a headless OpenGL context that does not require X or even a GPU running. Yes, it's a software renderer. The video contents can be read from an UNIX socket.

Building

To use the osmesa context, you must first recompile your RetroArch passing the --enable-osmesa switch to the configure script. If you don't see a line similar to the one bellow, it means that your Mesa install does not include OSMesa.

import os
import sys
import re
from os import path
import json
if len(sys.argv) < 2:
print('usage:',sys.argv[0],'project_name')
sys.exit(-1)
GUIFontData = [ # TODO: GUIFontData1
# bitmap 5x5 font; char - offset for ASCII2Font
0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, # empty space 0x0
0b01110000, 0b10011000, 0b10101000, 0b11001000, 0b01110000, # 0 0x01
0b00100000, 0b01100000, 0b00100000, 0b00100000, 0b01110000, # 1 0x02
0b01110000, 0b10001000, 0b00110000, 0b01000000, 0b11111000, # 2 0x03
0b01110000, 0b10001000, 0b00110000, 0b10001000, 0b01110000, # 3 0x04
0b01010000, 0b10010000, 0b11111000, 0b00010000, 0b00010000, # 4 0x05
0b11111000, 0b10000000, 0b11110000, 0b00001000, 0b11110000, # 5 0x06
<!DOCTYPE html>
<html lang="en">
<head>
<!-- https://www.jefftk.com/p/let-people-move-to-jobs -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
  • $0020 - Current level (called round?)
  • $0021 - Current level bonus (this value is displayed after multiplying by 100)
  • $001A - Joypad input
  0000 0000
  |||| ||||
  |||| |||+- right (1)
  |||| ||+-- left  (2)
  |||| ||+-- up    (4)
 |||| |+--- down (8)
@heuripedes
heuripedes / autoexec.cfg
Created January 19, 2020 15:15
csgo config
// global shadows: high
// model/texture detail: low
// effect detail: high
// shader detail: high or very high
// MSAA: as high as possible
// filtering: bilinear
// fxaa: disabled
// defaults first
unbindall
import subprocess
import xml.etree.ElementTree as ET
import cairocffi
import pangocffi
import pangocairocffi
import sys
import os
SLIDES_INPUT_FILE="temp/slides_mp4_input.txt"
1 operação hidra 1 teia:
M4A4 | Desolação Espacial Testada em Campo
1 teia:
UMP-45 | Exposição
MP7 | Perigo Urbano
USP-S | Flashback
CZ75-Auto | Açor Vermelho
@heuripedes
heuripedes / autoexec.cfg
Last active December 14, 2020 17:18
configurações CS
// global shadows: high
// model/texture detail: low
// effect detail: high
// shader detail: high or very high
// MSAA: as high as possible
// filtering: bilinear
// fxaa: disabled
// Gamers Club gameboost
mat_queue mod -2