Skip to content

Instantly share code, notes, and snippets.

@sonygod
sonygod / CMakeLists.txt
Created October 17, 2021 05:02 — forked from UnaNancyOwen/CMakeLists.txt
CMakeLists for OpenCV that installed using Vcpkg
cmake_minimum_required( VERSION 3.0 )
set( CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" )
# Create Project
project( solution )
add_executable( project main.cpp )
# Set OpenCVConfig.cmake Search Directory
set( OpenCV_DIR )
if( NOT CMAKE_CL_64 )
@sonygod
sonygod / blscript_save_viewport_buffer_as_image.py
Created December 3, 2021 01:30 — forked from a-nakanosora/blscript_save_viewport_buffer_as_image.py
Blender Script - Save viewport buffer as an image
''' blscript_save_viewport_buffer_as_image.py
'''
import bpy
import bgl
def main():
def get_region_view3d():
'''
context = bpy.context
@sonygod
sonygod / arrayFunction.cpp
Created November 22, 2022 08:21 — forked from jonathanlurie/arrayFunction.cpp
Emscripten and float arrays v2
#include <math.h>
// otherwise C++ function names are mangled
extern "C" {
void float_multiply_array(float *data, int w, int h, int ncpp) {
int length = w*h;
int currentPixelIndex = 0;