Gawain: move AttribBinding funcs to private interface

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

Part of T51219
This commit is contained in:
Mike Erwin
2017-04-16 11:21:45 -04:00
parent 4a41bc8cea
commit bf441fcfac
4 changed files with 24 additions and 8 deletions

View File

@@ -11,15 +11,9 @@
#pragma once
#include "vertex_format.h"
#include "shader_interface.h"
#include "common.h"
typedef struct {
uint64_t loc_bits; // store 4 bits for each of the 16 attribs
uint16_t enabled_bits; // 1 bit for each attrib
} AttribBinding;
void AttribBinding_clear(AttribBinding*);
void get_attrib_locations(const VertexFormat*, AttribBinding*, const ShaderInterface*);
unsigned read_attrib_location(const AttribBinding*, unsigned a_idx);

View File

@@ -0,0 +1,20 @@
// Gawain vertex attribute binding
//
// This code is part of the Gawain library, with modifications
// specific to integration with Blender.
//
// Copyright 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
#include "vertex_format.h"
#include "shader_interface.h"
void AttribBinding_clear(AttribBinding*);
void get_attrib_locations(const VertexFormat*, AttribBinding*, const ShaderInterface*);
unsigned read_attrib_location(const AttribBinding*, unsigned a_idx);

View File

@@ -10,6 +10,7 @@
// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
#include "attrib_binding.h"
#include "attrib_binding_private.h"
#include <stddef.h>
#if MAX_VERTEX_ATTRIBS != 16

View File

@@ -10,8 +10,9 @@
// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
#include "immediate.h"
#include "attrib_binding.h"
#include "buffer_id.h"
#include "attrib_binding.h"
#include "attrib_binding_private.h"
#include "vertex_format_private.h"
#include <string.h>