1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
XNI/Classes/Retronator/Xni/Framework/Graphics/VertexPositionNormalTexture.m

40 lines
1.3 KiB
Mathematica
Raw Normal View History

//
// VertexPositionNormalTexture.m
// XNI
//
// Created by Matej Jan on 29.11.10.
// Copyright 2010 Retronator. All rights reserved.
//
#import "VertexPositionNormalTexture.h"
#import "Retronator.Xni.Framework.Graphics.h"
@implementation VertexPositionNormalTexture
static VertexDeclaration *vertexDeclaration;
+ (void) initialize {
NSArray *vertexElements = [NSArray arrayWithObjects:
[VertexElement vertexElementWithOffset:offsetof(VertexPositionNormalTextureStruct, position)
format:VertexElementFormatVector3
usage:VertexElementUsagePosition
usageIndex:0],
[VertexElement vertexElementWithOffset:offsetof(VertexPositionNormalTextureStruct, normal)
format:VertexElementFormatVector3
usage:VertexElementUsageNormal
usageIndex:0],
[VertexElement vertexElementWithOffset:offsetof(VertexPositionNormalTextureStruct, texture)
format:VertexElementFormatVector2
usage:VertexElementUsageTextureCoordinate
usageIndex:0], nil];
vertexDeclaration = [[VertexDeclaration alloc] initWithElements:vertexElements];
}
+ (VertexDeclaration *) vertexDeclaration {
return vertexDeclaration;
}
@end