![]() |
Flutter Engine
The Flutter Engine
|
#include <GrGLProgram.h>
Classes | |
struct | Attribute |
struct | RenderTargetState |
Public Types | |
using | UniformHandle = GrGLSLProgramDataManager::UniformHandle |
using | UniformInfoArray = GrGLProgramDataManager::UniformInfoArray |
using | VaryingInfoArray = GrGLProgramDataManager::VaryingInfoArray |
Public Member Functions | |
~GrGLProgram () override | |
void | abandon () |
GrGLuint | programID () const |
void | updateUniforms (const GrRenderTarget *, const GrProgramInfo &) |
void | bindTextures (const GrGeometryProcessor &, const GrSurfaceProxy *const geomProcTextures[], const GrPipeline &) |
int | vertexStride () const |
int | instanceStride () const |
int | numVertexAttributes () const |
const Attribute & | vertexAttribute (int i) const |
int | numInstanceAttributes () const |
const Attribute & | instanceAttribute (int i) const |
![]() | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static sk_sp< GrGLProgram > | Make (GrGLGpu *, const GrGLSLBuiltinUniformHandles &, GrGLuint programID, const UniformInfoArray &uniforms, const UniformInfoArray &textureSamplers, std::unique_ptr< GrGeometryProcessor::ProgramImpl >, std::unique_ptr< GrXferProcessor::ProgramImpl >, std::vector< std::unique_ptr< GrFragmentProcessor::ProgramImpl > > fps, std::unique_ptr< Attribute[]>, int vertexAttributeCnt, int instanceAttributeCnt, int vertexStride, int instanceStride) |
This class manages a GPU program and records per-program information. It also records the vertex and instance attribute layouts that are to be used with the program.
Definition at line 31 of file GrGLProgram.h.
using GrGLProgram::UniformHandle = GrGLSLProgramDataManager::UniformHandle |
Definition at line 45 of file GrGLProgram.h.
Definition at line 46 of file GrGLProgram.h.
Definition at line 47 of file GrGLProgram.h.
|
override |
Definition at line 87 of file GrGLProgram.cpp.
void GrGLProgram::abandon | ( | ) |
Call to abandon GL objects owned by this program.
Definition at line 93 of file GrGLProgram.cpp.
void GrGLProgram::bindTextures | ( | const GrGeometryProcessor & | geomProc, |
const GrSurfaceProxy *const | geomProcTextures[], | ||
const GrPipeline & | pipeline | ||
) |
Binds all geometry processor and fragment processor textures.
Definition at line 123 of file GrGLProgram.cpp.
|
inline |
Definition at line 112 of file GrGLProgram.h.
|
static |
The attribute array consists of vertexAttributeCnt + instanceAttributeCnt elements with the vertex attributes preceding the instance attributes.
Definition at line 27 of file GrGLProgram.cpp.
|
inline |
Definition at line 120 of file GrGLProgram.h.
|
inline |
Definition at line 114 of file GrGLProgram.h.
|
inline |
Gets the GL program ID for this program.
Definition at line 78 of file GrGLProgram.h.
void GrGLProgram::updateUniforms | ( | const GrRenderTarget * | renderTarget, |
const GrProgramInfo & | programInfo | ||
) |
This function uploads uniforms and calls each GrGLSL*Processor's setData.
It is the caller's responsibility to ensure the program is bound before calling.
Definition at line 99 of file GrGLProgram.cpp.
|
inline |
Definition at line 111 of file GrGLProgram.h.