Skip to content

Instantly share code, notes, and snippets.

View tito's full-sized avatar

Mathieu Virbel tito

View GitHub Profile
def get_filled_path(points):
from OpenGL.GLU import gluNewTess, gluTessNormal, gluTessProperty,\
gluTessBeginPolygon, gluTessBeginContour, gluTessEndContour,\
gluTessEndPolygon, gluTessCallback, gluErrorString, gluTessVertex,\
GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO, GLU_TESS_VERTEX,\
GLU_TESS_BEGIN, GLU_TESS_END, GLU_TESS_ERROR, GLU_TESS_COMBINE
tess = gluNewTess()
gluTessNormal(tess, 0, 0, 1)
gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO)
class ConnectionButton(MTWidget):
instances = []
def __init__(self, **kwargs):
super().__init__(**kwargs)
ConnectionButton.instances.append(self)
def on_touch_down(self, touch):
if not self.collide_point(*touch.pos):
return
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/queue.h>
#ifndef WIN32
#include <sys/socket.h>
#include <signal.h>
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#endif
+ in main()
#ifdef WIN32
WORD wVersionRequested;
WSADATA wsaData;
Copyright 2010 Mathieu Virbel and Thomas Hansen
This file is part of Movid.
Movid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Movid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar. If not, see http://www.gnu.org/licenses/.
Hello world
@tito
tito / recipe.sh
Created January 8, 2012 15:44
python-for-android/recipes/cymunk/recipe.sh
#!/bin/bash
VERSION_cymunk=
URL_cymunk=
DEPS_cymunk=(chipmunk python)
MD5_cymunk=
BUILD_cymunk=$BUILD_PATH/cymunk/chipmunk-android
RECIPE_cymunk=$RECIPES_PATH/cymunk
function prebuild_cymunk() {
$ wget http://www.openssl.org/source/openssl-1.0.0e.tar.gz
--2012-02-03 02:20:07-- http://www.openssl.org/source/openssl-1.0.0e.tar.gz
Resolving www.openssl.org... 194.97.152.144
Connecting to www.openssl.org|194.97.152.144|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4040229 (3,9M) [application/x-gzip]
Saving to: `openssl-1.0.0e.tar.gz'
100%[=======================================================================>] 4 040 229 1,18M/s in 3,3s
from kivy.graphics.fbo import Fbo
from kivy.graphics import Rectangle, Color
from kivy.core.gl import glReadPixels, GL_RGBA, GL_UNSIGNED_BYTE
import pygame
def save_texture(texture, filename):
fbo = Fbo(size=texture.size)
fbo.add(Color(1, 1, 1))
fbo.add(Rectangle(size=texture.size, texture=texture))
fbo.draw()
Deflectouch is a multitouch puzzle game.
Draw deflectors on the field, fire the spaceship, and reach the end.
The puzzle have currently 40 levels, to make you happy for a moment :)