Skip to content

Instantly share code, notes, and snippets.

View PoroCYon's full-sized avatar
💭
EB0000EA31C048FFC8

PoroCYon PoroCYon

💭
EB0000EA31C048FFC8
View GitHub Profile
@PoroCYon
PoroCYon / clutter.py
Last active June 17, 2019 15:02 — forked from blackle/clutter.py
Open a shader in a window with ctypes and libclutter
#!/usr/bin/env python3
from ctypes import*
u=CDLL("libc.so.6")
c=CDLL("libclutter-1.0.so.0")
l=CDLL("libgobject-2.0.so.0")
def t(i,*b):i.restype=c_void_p;i.argtypes=[c_void_p]*len(b);return i(*b)
t(c.clutter_init)
g=t(c.clutter_stage_new)
_=t(c.clutter_shader_effect_new,1)
t(c.clutter_shader_effect_set_shader_source,_,b"void main(){cogl_color_out=vec4(cogl_tex_coord_in[0].xyx,1.);}")
@PoroCYon
PoroCYon / gms-bytecode-changes.md
Last active February 27, 2016 20:36
Changes in the new GameMaker: Studio bytecode format (0x0F)

THIS IS OUTDATED, USE THE DOCUMENT HERE INSTEAD!

This might already be out-of-date with my findings, the newest code is on the repo. (But I'll try to keep it updated.)

Types (used here)

name size (bytes), other details
bool 4
byte 1