+ Bloom effect + PixelInformation + Many Summaries + Add-methods for CVectors + Exposure-Field in GenericCamera for HDR. ~ ColorAttachments now can have PixelInformation ~ Transformed MeshAttributes to a own class ~ Fixed the non-applying of transformations at texts ~ Added more information to the context ~ Improved Pipeline-Process. ~ Changed how Uniform takes arrays - Light system
54 lines
No EOL
1.4 KiB
C#
54 lines
No EOL
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SM.OGL.Mesh
|
|
{
|
|
/// <summary>
|
|
/// List of mesh attributes.
|
|
/// </summary>
|
|
public class MeshAttributeList : List<MeshAttribute>
|
|
{
|
|
/// <summary>
|
|
/// Returns the VBO (or null) that is connected to the specified name.
|
|
/// </summary>
|
|
public VBO this[string name]
|
|
{
|
|
get
|
|
{
|
|
for (int i = 0; i < Count; i++)
|
|
{
|
|
if (this[i].Name == name)
|
|
{
|
|
return this[i].ConnectedVBO;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
set
|
|
{
|
|
for (int i = 0; i < Count; i++)
|
|
{
|
|
if (this[i].Name == name)
|
|
{
|
|
this[i].ConnectedVBO = value;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Adds a new attribute.
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <param name="name"></param>
|
|
/// <param name="vbo"></param>
|
|
public void Add(int id, string name, VBO vbo)
|
|
{
|
|
//if (vbo == null) return;
|
|
Add(new MeshAttribute(id, name, vbo));
|
|
}
|
|
}
|
|
} |