Skip to content

Instantly share code, notes, and snippets.

View skogler's full-sized avatar

Samuel Kogler skogler

  • Graz, Austria
  • 19:52 (UTC +02:00)
View GitHub Profile
@skogler
skogler / sdl2warpmouse.cpp
Last active July 7, 2017 16:15
SDL2_WarpMouseInWindow DeathAdder 2013 bug
/**
*
* This example demonstrates a bug with SDL2 and the Razer DeathAdder 2013
* mouse on Linux. There might be other configurations where this bug occurs.
*
* Press and hold the middle mouse button. This shows a 'Chat wheel' dummy.
* Move the mouse a bit while holding the middle mouse button. After releasing
* the middle mouse button, the cursor position should be restored to its
* original position.
*
@skogler
skogler / Ogre GLSL uniform struct problem
Last active December 20, 2015 23:29
Ogre GLSL uniform struct problem
// definition in GLSL fragment shader:
#version 120
struct Light
{
vec4 positionObjSpace;
vec4 specular;
vec4 diffuse;
};