mirror of
https://github.com/thes3m/XNI
synced 2024-12-26 13:26:06 +01:00
36 lines
1021 B
Objective-C
36 lines
1021 B
Objective-C
//
|
|
// VertexPositionTexture.m
|
|
// XNI
|
|
//
|
|
// Created by Matej Jan on 21.9.10.
|
|
// Copyright 2010 Retronator. All rights reserved.
|
|
//
|
|
|
|
#import "VertexPositionTexture.h"
|
|
|
|
#import "Retronator.Xni.Framework.Graphics.h"
|
|
|
|
@implementation VertexPositionTexture
|
|
|
|
VertexDeclaration *vertexDeclaration;
|
|
|
|
+ (void) initialize {
|
|
NSArray *vertexElements = [NSArray arrayWithObjects:
|
|
[VertexElement vertexElementWithOffset:offsetof(VertexPositionTextureStruct, position)
|
|
format:VertexElementFormatVector3
|
|
usage:VertexElementUsagePosition
|
|
usageIndex:0],
|
|
[VertexElement vertexElementWithOffset:offsetof(VertexPositionTextureStruct, texture)
|
|
format:VertexElementFormatVector2
|
|
usage:VertexElementUsageTextureCoordinate
|
|
usageIndex:0], nil];
|
|
|
|
vertexDeclaration = [[VertexDeclaration alloc] initWithElements:vertexElements];
|
|
}
|
|
|
|
+ (VertexDeclaration *) vertexDeclaration {
|
|
return vertexDeclaration;
|
|
}
|
|
|
|
@end
|