1 // 2 // Copyright 2014 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // TransformFeedbackImpl.h: Defines the abstract rx::TransformFeedbackImpl class. 8 9 #ifndef LIBANGLE_RENDERER_TRANSFORMFEEDBACKIMPL_H_ 10 #define LIBANGLE_RENDERER_TRANSFORMFEEDBACKIMPL_H_ 11 12 #include "common/angleutils.h" 13 #include "libANGLE/TransformFeedback.h" 14 15 namespace rx 16 { 17 18 class TransformFeedbackImpl : angle::NonCopyable 19 { 20 public: TransformFeedbackImpl(const gl::TransformFeedbackState & state)21 TransformFeedbackImpl(const gl::TransformFeedbackState &state) : mState(state) {} ~TransformFeedbackImpl()22 virtual ~TransformFeedbackImpl() {} onDestroy(const gl::Context * context)23 virtual void onDestroy(const gl::Context *context) {} 24 25 virtual angle::Result begin(const gl::Context *context, gl::PrimitiveMode primitiveMode) = 0; 26 virtual angle::Result end(const gl::Context *context) = 0; 27 virtual angle::Result pause(const gl::Context *context) = 0; 28 virtual angle::Result resume(const gl::Context *context) = 0; 29 30 virtual angle::Result bindIndexedBuffer( 31 const gl::Context *context, 32 size_t index, 33 const gl::OffsetBindingPointer<gl::Buffer> &binding) = 0; 34 35 protected: 36 const gl::TransformFeedbackState &mState; 37 }; 38 } // namespace rx 39 40 #endif // LIBANGLE_RENDERER_TRANSFORMFEEDBACKIMPL_H_ 41