本文整理汇总了C++中GrGeometryProcessor::viewMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ GrGeometryProcessor::viewMatrix方法的具体用法?C++ GrGeometryProcessor::viewMatrix怎么用?C++ GrGeometryProcessor::viewMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrGeometryProcessor
的用法示例。
在下文中一共展示了GrGeometryProcessor::viewMatrix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GenKey
static inline void GenKey(const GrGeometryProcessor& gp,
const GrBatchTracker& bt,
const GrGLSLCaps&,
GrProcessorKeyBuilder* b) {
const BatchTracker& local = bt.cast<BatchTracker>();
uint32_t key = local.fInputColorType << 16;
key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 : 0x0;
key |= ComputePosKey(gp.viewMatrix()) << 1;
b->add32(key);
}
示例2: GenKey
static inline void GenKey(const GrGeometryProcessor& gp,
const GrBatchTracker& bt,
const GrGLCaps&,
GrProcessorKeyBuilder* b) {
const GrDistanceFieldTextureEffect& dfTexEffect = gp.cast<GrDistanceFieldTextureEffect>();
const DistanceFieldBatchTracker& local = bt.cast<DistanceFieldBatchTracker>();
uint32_t key = dfTexEffect.getFlags();
key |= local.fInputColorType << 16;
key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 << 24: 0x0;
key |= ComputePosKey(gp.viewMatrix()) << 25;
b->add32(key);
}
示例3: GenKey
static inline void GenKey(const GrGeometryProcessor& gp,
const GrBatchTracker& bt,
const GrGLCaps&,
GrProcessorKeyBuilder* b) {
const DefaultGeoProc& def = gp.cast<DefaultGeoProc>();
const BatchTracker& local = bt.cast<BatchTracker>();
uint32_t key = def.fFlags;
key |= local.fInputColorType << 8 | local.fInputCoverageType << 16;
key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 << 24 : 0x0;
key |= ComputePosKey(gp.viewMatrix()) << 25;
b->add32(key);
}