Skip to content

Instantly share code, notes, and snippets.

View trentpolack's full-sized avatar

Trent Polack trentpolack

View GitHub Profile
@trentpolack
trentpolack / Fun With Macros.md
Last active July 18, 2019 19:13
Old-School #pragma Messages to Yourself

The Ol' #pragma Message

For particularly necessary to-do reminders, the JM_TODO macro below will print to the build console (and on the warning/error list) as a trivial warning -- so it won't interfere with builds that treat warnings as errrors. Then you can just double-click it and jump to that spot.

jmtodo-in-action

The Code

#define JM_PRAGMA_STRING2(x) #x
#define JM_PRAGMA_STRING(x) JM_PRAGMA_STRING2(x)
@trentpolack
trentpolack / typemap
Last active September 8, 2024 14:44
Perforce Typemap (UE4-focused)
# Perforce File Type Mapping Specifications.
#
# TypeMap: a list of filetype mappings; one per line.
# Each line has two elements:
#
# Filetype: The filetype to use on 'p4 add'.
#
# Path: File pattern which will use this filetype.
#
# See 'p4 help typemap' for more information.
@trentpolack
trentpolack / WebGL-frameworks-libraries.md
Created June 2, 2018 23:04 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • AwayJS: AwayJS is a graphics library for javascript written in typescript
  • SceneJS: An extensible WebGL-based engine for high-detail 3D visualisation
@trentpolack
trentpolack / UE4EditorViewLocation.cpp
Created July 6, 2018 01:07
Get the actual camera location in the UE4 viewport? MAYBE?
auto world = GetWorld();
if(world == nullptr)
return;
auto viewLocations = world->ViewLocationsRenderedLastFrame;
if(viewLocations.Num() == 0)
return;
FVector camLocation = viewLocations[0];