View capture_desktop_dxgi_gl.c
// | |
// First download glcorearb.h, wglext.h and platform.h files | |
// Then compile: cl.exe capture_desktop_dxgi_gl.c /I. d3d11.lib dxgi.lib dxguid.lib gdi32.lib opengl32.lib user32.lib dwmapi.lib | |
// | |
#define COBJMACROS | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <d3d11.h> |
View webcam_capture.c
#define COBJMACROS | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <mfapi.h> | |
#include <mfidl.h> | |
#include <mfreadwrite.h> | |
#include <stdio.h> | |
#include <intrin.h> |
View raspbian_buster.txt
EGL_VENDOR = Mesa Project | |
EGL_VERSION = 1.4 | |
EGL_CLIENT_APIS = OpenGL OpenGL_ES | |
EGL_EXTENSIONS = EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export | |
// GLES API | |
GL_VENDOR = Broadcom | |
GL_RENDERER = V3D 4.2 | |
GL_VERSION = OpenGL ES 3.0 Mesa 19.1.2 |
View test.c
#include <windows.h> | |
#include <stdio.h> | |
LRESULT CALLBACK WindowProc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam) | |
{ | |
if (msg == WM_TIMER) | |
{ | |
printf("press SPACE now\n"); | |
DWORD tid = GetWindowThreadProcessId(wnd, NULL); |
View ods.c
#include <windows.h> | |
#include <intrin.h> | |
#define Assert(x) do { if (!(x)) __debugbreak(); } while (0) | |
static struct | |
{ | |
DWORD process_id; | |
char data[4096 - sizeof(DWORD)]; | |
}* ods_buffer; |
View main.cpp
/* | |
Minimal Drag and Drop Application for Windows | |
Copright (C) Alexandre LHUILLIER - 2019 | |
=== | |
This application creates an application window and a console window. | |
Whenever you drag a file or a set of files from the Windows explorer | |
to the application window, the absolute paths of the dropped files | |
are printed in the console window. |
View unitypackage2zip.py
#!/usr/bin/env python3 | |
import sys | |
import tarfile | |
import zipfile | |
from pathlib import Path | |
src = sys.argv[1] | |
dst = Path(src).name + ".zip" |
View go_aeshash.h
#include <stddef.h> | |
#include <stdint.h> | |
#include <intrin.h> | |
// see aeshashbody in https://github.com/golang/go/blob/master/src/runtime/asm_amd64.s | |
// this is initialized on process startup with random from system | |
static __declspec(align(16)) uint8_t aeskeysched[128]; | |
static __declspec(align(16)) const uint8_t masks[16][16] = |
View meow_hash_bench.c
#ifdef _MSC_VER | |
#define MEOW_API static __declspec(noinline) | |
#include <intrin.h> | |
#else | |
// assume clang | |
#define MEOW_API static __attribute__((noinline)) | |
#define __rdtsc __builtin_readcyclecounter | |
#endif | |
#include "meow_hash_c.h" |
View meow_hash_armv8.h
/* ======================================================================== | |
Meow - A Fast Non-cryptographic Hash for Large Data Sizes | |
(C) Copyright 2018 by Molly Rocket, Inc. (https://mollyrocket.com) | |
See https://mollyrocket.com/meowhash for details. | |
======================================================================== | |
zlib License |
NewerOlder