Skip to content

Instantly share code, notes, and snippets.

View TheSpydog's full-sized avatar

Caleb Cornett TheSpydog

View GitHub Profile
@TheSpydog
TheSpydog / gist:a1e95ff953f4443dbc04f722ff281cd8
Last active June 22, 2024 10:42
Setting up FNA for UWP
YOUR APP:
- Make sure in App Properties, “Min version” must be Fall Creators Edition (16.....)
- In Package.appxmanifest, change the Entry point to <NAMESPACE>.<MAINCLASS>, not the XAML stuff.
- In fact you should get rid of all XAML Files.
FNALIBS:
For all dependencies:
- Compile in 64-bit Release mode.
- Retarget to latest build versions if necessary, but try to keep Min Windows SDK to Fall Creators Edition.
- If any project asks you to retarget, right click the SOLUTION (not the project) and click Retarget Solution.
=======================
SDL_uikitappdelegate.m
=======================
Add this code underneath "static int exit_status;":
typedef int (*SDL_MAIN_FUNC)(void);
static SDL_MAIN_FUNC MainFunc;
extern void SetMainFunc(SDL_MAIN_FUNC func)
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
@TheSpydog
TheSpydog / lookuptest.cs
Last active January 6, 2020 09:09
C# Lookup Perf Test
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace LookupTest
{
class MainClass
{
class MyTestClass
changeset: 1194:ee0b613094d8
tag: tip
user: Caleb Cornett <[email protected]>
date: Sat Apr 06 21:34:25 2019 -0400
summary: Add PROFILE_GLSLES CMake option
diff -r 4decf307c228 -r ee0b613094d8 CMakeLists.txt
--- a/CMakeLists.txt Wed Mar 06 15:09:49 2019 -0500
+++ b/CMakeLists.txt Sat Apr 06 21:34:25 2019 -0400
@@ -5,6 +5,7 @@
@TheSpydog
TheSpydog / buildlog.txt
Created July 27, 2019 19:54
tvOS build log
Building solution tvIncrementalBuildTest (Debug|iPhone)
Build started 7/27/2019 3:53:03 PM.
__________________________________________________
Project "/Users/calebcornett/Projects/tvIncrementalBuildTest/tvIncrementalBuildTest/tvIncrementalBuildTest.csproj" (Build target(s)):
Target _BeforeCoreCompileInterfaceDefinitions:
Skipping target "_BeforeCoreCompileInterfaceDefinitions" because all output files are up-to-date with respect to the input files.
Target _CoreCompileInterfaceDefinitions:
Skipping target "_CoreCompileInterfaceDefinitions" because all output files are up-to-date with respect to the input files.
@TheSpydog
TheSpydog / sdl2_metal_clearscreen.m
Last active June 6, 2023 12:31
SDL_Metal Clear Screen Example
/* Requires >= SDL 2.0.11 (not yet released)
* Also requires a patch that has not yet been merged:
* https://bugzilla.libsdl.org/show_bug.cgi?id=4796
*/
#include <SDL.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
int main(int argc, char **argv) {
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace VertexSamplerTest
{
public class Program
{
public static void Main(string[] args)
{
/* Mostly ripped off from MonoGame's unit tests. */
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
class GetSetBufferTest : Game
{
VertexPositionTexture[] savedData = new VertexPositionTexture[]
{
/* SpriteBatch Stress Test
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;