Skip to content

Instantly share code, notes, and snippets.

View fesoliveira014's full-sized avatar

Felipe Santos fesoliveira014

View GitHub Profile
@raysan5
raysan5 / raylib_vs_sdl.md
Last active July 8, 2025 18:03
raylib vs SDL - A libraries comparison

raylib_vs_sdl

In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.

Hope it helps future users to better understand this two libraries internals and functionality.

Table of Content

@alaingalvan
alaingalvan / sobol.cpp
Last active June 4, 2020 06:14
Sobol Quasi-Random Sequence Generation by Dr. John Burkardt. Forked to not use cout errors, use less dimensions (saving code size)
/**
* Sobol Noise Generation
* GNU LGPL license
* By Dr. John Burkardt (Virginia Tech)
* https://gist.github.com/alaingalvan/af92ddbaf3bb01f5ef29bc431bd37891
*/
//returns the position of the high 1 bit base 2 in an integer n
int getHighBit1(int n)
{
@alaingalvan
alaingalvan / halton.cpp
Last active December 5, 2020 03:28
Ray Tracing Gem's Halton State code, by Electronic Arts, Colin Barré-Brisebois et al. Errata corrected by Alain Galvan.
// Ray Tracing Gems Chapter 25
// Code provided by Electronic Arts
// Colin Barré-Brisebois, Henrik Halén, Graham Wihlidal, Andrew Lauritzen,
// Jasper Bekkers, Tomasz Stachowiak, and Johan Andersson
// Errata corrected by Alain Galvan
struct HaltonState
{
unsigned dimension;
@ethereumdegen
ethereumdegen / BlockHeightMap.java
Created January 15, 2019 17:14
Voxel Engine Snippets
package mygame.voxelengine.mapping;
import com.jme3.scene.Node;
import mygame.MainApp;
import mygame.SharedData;
import mygame.gameobjects.EasyQuad;
import mygame.voxelengine.MarchingVoxelTerrain;
import mygame.voxelengine.Vector3Int;
@george731
george731 / Readme.rst
Last active December 12, 2019 02:39
Streamlabs TLDR
@JSandusky
JSandusky / BasicDensityCalc.cl
Created December 3, 2016 04:00
OpenCL Naive Surface nets
// Fills a grid of density values, the grid is vertex based, so for a 64^3 cells the grid must be 65^3 to include the extra vertex for the last cell
// This code expects to be combined with other code for a "DensityFunc" before being compiled.
#define VERTEX_SIZE 65
int vertex_index(const int4 pos)
{
int x = clamp(pos.x, 0, VERTEX_SIZE - 1);
int y = clamp(pos.y, 0, VERTEX_SIZE - 1);
int z = clamp(pos.z, 0, VERTEX_SIZE - 1);

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Ethan-Bierlein
Ethan-Bierlein / gist:0c42c2313bf3d747c642fc994b9fa8a6
Last active August 16, 2016 20:09
Voxel Lighting Algorithm
/// <summary>
/// Generate lighting for an individual voxel.
/// </summary>
/// <param name="x">The x coordinate of the voxel.</param>
/// <param name="y">The y coordinate of the voxel.</param>
/// <param name="z">The y coordinate of the voxel.</param>
public void GenerateIndividualVoxelLighting(int x, int y, int z)
{
Voxel currentVoxel = this.FetchVoxel(x, y, z);
Voxel currentVoxelUp = this.FetchVoxel(x, y + 1, z);