本文整理汇总了C++中DataReader::size方法的典型用法代码示例。如果您正苦于以下问题:C++ DataReader::size方法的具体用法?C++ DataReader::size怎么用?C++ DataReader::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataReader
的用法示例。
在下文中一共展示了DataReader::size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunVertices
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing,
bool is_preprocess)
{
if (!count)
return 0;
VertexLoaderBase* loader = RefreshLoader(vtx_attr_group, is_preprocess);
int size = count * loader->m_VertexSize;
if ((int)src.size() < size)
return -1;
if (skip_drawing || is_preprocess)
return size;
// If the native vertex format changed, force a flush.
if (loader->m_native_vertex_format != s_current_vtx_fmt ||
loader->m_native_components != g_current_components)
{
VertexManagerBase::Flush();
}
s_current_vtx_fmt = loader->m_native_vertex_format;
g_current_components = loader->m_native_components;
// if cull mode is CULL_ALL, tell VertexManager to skip triangles and quads.
// They still need to go through vertex loading, because we need to calculate a zfreeze refrence
// slope.
bool cullall = (bpmem.genMode.cullmode == GenMode::CULL_ALL && primitive < 5);
DataReader dst = VertexManagerBase::PrepareForAdditionalData(
primitive, count, loader->m_native_vtx_decl.stride, cullall);
count = loader->RunVertices(src, dst, count);
IndexGenerator::AddIndices(primitive, count);
VertexManagerBase::FlushData(count, loader->m_native_vtx_decl.stride);
ADDSTAT(stats.thisFrame.numPrims, count);
INCSTAT(stats.thisFrame.numPrimitiveJoins);
return size;
}