1 // Copyright (c) 2015 Sergio Gonzalez. All rights reserved. 2 // License: https://github.com/serge-rgb/milton#license 3 4 #pragma once 5 6 #define MILTON_MAJOR_VERSION 1 7 #define MILTON_MINOR_VERSION 9 8 #define MILTON_MICRO_VERSION 1 9 10 11 #if !defined(MILTON_DEBUG) // Might be defined by cmake 12 #define MILTON_DEBUG 0 13 #endif 14 15 16 // Debug settings 17 18 #define MILTON_ENABLE_PROFILING 0 19 #define REDRAW_EVERY_FRAME 0 20 #define GRAPHICS_DEBUG 0 21 #define MILTON_ZOOM_DEBUG 0 22 #define STROKE_DEBUG_VIZ 0 23 #define DEBUG_MEMORY_USAGE 0 24 // Windows Debug Options 25 #if defined(_WIN32) 26 // If 1, print to VS console. Debug messages always print to log file. 27 #define WIN32_DEBUGGER_OUTPUT 1 28 #endif 29 30 31 #define MILTON_MULTITHREADED 1 32 33 #define MILTON_HARDWARE_BRUSH_CURSOR 1 34 35 36 // Zoom control 37 #define MINIMUM_SCALE (1 << 4) 38 39 #define SCALE_FACTOR 1.3f 40 #if MILTON_ZOOM_DEBUG 41 #undef SCALE_FACTOR 42 #define SCALE_FACTOR 1.5f 43 #endif 44 45 #define VIEW_SCALE_LIMIT (1 << 16) 46 #if MILTON_ZOOM_DEBUG 47 #undef VIEW_SCALE_LIMIT 48 #define VIEW_SCALE_LIMIT (1 << 20) 49 #endif 50 51 #define DEFAULT_PEEK_OUT_INCREMENT_LOG 2.0 52 53 #define PEEK_OUT_SPEED 20 // ms / increment 54 55 // No support for system cursor on linux or macos for now 56 #if defined(__linux__) || defined(__MACH__) 57 #undef MILTON_HARDWARE_BRUSH_CURSOR 58 #define MILTON_HARDWARE_BRUSH_CURSOR 0 59 #endif 60 61 // Uses GL 2.1 when 0 62 #define USE_GL_3_2 1 63 64 65 // Use 3.2 on macos. OpenGL 3.2 is supported by all mac computers since macOS 10.8.5 66 // https://developer.apple.com/opengl/OpenGL-Capabilities-Tables.pdf 67 #if defined(__MACH__) 68 #undef USE_GL_3_2 69 #define USE_GL_3_2 1 70 #endif 71 72 73 // Spawn threads to save the canvas. 74 #define MILTON_SAVE_ASYNC 1 75 76 // NOTE: Multisampling is no longer supported in Milton. This define is left 77 // in because there is some helper code which I would prefer not to delete. 78 #define MULTISAMPLING_ENABLED 0 79 #define MSAA_NUM_SAMPLES 4 80 81 82 83 // When not in debug mode, disable all debug flags. 84 85 #if !MILTON_DEBUG 86 87 #undef MILTON_ZOOM_DEBUG 88 #define MILTON_ZOOM_DEBUG 0 89 90 #undef WIN32_DEBUGGER_OUTPUT 91 #define WIN32_DEBUGGER_OUTPUT 0 92 93 #undef USE_GL_3_2 94 #define USE_GL_3_2 0 95 96 #undef REDRAW_EVERY_FRAME 97 #define REDRAW_EVERY_FRAME 0 98 99 #undef STROKE_DEBUG_VIZ 100 #define STROKE_DEBUG_VIZ 0 101 102 #undef MILTON_ENABLE_PROFILING 103 #define MILTON_ENABLE_PROFILING 0 104 105 #endif 106