forked from bartvdbraak/blender
Mac / COCOA :
- fix 10.4 compile issues - fix some scons issues & add WITH_BF_COLLADA = False in scons darwin_config.py to allow build waiting for complete Collada Mac implementation
This commit is contained in:
parent
f03257cc1f
commit
93173a6dd4
@ -246,6 +246,9 @@ BF_OPENGL_LIB = 'GL GLU'
|
||||
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
||||
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
|
||||
|
||||
#OpenCollada flags
|
||||
WITH_BF_COLLADA = False
|
||||
|
||||
#############################################################################
|
||||
################### various compile settings and flags ##################
|
||||
#############################################################################
|
||||
|
@ -10,15 +10,6 @@ sources = env.Glob('intern/*.cpp')
|
||||
if window_system == 'darwin':
|
||||
sources += env.Glob('intern/*.mm')
|
||||
|
||||
#if env['WITH_GHOST_COCOA'] == True:
|
||||
# env.Append(CFLAGS=['-DGHOST_COCOA'])
|
||||
# env.Append(CXXFLAGS=['-DGHOST_COCOA'])
|
||||
# env.Append(CPPFLAGS=['-DGHOST_COCOA'])
|
||||
|
||||
#defs = ''
|
||||
#if env['WITH_GHOST_COCOA']:
|
||||
# defs += 'GHOST_COCOA'
|
||||
# maybe we need it later
|
||||
|
||||
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window']
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@ -65,7 +66,7 @@
|
||||
struct ImBuf *imb_cocoaLoadImage(unsigned char *mem, int size, int flags)
|
||||
{
|
||||
struct ImBuf *ibuf = NULL;
|
||||
uint32 width, height;
|
||||
uint32_t width, height;
|
||||
uchar *rasterRGB = NULL;
|
||||
uchar *rasterRGBA = NULL;
|
||||
uchar *toIBuf = NULL;
|
||||
@ -204,7 +205,7 @@ struct ImBuf *imb_cocoaLoadImage(unsigned char *mem, int size, int flags)
|
||||
|
||||
short imb_cocoaSaveImage(struct ImBuf *ibuf, char *name, int flags)
|
||||
{
|
||||
uint16 samplesperpixel, bitspersample;
|
||||
uint16_t samplesperpixel, bitspersample;
|
||||
unsigned char *from = NULL, *to = NULL;
|
||||
unsigned short *to16 = NULL;
|
||||
float *fromf = NULL;
|
||||
@ -224,7 +225,7 @@ short imb_cocoaSaveImage(struct ImBuf *ibuf, char *name, int flags)
|
||||
/* check for a valid number of bytes per pixel. Like the PNG writer,
|
||||
* the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding
|
||||
* to gray, RGB, RGBA respectively. */
|
||||
samplesperpixel = (uint16)((ibuf->depth + 7) >> 3);
|
||||
samplesperpixel = (uint16_t)((ibuf->depth + 7) >> 3);
|
||||
switch (samplesperpixel) {
|
||||
case 4: /*RGBA type*/
|
||||
hasAlpha = YES;
|
||||
|
@ -29,4 +29,7 @@ if env['OURPLATFORM'] == 'linux2':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
|
||||
incs += ' ' + env['BF_PTHREADS_INC']
|
||||
|
||||
if env['WITH_GHOST_COCOA']:
|
||||
sources.remove('intern/wm_apple.c')
|
||||
|
||||
env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defs, libtype=['core'], priority=[5] )
|
||||
|
Loading…
Reference in New Issue
Block a user