diff options
author | Brian Paul <[email protected]> | 2013-11-11 10:57:23 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-11-12 11:05:14 -0700 |
commit | 5f22f3207e298f53aaf8c965a39f758578a28600 (patch) | |
tree | 33437e9522b5ed28611cbb6fd6042520b6217f66 /src/mesa/main/varray.h | |
parent | e032abcb2716e3ee676b5a44079d4bbb95c466f9 (diff) |
mesa: use _mesa_is_bufferobj() helper in _mesa_vertex_attrib_address()
And use a regular if statment to slightly improve readability.
Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.h')
-rw-r--r-- | src/mesa/main/varray.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index ecfc6b6c9b6..3b9f39a61df 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -76,9 +76,10 @@ static inline const GLubyte * _mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array, const struct gl_vertex_buffer_binding *binding) { - return (binding->BufferObj->Name == 0 ? - array->Ptr : - (const GLubyte *)(binding->Offset + array->RelativeOffset)); + if (_mesa_is_bufferobj(binding->BufferObj)) + return (const GLubyte *) (binding->Offset + array->RelativeOffset); + else + return array->Ptr; } /** |