[Bf-blender-cvs] [7c57ca51097] blender2.8: Gawain: move some VertexFormat funcs to private interface

Mike Erwin noreply at git.blender.org
Sat Apr 15 19:10:46 CEST 2017


Commit: 7c57ca5109793c54f34adfd396c41b1be163d61f
Author: Mike Erwin
Date:   Sat Apr 15 13:10:14 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB7c57ca5109793c54f34adfd396c41b1be163d61f

Gawain: move some VertexFormat funcs to private interface

Other parts of Gawain uses these internally, but they're not part of the public API.

Part of T51219

===================================================================

M	intern/gawain/gawain/vertex_format.h
A	intern/gawain/gawain/vertex_format_private.h
M	intern/gawain/src/immediate.c
M	intern/gawain/src/vertex_buffer.c

===================================================================

diff --git a/intern/gawain/gawain/vertex_format.h b/intern/gawain/gawain/vertex_format.h
index a5cab4a9d99..6fe92681909 100644
--- a/intern/gawain/gawain/vertex_format.h
+++ b/intern/gawain/gawain/vertex_format.h
@@ -81,8 +81,3 @@ typedef struct {
 PackedNormal convert_i10_v3(const float data[3]);
 
 #endif // USE_10_10_10
-
-// for internal use
-void VertexFormat_pack(VertexFormat*);
-unsigned padding(unsigned offset, unsigned alignment);
-unsigned vertex_buffer_size(const VertexFormat*, unsigned vertex_ct);
diff --git a/intern/gawain/gawain/vertex_format_private.h b/intern/gawain/gawain/vertex_format_private.h
new file mode 100644
index 00000000000..c7f6f131339
--- /dev/null
+++ b/intern/gawain/gawain/vertex_format_private.h
@@ -0,0 +1,16 @@
+
+// Gawain vertex format (private interface for use inside Gawain)
+//
+// This code is part of the Gawain library, with modifications
+// specific to integration with Blender.
+//
+// Copyright 2016-2017 Mike Erwin
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
+// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+#pragma once
+
+void VertexFormat_pack(VertexFormat*);
+unsigned padding(unsigned offset, unsigned alignment);
+unsigned vertex_buffer_size(const VertexFormat*, unsigned vertex_ct);
diff --git a/intern/gawain/src/immediate.c b/intern/gawain/src/immediate.c
index f3fc046d2c5..3ec4c8ac79e 100644
--- a/intern/gawain/src/immediate.c
+++ b/intern/gawain/src/immediate.c
@@ -12,6 +12,7 @@
 #include "immediate.h"
 #include "attrib_binding.h"
 #include "buffer_id.h"
+#include "vertex_format_private.h"
 #include <string.h>
 
 // necessary functions from matrix API
diff --git a/intern/gawain/src/vertex_buffer.c b/intern/gawain/src/vertex_buffer.c
index ab488a07bed..c502caace9d 100644
--- a/intern/gawain/src/vertex_buffer.c
+++ b/intern/gawain/src/vertex_buffer.c
@@ -11,6 +11,7 @@
 
 #include "vertex_buffer.h"
 #include "buffer_id.h"
+#include "vertex_format_private.h"
 #include <stdlib.h>
 #include <string.h>




More information about the Bf-blender-cvs mailing list