This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if function.name == 'glFlushMappedBufferRange': | |
print ' GLvoid *map = NULL;' | |
print ' _glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &map);' | |
print ' if (map && length > 0) {' | |
self.emit_memcpy('(const char *)map + offset', 'length') | |
print ' }' | |
if function.name == 'glFlushMappedBufferRangeAPPLE': | |
print ' GLvoid *map = NULL;' | |
print ' _glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &map);' | |
print ' if (map && size > 0) {' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
// For generating hexadecimal prefixes for reversed UInt32 | |
// IDEA : UInt32 represents a unique item id made up of UInt32 containing a prefix (i.e. block) and group item id | |
// prefix is group or block id (usually first 4 bytes) | |
// suffix is group member id (usually last 4 bytes) | |
// REASONING : middle bits left unused so the max group size can be adjusted | |
// even after items are being used | |
namespace LeftShift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkDotNet.Attributes; | |
using System; | |
using System.Diagnostics; | |
using System.Reflection.Emit; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
// Based on fork and see | |
// http://xoofx.com/blog/2010/10/23/high-performance-memcpy-gotchas-in-c/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ExportHelper is a helper class, defines filename and | |
# invoke() function which calls the file selector. | |
import bpy | |
import json | |
import mathutils | |
import os | |
from bpy_extras.io_utils import ExportHelper, axis_conversion | |
from bpy.props import StringProperty, BoolProperty, EnumProperty, FloatProperty, FloatVectorProperty, IntProperty | |
from bpy.types import Operator |