1 // 2 // Copyright 2015 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 // TransformFeedbackGL.h: Defines the class interface for TransformFeedbackGL. 8 9 #ifndef LIBANGLE_RENDERER_GL_TRANSFORMFEEDBACKGL_H_ 10 #define LIBANGLE_RENDERER_GL_TRANSFORMFEEDBACKGL_H_ 11 12 #include "libANGLE/renderer/TransformFeedbackImpl.h" 13 14 namespace rx 15 { 16 17 class FunctionsGL; 18 class StateManagerGL; 19 20 class TransformFeedbackGL : public TransformFeedbackImpl 21 { 22 public: 23 TransformFeedbackGL(const gl::TransformFeedbackState &state, 24 const FunctionsGL *functions, 25 StateManagerGL *stateManager); 26 ~TransformFeedbackGL() override; 27 28 angle::Result begin(const gl::Context *context, gl::PrimitiveMode primitiveMode) override; 29 angle::Result end(const gl::Context *context) override; 30 angle::Result pause(const gl::Context *context) override; 31 angle::Result resume(const gl::Context *context) override; 32 33 angle::Result bindIndexedBuffer(const gl::Context *context, 34 size_t index, 35 const gl::OffsetBindingPointer<gl::Buffer> &binding) override; 36 37 GLuint getTransformFeedbackID() const; 38 39 void syncActiveState(const gl::Context *context, 40 bool active, 41 gl::PrimitiveMode primitiveMode) const; 42 void syncPausedState(bool paused) const; 43 44 private: 45 const FunctionsGL *mFunctions; 46 StateManagerGL *mStateManager; 47 48 GLuint mTransformFeedbackID; 49 50 mutable bool mIsActive; 51 mutable bool mIsPaused; 52 mutable GLuint mActiveProgram; 53 }; 54 } // namespace rx 55 56 #endif // LIBANGLE_RENDERER_GL_TRANSFORMFEEDBACKGL_H_ 57