opengl-es

What OpenGL ES texture format should I use for better dynamic range on iPad?

ぐ巨炮叔叔 提交于 2019-12-21 21:29:44
问题 I'm developing some software which uses a texture map to store geometry. Using GL_RGB for the internal format gives a lot of aliasing, I assume because the texture is being compressed down to GL_RGB4 by default. On a desktop I can use GL_RGB16 or GL_RGB32F (etc.) to set the internal format, but under OpenGL ES 2.0 there doesn't seem to be any of these formats. Is there an alternative, or extension, that is available under IOS which I can use? 回答1: According to Apple (and my own experience) GL

Possible Retina issue with OpenGL ES on iPhone?

耗尽温柔 提交于 2019-12-21 21:28:54
问题 This is probably linked to another unsolved mystery of mine. I'm drawing Orthographic 2d on iPhone, using real device and simulator. I'm trying to color my pixels a given color depending on how far they are from arbitrary point in pixelspace of 'A', which I pass in (hard code). I'm doing everything in Retina 960x640 resolution. I calculate distance from A to gl_FragCoord , and I color based on leaping between 2 colors with the 'max' being 300px distance. When on simulator (with retina display

Libgdx: Moving a rotated perspective camera

▼魔方 西西 提交于 2019-12-21 21:05:09
问题 I am developing an android app which visualize the map of an environment and currently i am using libgdx to draw the map, also like any map application the user should be capable of zoom, rotate and moving the map, I have developed a GestureHandler class which implements GestureListener interface and interacts with a PerspectiveCamera (since i will use 3d components in the future): @Override public boolean pan(float x, float y, float deltaX, float deltaY) { float tempX = (mapView.getCamera()

How to apply the projection and modelview matrixs of QCAR (Vuforia) to min3D scene

对着背影说爱祢 提交于 2019-12-21 20:57:10
问题 I would like to use Qualcomm's Augmented Reality SDK (Vuforia) with the min3D library and load obj model. How can I merge QCAR (Vuforia) with min3D? How to apply the projection and modelview matrixs of QCAR (Vuforia) to min3D? So that the scene is rendered correct in min3d.glsurfaceview? Has anyone developed an example? How is your experience? How can I apply movdelview and project matrix which was generated by QCAR in C to apply then in Min3D scene of Java? Suggest me to achieve this.any

iPhone - OpenGL using C++ tutorial/snippet [closed]

∥☆過路亽.° 提交于 2019-12-21 20:27:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Is there any good tutorial or code snippet out there on how to use OpenGL via C/C++ on the iPhone? 回答1: http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/WorkingwithEAGLContexts/WorkingwithEAGLContexts.html I'm pretty sure you need a bit of Objective-C to

How to write a fragment shader in GLSL to sort an array of 9 floating point numbers

风格不统一 提交于 2019-12-21 20:19:17
问题 I am writing a fragment shader in order to median 9 images together. I have never worked with GLSL before, but it seemed like the right tool for the job, as OpenCL isn't available on iOS and medianing on the CPU is inefficient. Here's what I have so far: uniform sampler2D frames[9]; uniform vec2 wh; void main(void) { vec4 sortedFrameValues[9]; float sortedGrayScaleValues[9]; for (int i = 0; i < 9; i++) { sortedFrameValues[i] = texture2D(frames[i], -gl_FragCoord.xy / wh); sortedGrayScaleValues

How to ensure that a plane perfectly fills the viewport in OpenGL ES

ぐ巨炮叔叔 提交于 2019-12-21 19:45:33
问题 I'm trying to create a flat plane such that it perfectly fills the viewport in an OpenGL ES application. I can achieve this effect by creating the plane and then experimentally moving it forwards and backwards until I get the right effect, but I'm certain that it must be possible to work out exactly how far away from the camera it should be. I would welcome any pointers! I need to be accurate because the plane has a texture applied to it, which I want to fill the window and not be clipped at

Dealing with OpenGL ES 2.0 driver bugs

纵饮孤独 提交于 2019-12-21 18:40:34
问题 I'm currently porting a 3D C++ game from iOS to Android using NDK. The rendering is done with GLES2. When I finished rewriting all the platform specific stuff and ran the full game for the first time I noticed rendering bugs - sometimes only parts of the geometry would render, sometimes huge triangles would flicker across the screen, and so on and so on... I tested it on a Galaxy Nexus running 4.1.2. glGetError() returned nothing. Also, the game ran beautifully on all iOS devices. I started

glClearColor() pushing the iPhone at 27% render utilization

为君一笑 提交于 2019-12-21 17:45:10
问题 As a result of the search for an answer of this question, I ran into a rather uncomfortable finding. It seems that rendering only glClearColor() at 60 fps pushes the iPhone at 27% render utilization. That means that doing hardly anything at all - only refreshing the screen - makes the iPhone use more than a quarter of its render capacity. Is this to be expected? The POWERVR should hit around 270 megapixels/second at least, according to the documentation. As unwind correctly stated below, 480

Bump Mapping on the iPhone

泄露秘密 提交于 2019-12-21 17:32:13
问题 Using OpenGL ES on the iPhone, is it possible to do bump mapping (using normal perturbation maps)? From my google searching, it seems the OpenGL ES extension that supports it doesn't allow bump mapping. According to this guy that writes gaming middleware for the iphone, one can see the potential of the hardware by watching demos on th imgtec site (the marker of the iPhones graphics chip). One such demo is a bump mapping demo. But there's no source to be found. Kevin Doolan also mentions the