opengl-es

glViewport different result in Android and iOS

扶醉桌前 提交于 2019-12-10 10:36:17
问题 I just got started on a renderer for my cross platform framework (iOS and Android) using opengl es. When I got to the viewport stuff (which is needed for splitscreen stuff) and noticed there is a difference between iOS and Android. Here are two images. Android There is actually another glitch. IT seems to wrap. iOS My question. Which of the two is correct? I have no transformations applied but one to bring the drawn quad back a bit. glTranslatef(0.0f, 0.0f, -5.f); Initialisation code:

Issue with Android OpenGL Multisampling/Antialiasing

萝らか妹 提交于 2019-12-10 10:27:31
问题 I'm working on an app for Android allows the user to tap the screen to draw colors. I've got all of the drawing code working nicely under OpenGL (testing on Android 4.0.4, Galaxy Nexus, though I'm trying to make this backward compatible as far as possible; my SDK targets API 14 but has a minSDK of 8). The issue I've run into is with antialiasing; I want all my polygons and lines to be antialiased, but they're coming out jagged. I'm positive the Galaxy Nexus supports antialiasing (I've seen it

ResolveMultisampleFramebufferAPPLE generates INVALID_OPERATION

时光怂恿深爱的人放手 提交于 2019-12-10 10:14:48
问题 I can't figure out, why glResolveMultisampleFramebufferAPPLE generates error 1282 (0x0502, GL_INVALID_OPERATION ). Setup code: glGenFramebuffers(1, &framebuffer); glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); glGenRenderbuffers(1, &colorRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(id<EAGLDrawable>)self.layer]; glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer

Error messages when using OpenGL ES template

陌路散爱 提交于 2019-12-10 10:14:01
问题 I made a new OpenGL ES application, and without modifying anything, I ran the program. It runs, but I see these error messages: Detected an attempt to call a symbol in system libraries that is not present on the iPhone: open$UNIX2003 called from function _ZN4llvm12MemoryBuffer7getFileEPKcPSsx in image libLLVMContainer.dylib. Detected an attempt to call a symbol in system libraries that is not present on the iPhone: fstat$INODE64 called from function _ZN4llvm12MemoryBuffer7getFileEPKcPSsx in

OpenGL-ES Font Rendering (on iOS)… Sanity Check

血红的双手。 提交于 2019-12-10 09:45:56
问题 I'm writing a game for iOS. It has a game map, and I'm using OpenGL to draw it, because the other options were too slow. I have units on the map, represented by alphabetic letters, a la Dwarf Fortress. However, rendering text in OpenGL bites. I'm presently using a performance-tweaked mutant of Texture2D, which was good enough to prototype, but that has all kinds of problems, and is not producing pretty results for me. It seems that the tried-and-true way to do this is to generate a "catalog"

OpenGL (ES 2.0) Dynamically Change Line Width

久未见 提交于 2019-12-10 09:44:13
问题 I am currently drawing my model right now using a ton of GL_LINES all at a uniform radius. I know that glLineWidth will change the radius of the all the lines but they each should have a different radius. I am wondering if its possible using glLineWidth (in a different fashion) or another function? How else should I go about it? 回答1: Render them as a specially constructed triangle strip. Specifically, render each line segment as a pair of triangles to form a quadraliterial, with the length of

Beginning to learn OpenGL ES. Drawing quad

落花浮王杯 提交于 2019-12-10 09:42:42
问题 I try to draw a quad with open GL ES 1.0. But I have an exception which say me that i try to draw more vertices than i have. Code of Renderer : package com.example.MyGLTest; import android.opengl.GLES20; import android.opengl.GLSurfaceView; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; public class OpenGLRenderer implements GLSurfaceView.Renderer{ FloatBuffer

How to record webview activity screen using Android MediaCodec?

百般思念 提交于 2019-12-10 06:59:00
问题 I have the task to record user activity in a webview, in other words I need to create an mp4 video file while the user navigates in a webview. Pretty challenging :) I font that in Android 4.3 introduced MediaCodec : was expanded to include a way to provide input through a Surface (via the createInputSurface method). This allows input to come from camera preview or OpenGL ES rendering. I even find an example where you could record a game written in opengl : http://bigflake.com/mediacodec/ My

Reasonable texture sizes in android

℡╲_俬逩灬. 提交于 2019-12-10 06:26:18
问题 I'm trying to develop an app that uses opengl on android, and ideally make it run on any phone as old as the original droid (or at least any phone that has OpenGL ES 2.0 support). Currently, I'm using a 2048x2048 ETC1 texture compression. It works fine on the Droid X I'm testing it on, but I currently don't have an original droid to test it on, and I can't find much data on this topic either. I know the G1 didn't do well with textures bigger than 512x512, and the droid seems to do fine with

Can an OpenGL ES fragment shader change the depth value of a fragment?

天大地大妈咪最大 提交于 2019-12-10 02:36:29
问题 Can fragment shader in OpenGL ES 2.0 change the Z value (depth) of a pixel? How is this achieved in OpenGL ES 2.0? 回答1: No -- gl_FragDepth (which is part of the desktop version of GLSL) is not present in OpenGL ES. You can, however, check for the existence of GL_EXT_frag_depth . If it's available, then you can write the depth to gl_FragDepthEXT . The extension paper gives more details about how to enable the extension and such. 回答2: While gl_fragDepth is not available in OpenGL ES 2.0, is is