Flutter Engine
The Flutter Engine
Classes | Functions
GrGLVertexArray.cpp File Reference
#include "src/gpu/ganesh/gl/GrGLVertexArray.h"
#include "include/core/SkTypes.h"
#include "include/gpu/gl/GrGLFunctions.h"
#include "include/gpu/gl/GrGLInterface.h"
#include "src/core/SkSLTypeShared.h"
#include "src/gpu/ganesh/GrBuffer.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrCpuBuffer.h"
#include "src/gpu/ganesh/GrGpuBuffer.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/gl/GrGLBuffer.h"
#include "src/gpu/ganesh/gl/GrGLDefines.h"
#include "src/gpu/ganesh/gl/GrGLGpu.h"
#include "src/gpu/ganesh/gl/GrGLUtil.h"
#include <cstdint>

Go to the source code of this file.

Classes

struct  AttribLayout
 

Functions

static AttribLayout attrib_layout (GrVertexAttribType type)
 

Function Documentation

◆ attrib_layout()

static AttribLayout attrib_layout ( GrVertexAttribType  type)
static

Definition at line 33 of file GrGLVertexArray.cpp.

33 {
34 switch (type) {
36 return {false, 1, GR_GL_FLOAT};
38 return {false, 2, GR_GL_FLOAT};
40 return {false, 3, GR_GL_FLOAT};
42 return {false, 4, GR_GL_FLOAT};
44 return {false, 1, GR_GL_HALF_FLOAT};
46 return {false, 2, GR_GL_HALF_FLOAT};
48 return {false, 4, GR_GL_HALF_FLOAT};
50 return {false, 2, GR_GL_INT};
52 return {false, 3, GR_GL_INT};
54 return {false, 4, GR_GL_INT};
56 return {false, 1, GR_GL_BYTE};
58 return {false, 2, GR_GL_BYTE};
60 return {false, 4, GR_GL_BYTE};
62 return {false, 1, GR_GL_UNSIGNED_BYTE};
64 return {false, 2, GR_GL_UNSIGNED_BYTE};
66 return {false, 4, GR_GL_UNSIGNED_BYTE};
68 return {true, 1, GR_GL_UNSIGNED_BYTE};
70 return {true, 4, GR_GL_UNSIGNED_BYTE};
72 return {false, 2, GR_GL_SHORT};
74 return {false, 4, GR_GL_SHORT};
76 return {false, 2, GR_GL_UNSIGNED_SHORT};
78 return {true, 2, GR_GL_UNSIGNED_SHORT};
80 return {false, 1, GR_GL_INT};
82 return {false, 1, GR_GL_UNSIGNED_INT};
84 return {true, 1, GR_GL_UNSIGNED_SHORT};
86 return {true, 4, GR_GL_UNSIGNED_SHORT};
87 }
88 SK_ABORT("Unknown vertex attrib type");
89}
#define GR_GL_HALF_FLOAT
Definition: GrGLDefines.h:356
#define GR_GL_BYTE
Definition: GrGLDefines.h:349
#define GR_GL_UNSIGNED_SHORT
Definition: GrGLDefines.h:352
#define GR_GL_INT
Definition: GrGLDefines.h:353
#define GR_GL_UNSIGNED_INT
Definition: GrGLDefines.h:354
#define GR_GL_SHORT
Definition: GrGLDefines.h:351
#define GR_GL_UNSIGNED_BYTE
Definition: GrGLDefines.h:350
#define GR_GL_FLOAT
Definition: GrGLDefines.h:355
@ kUShort_norm_GrVertexAttribType
Definition: GrTypesPriv.h:346
@ kFloat2_GrVertexAttribType
Definition: GrTypesPriv.h:314
@ kUShort2_GrVertexAttribType
Definition: GrTypesPriv.h:340
@ kUInt_GrVertexAttribType
Definition: GrTypesPriv.h:344
@ kUByte4_norm_GrVertexAttribType
Definition: GrTypesPriv.h:334
@ kUByte_GrVertexAttribType
Definition: GrTypesPriv.h:329
@ kShort2_GrVertexAttribType
Definition: GrTypesPriv.h:337
@ kUShort4_norm_GrVertexAttribType
Definition: GrTypesPriv.h:348
@ kInt_GrVertexAttribType
Definition: GrTypesPriv.h:343
@ kByte_GrVertexAttribType
Definition: GrTypesPriv.h:326
@ kByte4_GrVertexAttribType
Definition: GrTypesPriv.h:328
@ kFloat3_GrVertexAttribType
Definition: GrTypesPriv.h:315
@ kFloat_GrVertexAttribType
Definition: GrTypesPriv.h:313
@ kByte2_GrVertexAttribType
Definition: GrTypesPriv.h:327
@ kFloat4_GrVertexAttribType
Definition: GrTypesPriv.h:316
@ kShort4_GrVertexAttribType
Definition: GrTypesPriv.h:338
@ kUShort2_norm_GrVertexAttribType
Definition: GrTypesPriv.h:341
@ kInt3_GrVertexAttribType
Definition: GrTypesPriv.h:322
@ kHalf2_GrVertexAttribType
Definition: GrTypesPriv.h:318
@ kHalf4_GrVertexAttribType
Definition: GrTypesPriv.h:319
@ kUByte4_GrVertexAttribType
Definition: GrTypesPriv.h:331
@ kUByte2_GrVertexAttribType
Definition: GrTypesPriv.h:330
@ kInt4_GrVertexAttribType
Definition: GrTypesPriv.h:323
@ kUByte_norm_GrVertexAttribType
Definition: GrTypesPriv.h:333
@ kInt2_GrVertexAttribType
Definition: GrTypesPriv.h:321
@ kHalf_GrVertexAttribType
Definition: GrTypesPriv.h:317
#define SK_ABORT(message,...)
Definition: SkAssert.h:70
GLenum type