[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [61590] trunk/lib/win64_vc14/ freetype: MSVC 2015 windows x64 freetype 2.5.3

2016-01-02 Thread Martijn Berger
Revision: 61590
  https://developer.blender.org/rBL61590
Author:   juicyfruit
Date: 2016-01-02 10:53:11 + (Sat, 02 Jan 2016)
Log Message:
---
MSVC 2015 windows x64 freetype 2.5.3

Added Paths:
---
trunk/lib/win64_vc14/freetype/
trunk/lib/win64_vc14/freetype/build.bat
trunk/lib/win64_vc14/freetype/include/
trunk/lib/win64_vc14/freetype/include/freetype2/
trunk/lib/win64_vc14/freetype/include/freetype2/config/
trunk/lib/win64_vc14/freetype/include/freetype2/config/ftconfig.h
trunk/lib/win64_vc14/freetype/include/freetype2/config/ftheader.h
trunk/lib/win64_vc14/freetype/include/freetype2/config/ftmodule.h
trunk/lib/win64_vc14/freetype/include/freetype2/config/ftoption.h
trunk/lib/win64_vc14/freetype/include/freetype2/config/ftstdlib.h
trunk/lib/win64_vc14/freetype/include/freetype2/freetype.h
trunk/lib/win64_vc14/freetype/include/freetype2/ft2build.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftadvanc.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftautoh.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftbbox.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftbdf.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftbitmap.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftbzip2.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftcache.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftcffdrv.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftchapters.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftcid.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftconfig.h
trunk/lib/win64_vc14/freetype/include/freetype2/fterrdef.h
trunk/lib/win64_vc14/freetype/include/freetype2/fterrors.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftgasp.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftglyph.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftgxval.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftgzip.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftimage.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftincrem.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftlcdfil.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftlist.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftlzw.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftmac.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftmm.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftmodapi.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftmoderr.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftotval.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftoutln.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftpfr.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftrender.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftsizes.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftsnames.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftstroke.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftsynth.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftsystem.h
trunk/lib/win64_vc14/freetype/include/freetype2/fttrigon.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftttdrv.h
trunk/lib/win64_vc14/freetype/include/freetype2/fttypes.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftwinfnt.h
trunk/lib/win64_vc14/freetype/include/freetype2/ftxf86.h
trunk/lib/win64_vc14/freetype/include/freetype2/t1tables.h
trunk/lib/win64_vc14/freetype/include/freetype2/ttnameid.h
trunk/lib/win64_vc14/freetype/include/freetype2/tttables.h
trunk/lib/win64_vc14/freetype/include/freetype2/tttags.h
trunk/lib/win64_vc14/freetype/include/freetype2/ttunpat.h
trunk/lib/win64_vc14/freetype/lib/
trunk/lib/win64_vc14/freetype/lib/freetype2ST.lib
trunk/lib/win64_vc14/freetype/lib/freetype2ST_d.lib

Added: trunk/lib/win64_vc14/freetype/build.bat
===
--- trunk/lib/win64_vc14/freetype/build.bat (rev 0)
+++ trunk/lib/win64_vc14/freetype/build.bat 2016-01-02 10:53:11 UTC (rev 
61590)
@@ -0,0 +1,47 @@
+@Echo off
+
+cd freetype-2.5.3
+
+set LIBDIR=%CD%\..\..
+
+:: /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib /NODEFAULTLIB:msvcrt.lib 
/NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib
+
+:: create build directory
+mkdir build\windows
+cd build\windows
+
+cmake -G "Visual Studio 12 2013 Win64" ..\..\ ^
+ -DCMAKE_INSTALL_PREFIX=%LIBDIR%\freetype ^
+ -DCMAKE_CXX_FLAGS_DEBUG="/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" ^
+ -DCMAKE_CXX_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /D NDEBUG" ^
+ -DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2 /D NDEBUG" ^
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="/MT /Zi /O2 /Ob1 /D NDEBUG" ^
+ -DCMAKE_RELEASE_POSTFIX:STRING="2ST" ^
+ -DCMAKE_DEBUG_POSTFIX:STRING="2ST_d" ^
+ -DCMAKE_BUILD_TYPE=Release
+ 
+msbuild /p:Configuration=Release /t:Build  /p:Platform="x64" freetype.sln
+msbuild 

[Bf-blender-cvs] [66bea2d] master: Fix compilation error on Windows

2016-01-02 Thread Sergey Sharybin
Commit: 66bea2d77e0416bee3d3f49ee3d820adfd80f922
Author: Sergey Sharybin
Date:   Sat Jan 2 13:17:39 2016 +0500
Branches: master
https://developer.blender.org/rB66bea2d77e0416bee3d3f49ee3d820adfd80f922

Fix compilation error on Windows

===

M   extern/libmv/third_party/gflags/gflags/gflags_declare.h

===

diff --git a/extern/libmv/third_party/gflags/gflags/gflags_declare.h 
b/extern/libmv/third_party/gflags/gflags/gflags_declare.h
index 9b85f46..197197d 100644
--- a/extern/libmv/third_party/gflags/gflags/gflags_declare.h
+++ b/extern/libmv/third_party/gflags/gflags/gflags_declare.h
@@ -47,7 +47,7 @@
 
 // We always want to import the symbols of the gflags library
 #ifndef GFLAGS_DLL_DECL
-#  if 1 && defined(_MSC_VER)
+#  if 0 && defined(_MSC_VER)
 #define GFLAGS_DLL_DECL __declspec(dllimport)
 #  else
 #define GFLAGS_DLL_DECL
@@ -56,7 +56,7 @@
 
 // We always want to import variables declared in user code
 #ifndef GFLAGS_DLL_DECLARE_FLAG
-#  ifdef _MSC_VER
+#  if 0 && defined(_MSC_VER)
 #define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
 #  else
 #define GFLAGS_DLL_DECLARE_FLAG

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [61588] trunk/lib/win64_vc14/ pthreads: MSVC 2015 windows x64 pthreads

2016-01-02 Thread Martijn Berger
Revision: 61588
  https://developer.blender.org/rBL61588
Author:   juicyfruit
Date: 2016-01-02 10:30:42 + (Sat, 02 Jan 2016)
Log Message:
---
MSVC 2015 windows x64 pthreads

Added Paths:
---
trunk/lib/win64_vc14/pthreads/
trunk/lib/win64_vc14/pthreads/include/
trunk/lib/win64_vc14/pthreads/include/pthread.h
trunk/lib/win64_vc14/pthreads/include/sched.h
trunk/lib/win64_vc14/pthreads/include/semaphore.h
trunk/lib/win64_vc14/pthreads/lib/
trunk/lib/win64_vc14/pthreads/lib/pthreadVC2.dll
trunk/lib/win64_vc14/pthreads/lib/pthreadVC2.lib

Added: trunk/lib/win64_vc14/pthreads/include/pthread.h
===
--- trunk/lib/win64_vc14/pthreads/include/pthread.h 
(rev 0)
+++ trunk/lib/win64_vc14/pthreads/include/pthread.h 2016-01-02 10:30:42 UTC 
(rev 61588)
@@ -0,0 +1,1416 @@
+/* This is an implementation of the threads API of POSIX 1003.1-2001.
+ *
+ * --
+ *
+ *  Pthreads-win32 - POSIX Threads Library for Win32
+ *  Copyright(C) 1998 John E. Bossom
+ *  Copyright(C) 1999,2012 Pthreads-win32 contributors
+ *
+ *  Homepage1: http://sourceware.org/pthreads-win32/
+ *  Homepage2: http://sourceforge.net/projects/pthreads4w/
+ *
+ *  The current list of contributors is contained
+ *  in the file CONTRIBUTORS included with the source
+ *  code distribution. The list can also be seen at the
+ *  following World Wide Web location:
+ *  http://sources.redhat.com/pthreads-win32/contributors.html
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library in the file COPYING.LIB;
+ *  if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#if !defined( PTHREAD_H )
+#define PTHREAD_H
+
+/*
+ * See the README file for an explanation of the pthreads-win32 version
+ * numbering scheme and how the DLL is named etc.
+ */
+#define PTW32_VERSION 2,10,0,0
+#define PTW32_VERSION_STRING "2, 10, 0, 0\0"
+
+/* There are three implementations of cancel cleanup.
+ * Note that pthread.h is included in both application
+ * compilation units and also internally for the library.
+ * The code here and within the library aims to work
+ * for all reasonable combinations of environments.
+ *
+ * The three implementations are:
+ *
+ *   WIN32 SEH
+ *   C
+ *   C++
+ *
+ * Please note that exiting a push/pop block via
+ * "return", "exit", "break", or "continue" will
+ * lead to different behaviour amongst applications
+ * depending upon whether the library was built
+ * using SEH, C++, or C. For example, a library built
+ * with SEH will call the cleanup routine, while both
+ * C++ and C built versions will not.
+ */
+
+/*
+ * Define defaults for cleanup code.
+ * Note: Unless the build explicitly defines one of the following, then
+ * we default to standard C style cleanup. This style uses setjmp/longjmp
+ * in the cancellation and thread exit implementations and therefore won't
+ * do stack unwinding if linked to applications that have it (e.g.
+ * C++ apps). This is currently consistent with most/all commercial Unix
+ * POSIX threads implementations.
+ */
+#if !defined( __CLEANUP_SEH ) && !defined( __CLEANUP_CXX ) && !defined( 
__CLEANUP_C )
+/*
+   [i_a] fix for apps using pthreads-Win32: when they do not define 
__CLEANUP_SEH themselves,
+ they're screwed as they'll receive the '__CLEANUP_C' macros which do 
NOT work when
+the pthreads library code itself has actually been build with 
__CLEANUP_SEH,
+which is the case when building this stuff in MSVC.
+
+Hence this section is made to 'sensibly autodetect' the 
cleanup mode, when it hasn't
+been hardwired in the makefiles / project files.
+
+After all, who expects he MUST define one of these 
__CLEANUP_XXX defines in his own
+code when using pthreads-Win32, for whatever reason.
+ */
+#if (defined(_MSC_VER) || defined(PTW32_RC_MSC))
+#define __CLEANUP_SEH
+#elif defined(__cplusplus)
+#define __CLEANUP_CXX
+#else
+#define __CLEANUP_C
+#endif
+#endif
+
+#if defined( __CLEANUP_SEH ) && ( !defined( _MSC_VER ) && 
!defined(PTW32_RC_MSC))
+#error ERROR 

[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [61589] trunk/lib/win64_vc14: MSVC 2015 windows x64 thumbnailer and wintab ( copied from msvc 2013)

2016-01-02 Thread Martijn Berger
Revision: 61589
  https://developer.blender.org/rBL61589
Author:   juicyfruit
Date: 2016-01-02 10:50:07 + (Sat, 02 Jan 2016)
Log Message:
---
MSVC 2015 windows x64 thumbnailer and wintab ( copied from msvc 2013)

Added Paths:
---
trunk/lib/win64_vc14/thumbhandler/
trunk/lib/win64_vc14/thumbhandler/lib/
trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb.dll
trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb64.dll
trunk/lib/win64_vc14/thumbhandler/readme.txt
trunk/lib/win64_vc14/thumbhandler/src/
trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.def
trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.rc
trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.vcxproj
trunk/lib/win64_vc14/thumbhandler/src/BlenderThumb.cpp
trunk/lib/win64_vc14/thumbhandler/src/Dll.cpp
trunk/lib/win64_vc14/wintab/
trunk/lib/win64_vc14/wintab/include/
trunk/lib/win64_vc14/wintab/include/pktdef.h
trunk/lib/win64_vc14/wintab/include/wintab.h

Added: trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb.dll
===
(Binary files differ)

Index: trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb.dll
===
--- trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb.dll2016-01-02 
10:30:42 UTC (rev 61588)
+++ trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb.dll2016-01-02 
10:50:07 UTC (rev 61589)

Property changes on: trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb.dll
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb64.dll
===
(Binary files differ)

Index: trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb64.dll
===
--- trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb64.dll  2016-01-02 
10:30:42 UTC (rev 61588)
+++ trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb64.dll  2016-01-02 
10:50:07 UTC (rev 61589)

Property changes on: trunk/lib/win64_vc14/thumbhandler/lib/BlendThumb64.dll
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/win64_vc14/thumbhandler/readme.txt
===
--- trunk/lib/win64_vc14/thumbhandler/readme.txt
(rev 0)
+++ trunk/lib/win64_vc14/thumbhandler/readme.txt2016-01-02 10:50:07 UTC 
(rev 61589)
@@ -0,0 +1,7 @@
+This is BF code, but is in the libs folder because:
+
+* It has to be dynamic. The build systems aren't set up to create DLLs from 
source.
+* Building requires both the Windows SDK and Visual Studio (for a header file).
+* Since the DLL is loaded by Explorer, architecture is strict: the x86 build 
fails on x64
+  Windows. We need to ship both builds in x86 packages, and once again the 
build systems
+  can't handle that.
\ No newline at end of file

Added: trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.def
===
--- trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.def
(rev 0)
+++ trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.def2016-01-02 
10:50:07 UTC (rev 61589)
@@ -0,0 +1,5 @@
+EXPORTS
+DllGetClassObject   PRIVATE
+DllCanUnloadNow PRIVATE
+DllRegisterServer   PRIVATE
+DllUnregisterServer PRIVATE
\ No newline at end of file

Added: trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.rc
===
--- trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.rc 
(rev 0)
+++ trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.rc 2016-01-02 10:50:07 UTC 
(rev 61589)
@@ -0,0 +1,26 @@
+#define IDR_VERSION1 1
+
+IDR_VERSION1 VERSIONINFO
+FILEVERSION 1,3,0,0
+PRODUCTVERSION 2,60,0,0
+FILEOS 0x0004
+FILETYPE 0x0002
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+BLOCK "04B0"
+BEGIN
+  VALUE "FileVersion", "1.3\0"
+  VALUE "ProductVersion", "2.60\0"
+  VALUE "FileDescription", "Blender Thumbnail Handler\0"
+  VALUE "OriginalFilename", "BlendThumb.dll\0"
+  VALUE "ProductName", "Blender\0"
+  VALUE "LegalCopyright", "GPL2, 2011\0"
+END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+VALUE "Translation", 0x, 0x04B0
+  END
+END
+

Added: trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.vcxproj
===
--- trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.vcxproj
(rev 0)
+++ trunk/lib/win64_vc14/thumbhandler/src/BlendThumb.vcxproj2016-01-02 
10:50:07 UTC (rev 61589)

[Bf-blender-cvs] [c2bd260] master: GPU buffers: Add update functionality for existing buffers.

2016-01-02 Thread Antony Riakiotakis
Commit: c2bd260122c5d05d92a843fb5c3a8b60c7425b73
Author: Antony Riakiotakis
Date:   Sat Jan 2 19:55:15 2016 +0100
Branches: master
https://developer.blender.org/rBc2bd260122c5d05d92a843fb5c3a8b60c7425b73

GPU buffers: Add update functionality for existing buffers.

Only used for color for now, but we need this for any kind of buffer
updates actually.

This should get rid of some allocation/deallocation, making
vertex painting a bit faster.

===

M   source/blender/gpu/intern/gpu_buffers.c

===

diff --git a/source/blender/gpu/intern/gpu_buffers.c 
b/source/blender/gpu/intern/gpu_buffers.c
index 3c44811..a2a604f 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -483,10 +483,9 @@ static GPUBuffer *gpu_try_realloc(GPUBufferPool *pool, 
GPUBuffer *buffer, size_t
 }
 
 static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
-   int type, void *user)
+   int type, void *user, GPUBuffer *buffer)
 {
GPUBufferPool *pool;
-   GPUBuffer *buffer;
float *varray;
int *mat_orig_to_new;
int i;
@@ -500,9 +499,11 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, 
GPUDrawObject *object,
BLI_mutex_lock(_mutex);
 
/* alloc a GPUBuffer; fall back to legacy mode on failure */
-   if (!(buffer = gpu_buffer_alloc_intern(size))) {
-   BLI_mutex_unlock(_mutex);
-   return NULL;
+   if (!buffer) {
+   if (!(buffer = gpu_buffer_alloc_intern(size))) {
+   BLI_mutex_unlock(_mutex);
+   return NULL;
+   }
}
 
mat_orig_to_new = MEM_mallocN(sizeof(*mat_orig_to_new) * dm->totmat,
@@ -601,10 +602,9 @@ static size_t gpu_buffer_size_from_type(DerivedMesh *dm, 
GPUBufferType type)
 }
 
 /* call gpu_buffer_setup with settings for a particular type of buffer */
-static GPUBuffer *gpu_buffer_setup_type(DerivedMesh *dm, GPUBufferType type)
+static GPUBuffer *gpu_buffer_setup_type(DerivedMesh *dm, GPUBufferType type, 
GPUBuffer *buf)
 {
void *user_data = NULL;
-   GPUBuffer *buf;
 
/* special handling for MCol and UV buffers */
if (type == GPU_BUFFER_COLOR) {
@@ -616,14 +616,14 @@ static GPUBuffer *gpu_buffer_setup_type(DerivedMesh *dm, 
GPUBufferType type)
return NULL;
}
 
-   buf = gpu_buffer_setup(dm, dm->drawObject, type, user_data);
+   buf = gpu_buffer_setup(dm, dm->drawObject, type, user_data, buf);
 
return buf;
 }
 
 /* get the buffer of `type', initializing the GPUDrawObject and
  * buffer if needed */
-static GPUBuffer *gpu_buffer_setup_common(DerivedMesh *dm, GPUBufferType type)
+static GPUBuffer *gpu_buffer_setup_common(DerivedMesh *dm, GPUBufferType type, 
bool update)
 {
GPUBuffer **buf;
 
@@ -632,14 +632,16 @@ static GPUBuffer *gpu_buffer_setup_common(DerivedMesh 
*dm, GPUBufferType type)
 
buf = gpu_drawobject_buffer_from_type(dm->drawObject, type);
if (!(*buf))
-   *buf = gpu_buffer_setup_type(dm, type);
+   *buf = gpu_buffer_setup_type(dm, type, NULL);
+   else if (update)
+   *buf = gpu_buffer_setup_type(dm, type, *buf);
 
return *buf;
 }
 
 void GPU_vertex_setup(DerivedMesh *dm)
 {
-   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_VERTEX))
+   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_VERTEX, false))
return;
 
glEnableClientState(GL_VERTEX_ARRAY);
@@ -651,7 +653,7 @@ void GPU_vertex_setup(DerivedMesh *dm)
 
 void GPU_normal_setup(DerivedMesh *dm)
 {
-   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_NORMAL))
+   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_NORMAL, false))
return;
 
glEnableClientState(GL_NORMAL_ARRAY);
@@ -663,7 +665,7 @@ void GPU_normal_setup(DerivedMesh *dm)
 
 void GPU_uv_setup(DerivedMesh *dm)
 {
-   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_UV))
+   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_UV, false))
return;
 
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -675,7 +677,7 @@ void GPU_uv_setup(DerivedMesh *dm)
 
 void GPU_texpaint_uv_setup(DerivedMesh *dm)
 {
-   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_UV_TEXPAINT))
+   if (!gpu_buffer_setup_common(dm, GPU_BUFFER_UV_TEXPAINT, false))
return;
 
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -692,6 +694,8 @@ void GPU_texpaint_uv_setup(DerivedMesh *dm)
 
 void GPU_color_setup(DerivedMesh *dm, int colType)
 {
+   bool update = false;
+
if (!dm->drawObject) {
/* XXX Not really nice, but we need a valid gpu draw object to 
set the colType...
 * Else we would have to add a new param to 
gpu_buffer_setup_common. 

[Bf-blender-cvs] [d48abb8] master: Get rid of yet another instance of DM_DRAW_OPTION_NO_MCOL

2016-01-02 Thread Antony Riakiotakis
Commit: d48abb8ffd5fe64b30de47e90e20321c458a4a8a
Author: Antony Riakiotakis
Date:   Sun Jan 3 00:26:28 2016 +0100
Branches: master
https://developer.blender.org/rBd48abb8ffd5fe64b30de47e90e20321c458a4a8a

Get rid of yet another instance of DM_DRAW_OPTION_NO_MCOL

Logic here is weird. Generally, textured drawing overrides
material color unless material uses object color instead?
It doesn't make sense, material color is a material color
whatever the circumstance.

Repeating: idea as always is to push all those options out of per-
polygon callbacks and make decisions such as color enable in the higher
level functions.

===

M   source/blender/editors/space_view3d/drawmesh.c

===

diff --git a/source/blender/editors/space_view3d/drawmesh.c 
b/source/blender/editors/space_view3d/drawmesh.c
index c1821be..5c5652d 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -560,21 +560,22 @@ static DMDrawOption draw_tface__set_draw_legacy(MTexPoly 
*mtexpoly, const bool h
glColor3ub(0xFF, 0x00, 0xFF);
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
-   else if (ma && (ma->shade_flag & MA_OBCOLOR)) {
-   glColor3ubv(Gtexdraw.obcol);
-   return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
-   }
else if (!has_mcol) {
if (mtexpoly) {
glColor3f(1.0, 1.0, 1.0);
}
else {
if (ma) {
-   float col[3];
-   if (Gtexdraw.color_profile) 
linearrgb_to_srgb_v3_v3(col, >r);
-   else copy_v3_v3(col, >r);
-   
-   glColor3fv(col);
+   if (ma->shade_flag & MA_OBCOLOR) {
+   glColor3ubv(Gtexdraw.obcol);
+   }
+   else {
+   float col[3];
+   if (Gtexdraw.color_profile) 
linearrgb_to_srgb_v3_v3(col, >r);
+   else copy_v3_v3(col, >r);
+
+   glColor3fv(col);
+   }
}
else {
glColor3f(1.0, 1.0, 1.0);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [09e3ef2] master: Get rid of three needless instances of DM_DRAW_OPTION_NO_MCOL.

2016-01-02 Thread Antony Riakiotakis
Commit: 09e3ef29c1eeb799f43dc85e97593140282a344f
Author: Antony Riakiotakis
Date:   Sat Jan 2 23:22:22 2016 +0100
Branches: master
https://developer.blender.org/rB09e3ef29c1eeb799f43dc85e97593140282a344f

Get rid of three needless instances of DM_DRAW_OPTION_NO_MCOL.

It would be good to get rid of this entirely, ideally decision
about mcols can be taken at material level and not done per face. More
work needs to be done for that to work though.

===

M   source/blender/editors/space_view3d/drawmesh.c
M   
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp

===

diff --git a/source/blender/editors/space_view3d/drawmesh.c 
b/source/blender/editors/space_view3d/drawmesh.c
index 5c8c1a4..c1821be 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -167,7 +167,7 @@ static DMDrawOption 
draw_mesh_face_select__drawFaceOptsInv(void *userData, int i
 
MPoly *mpoly = >mpoly[index];
if (!(mpoly->flag & ME_HIDE) && !(mpoly->flag & ME_FACE_SEL))
-   return DM_DRAW_OPTION_NO_MCOL;  /* Don't set color */
+   return DM_DRAW_OPTION_NORMAL;
else
return DM_DRAW_OPTION_SKIP;
 }
@@ -580,7 +580,7 @@ static DMDrawOption draw_tface__set_draw_legacy(MTexPoly 
*mtexpoly, const bool h
glColor3f(1.0, 1.0, 1.0);
}
}
-   return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
+   return DM_DRAW_OPTION_NORMAL; /* normal drawing (no mcols 
anyway, no need to turn off) */
}
else {
return DM_DRAW_OPTION_NORMAL; /* Set color from mcol */
diff --git 
a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp 
b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 400fa6a..1589bc7 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -776,7 +776,7 @@ static DMDrawOption CheckTexDM(MTexPoly *mtexpoly, const 
bool has_mcol, int matn
unsigned char rgba[4];
current_polymat->GetMaterialRGBAColor(rgba);
glColor4ubv((const GLubyte *)rgba);
-   return DM_DRAW_OPTION_NO_MCOL;
+   return DM_DRAW_OPTION_NORMAL;
}
return DM_DRAW_OPTION_NORMAL;
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs