Skip to content

Instantly share code, notes, and snippets.

View jimon's full-sized avatar

Dmytro Ivanov jimon

  • Stockholm, Sweden
View GitHub Profile
diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp
index c8164115a..dd3787c96 100644
--- a/src/renderer_gl.cpp
+++ b/src/renderer_gl.cpp
@@ -1435,14 +1435,19 @@ namespace bgfx { namespace gl
if (bimg::isCompressed(bimg::TextureFormat::Enum(_format) ) )
{
- for (uint32_t ii = 0, dim = _dim; ii < (_mipmaps ? 5u : 1u) && 0 == err; ++ii, dim >>= 1)
- {
@jimon
jimon / music.md
Last active November 17, 2017 13:10

music

just my personal notes about music theory

what is a chord

2+ notes played together

distance from root note

# into the dim mobile game, lock puzzle fuzzer
# was too lazy to figure out some lock puzzles - here a bruteforce solution
class Pos:
def __init__(self, x, y):
self.x = x
self.y = y
class Map:
def __init__(self, w, h):
Achievement Engine/Game
storing world space positions in gbuffer STALKER
uploaded texture upside down All Quake engines
fixed function pipeline on top of a single vertex buffer Tesseract
made your own texture compression format that works with the driver's decoder somehow Darkplaces (S2TC)
cleared color, depth and stencil buffers individually idTech4
line rendering with quads Various
per-vertex lighting Cube, Minecraft, Gears of War, Skyrim
used facet normals
@jimon
jimon / crawler.py
Last active July 21, 2016 08:43
imap unique mails crawler
import imaplib, email, json
def chunks(l, n):
for i in range(0, len(l), n):
yield l[i:i+n]
def split_addrs(s):
if not(s): return []
outQ = True
cut = -1
@jimon
jimon / 0 - UNIX Fifth Edition
Created April 2, 2016 21:59
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c
main(argc, argv)
int argc;
char *argv[];
{
int i;
argc--;
for(i=1; i<=argc; i++)
printf("%s%c", argv[i], i==argc? '\n': ' ');
}