para instalar descargar como apps aplicaciones ios opengl-es opengl-es-2.0 shader glkit

instalar - netflix para ios 7



GLKTexture no está correctamente mapeado desde iOS6 (1)

Debe informar el error a bugreport.apple.com como ya se mencionó. Dejando de lado, si está sugiriendo que GLKTextureLoader es quizás el problema (parece una buena teoría), entonces podría reducir las cosas de una de las dos maneras en la parte superior de mi cabeza ...

1) Representaría la textura mostrada a un cuadrilátero trivial y vería si los resultados de render son los que usted espera. Es decir, ¿la representación se invierte verticalmente de lo que espera? ¿La textura de la fuente está parcialmente distorsionada de alguna manera que no esperabas?

2) Puede intentar convertir su imagen a un tamaño / profundidad de color / tipo de imagen diferente y ver si el problema persiste. Lo que estoy pensando es, y parece poco probable, pero tal vez no se haya informado porque está golpeando un caso de borde inusual debido a algo con el formato de imagen. Saber esto sería de gran ayuda para cualquiera que intente arreglar esto en Apple.

Probablemente no sea de mucha ayuda, pero sin tener acceso a todas sus fuentes y recursos, es bastante difícil saber qué sugerir. FWIW, tengo algunas muestras que hacen cosas similares a lo que estás haciendo y no he notado nada en GLKit v. 10.8.

Tengo un comportamiento extraño desde Xcode 4.5 y el SDK de iOS 6 cuando uso texturas en mis objetos 3D. El problema también aparece en mi aplicación mac cuando se compila con OS X 10.8 SDK.

Estoy utilizando OpenGL ES 2.0 en iOS y el perfil heredado de OpenGL (<3.0) en OS X 10.8.

Las texturas ya no están colocadas en las coordenadas correctas y tengo muchos artefactos. Los VAO se cargan correctamente y se ven bien sin texturas. Cuando se utiliza XCode 4.4.1 y iOS 5.1 SDK, todo está bien.

La VAO es exactamente la misma (verificada con la captura de fotogramas de OpenGL ES) y también los uniformes de textura están unidos correctamente.

Descripción de Xcode 4.4 VAO

Descripción de Xcode 4.5 VAO

XCode 4.4.1 (iOS 5.1 SDK)

XCode 4.5 (iOS 6 SDK)

Fragmento de código / Shader

Partes relevantes para subir y procesar la textura. Tuve que quitar los shaders al minium.

Sombreador de vértices

precision highp float; attribute vec2 a_vTextureCoordinate; uniform mat4 u_mModelViewMatrix; uniform mat4 u_mModelViewMatrixInverse; uniform mat4 u_mProjectionMatrix; uniform mat4 u_mNormalMatrix; void main() { .... // Transform output position gl_Position = u_mProjectionMatrix * u_mModelViewMatrix * a_vPosition; // Pass through texture coordinate v_texcoord = a_vTextureCoordinate.xy; v_vPosition = vec3(u_mModelViewMatrix * a_vPosition); v_vTextureCoordinate = a_vTextureCoordinate.xy; .... }

Fragment Shader

precision highp float; // location 1 uniform sampler2D u_diffuseTexture; varying vec2 v_vTextureCoordinate; varying vec3 v_vPosition; .... void main() { .... vec4 base = texture2D(u_diffuseTexture, v_vTextureCoordinate); gl_FragColor = base; .... }

Carga de textura

NSDictionary *options = @{GLKTextureLoaderOriginBottomLeft: @(YES), [NSNumber numberWithBool:YES] : GLKTextureLoaderGenerateMipmaps}; NSError *error; path = [path stringByReplacingOccurrencesOfString:@"/" withString:@""]; path = [[NSBundle mainBundle] pathForResource:[path stringByDeletingPathExtension] ofType:[path pathExtension]]; GLKTextureInfo *texture = [GLKTextureLoader textureWithContentsOfFile:path options:options error:&error];

Bucle de render (solo enviando el uniforme de la textura activa)

.... [self setShaderTexture:[[materials objectForKey:@"diffuse"] objectForKey:@"glktexture"] forKey:@"u_diffuseTexture" withUniform1i:0 andTextureUnit:GL_TEXTURE0+0]; .... #pragma mark - Texture communication -(void)setShaderTexture:(GLKTextureInfo*)texture forKey:(NSString*)key withUniform1i:(int32_t)uniform andTextureUnit:(int32_t)unit { glActiveTexture(unit); glBindTexture(texture.target, texture.name); [self.shaderManager sendUniform1Int:key parameter:uniform]; }

¿Alguien ha tenido un problema cercano al mío desde iOS 6?