Skip to content

Instantly share code, notes, and snippets.

@differenceclouds
differenceclouds / gist:6d70b03c114b8ea9120646698212d676
Last active September 6, 2025 16:55
DrawTextureShear example
void DrawTextureShear(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, Vector2 shear, Color tint)
{
// Check if texture is valid
if (texture.id > 0)
{
float width = (float)texture.width;
float height = (float)texture.height;
bool flipX = false;
@differenceclouds
differenceclouds / gist:ec1b62c6145852bec6e2fda7324a72a7
Last active September 17, 2024 17:22
String manipulation memory leak example
package main
import "core:fmt"
import "core:strings"
//memory debug imports
import "core:log"
import "core:mem"
import "core:c/libc"
Basically....
How do I convert this:
# #
# # #
# # #
# # #
# # #
# # #
# # #
@differenceclouds
differenceclouds / raygui_example
Last active August 15, 2024 15:48
Raygui style loading example
package raygui_example
import rl "vendor:raylib"
main :: proc() {
showMessageBox: bool
rl.ChangeDirectory(rl.GetApplicationDirectory())
rl.InitWindow(640, 480, "Is it a gui")