Skip to content

Instantly share code, notes, and snippets.

View eXpl0it3r's full-sized avatar

Lukas Dürrenberger eXpl0it3r

View GitHub Profile

API Design: Coroutines APIs (Janurary-2017)

I am currently dealing with a lot of libraries at work. Both third party as well as libraries written or being currently in process of being written by me. I absolutely love writing and working with libraries. Especially if they present or bring me to either a new or different approach to solve a problem. Or at least provide a different view.

Over time I noticed however that quite regulary we had to decide that we cannot use a third party library. Often it is the usual reason.

@eliasdaler
eliasdaler / OBB.cpp
Last active October 26, 2023 20:14
OBB collision check and resolution using SAT (SFML, 2D)
// SAT collision check and resolution
// Public domain
// Usage example:
// if (testCollision(obb1, obb2, mtv)) { // obb1, obb2 - sf::RectangleShape, mtv - sf::Vector2f
// obb1.move(mtv);
// }
static const float NORMAL_TOLERANCE = 0.0001f;
using RectVertexArray = std::array<sf::Vector2f, 4>;
@eriknelson
eriknelson / convert_to_2_2.patch
Last active January 21, 2019 17:49
SFML 2.3 + wxWidgets 3.0 Integration Demo
diff --git a/main.cpp b/main.cpp
index 6894ff3..935137f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -60,6 +60,16 @@ struct wxSfmlCanvas : public wxControl, public sf::RenderWindow
#endif
}
+ void setwxWindowSize(const wxSize& size)
+ {
@binary1248
binary1248 / PacketTest.cpp
Created October 3, 2014 17:53
SFML sf::Packet test
#include <SFML/Network.hpp>
#include <random>
#include <string>
#include <cstdint>
#include <iostream>
struct uniform_bool_distribution
{
public:
typedef bool result_type;