Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Lelong rotoglup

View GitHub Profile
@rotoglup
rotoglup / minimal-metal-app.mm
Last active May 20, 2021
Minimal OSX Metal Application, single file
View minimal-metal-app.mm
#include <Cocoa/Cocoa.h>
#import <Metal/Metal.h>
#import <MetalKit/MetalKit.h>
#import <simd/simd.h>
// BUG: on OSX 10.15.6, the App menu is not clickable at the first activation, but becomes so after switching to another app
//----------------------------------------------------------------------------
View 202006 - notes about tools.md

Conan (on Windows)

  • conan search <name> -r conan-center

What I liked :

  • easy install through python's pip

What I don't like :

@rotoglup
rotoglup / Blender scripting notes.md
Last active Feb 9, 2021
Some Blender 2.80 scripting notes
View Blender scripting notes.md

Cycles

I had crashes while scripting the CUDA devices selection (b3d v2.83 + 4x GTX 2080 GPU).

The original code was :

preferences = bpy.context.preferences
cycles_preferences = preferences.addons["cycles"].preferences
cuda_devices, opencl_devices = cycles_preferences.get_devices()
@rotoglup
rotoglup / Code refactor, thoughts.md
Last active Dec 7, 2020
Code refactor, thoughts
View Code refactor, thoughts.md

Some thoughts about code structure, as I read code, and find some things some hard to follow than others.

Booleans are values

(m_ui.SomeCheckBox->checkState() == Qt::CheckState::Checked) ? true : false

Should probably just be

View 202011 - Inspiring non-programming.md
@rotoglup
rotoglup / GIT usage.md
Last active Nov 24, 2020
Notes about my usage of GIT
View GIT usage.md

My GIT habits :

  • On Windows, through GIT bash

  • No UI, except occasional gitk --all& to visually check branches and commits

  • Use git fetch then git merge --ff-only origin/master

    • I don't like git pull auto-merging feature that messes up the history
  • Use git add -p to :

    • make a quick review of changes before commit
@rotoglup
rotoglup / 202005 - notes about c-c++ libraries.md
Last active Nov 15, 2020
Random notes while using random libraries
View 202005 - notes about c-c++ libraries.md
@rotoglup
rotoglup / MetalConstants.h
Last active Oct 1, 2020
Definition of some Metal constant values
View MetalConstants.h
//******************************************************************************
//
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
View 202005 - notes about system configuration
* `Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private`
@rotoglup
rotoglup / 201909 - a look into threejs editor.md
Last active May 19, 2020
201909 - A look into threejs editor app
View 201909 - a look into threejs editor.md

A look into threejs editor

My notes while reading the source code from threejs Editor app, as I've been curious about :

  • the editor architecture
  • the undo/redo system
  • the camera control behaviour & code
  • the object transform gizmos behaviours & code