MCPcopy Create free account
hub / github.com/TankOs/SFGUI / AddPrimitive

Method AddPrimitive

src/SFGUI/Renderer.cpp:768–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768void Renderer::AddPrimitive( Primitive::Ptr primitive ) {
769 m_primitives.push_back( primitive );
770
771 // Check for alpha values in primitive.
772 // Disable depth test if any found.
773 const std::vector<PrimitiveVertex>& vertices( primitive->GetVertices() );
774 const std::vector<unsigned int>& indices( primitive->GetIndices() );
775
776 m_vertex_count += static_cast<int>( vertices.size() );
777 m_index_count += static_cast<int>( indices.size() );
778
779 m_primitives_sorted = false;
780
781 Invalidate( INVALIDATE_ALL );
782}
783
784void Renderer::RemovePrimitive( Primitive::Ptr primitive ) {
785 std::vector<Primitive::Ptr>::iterator iter( std::find( m_primitives.begin(), m_primitives.end(), primitive ) );

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected