Tag: texture2d

绘图的一部分的开放的gl纹理

我正在试图只绘制我的精灵表的一部分。 但它只是缩放图像,没有绘制图像宽度的1/3。 我怎样才能裁剪图像,所以只有1/3显示。 文本在下面(ios 7,opengl es 2) – (GLKMatrix4)modelMatrix { GLKMatrix4 modelMatrix = GLKMatrix4Identity; modelMatrix = GLKMatrix4Translate(modelMatrix, x, y, 0); return modelMatrix; } – (void)setSprite:(NSString *)fileName effect:(GLKBaseEffect *)newEffect { // 1 self.effect = newEffect; // 2 NSDictionary * options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], GLKTextureLoaderOriginBottomLeft, nil]; // 3 NSError * error; NSString *path = [[NSBundle […]