GteFluid2AdjustVelocity.h
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #pragma once
9 
13 #include <Graphics/GteTexture2.h>
14 
15 namespace gte
16 {
17 
18 class GraphicsEngine;
19 
21 {
22 public:
23  // Construction. Adjust the velocities using the solution to the Poisson equation.
24  Fluid2AdjustVelocity(std::shared_ptr<ProgramFactory> const& factory,
25  int xSize, int ySize, int numXThreads, int numYThreads,
26  std::shared_ptr<ConstantBuffer> const& parameters);
27 
28  // Update the state for the fluid simulation.
29  void Execute(std::shared_ptr<GraphicsEngine> const& engine,
30  std::shared_ptr<Texture2> const& inState,
31  std::shared_ptr<Texture2> const& poisson,
32  std::shared_ptr<Texture2> const& outState);
33 
34 private:
35  int mNumXGroups, mNumYGroups;
36  std::shared_ptr<ComputeProgram> mAdjustVelocity;
37 
38  // Shader source code as strings.
39  static std::string const msGLSLSource;
40  static std::string const msHLSLSource;
41  static std::string const* msSource[ProgramFactory::PF_NUM_API];
42 };
43 
44 }
std::shared_ptr< ComputeProgram > mAdjustVelocity
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
static std::string const msGLSLSource
static std::string const msHLSLSource
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59