opengl-es

Getting the area occupied by a certain color onscreen - iOS

若如初见. 提交于 2019-12-09 14:00:22
问题 I'm trying to do something similar to what is asked in this question, but I don't really understand the answer given to that question and I'm not sure if it is what I need. What I need is simple, though I'm not so sure it's easy. I want to calculate the number of pixels on the screen that are a certain color. I understand that each 'pixel' that we see is actually a combination of pixels of different colors that appear to be, say, green. So what I need is that actual color- the one that the

Mixing OpenGL and UIKit

耗尽温柔 提交于 2019-12-09 13:21:13
问题 My current iPhone app uses UIKit. Now I want some small effects in the app, for example a text looking like it's blowing up. My idea is to use OpenGL for these effects. Is it a good idea to mix UIKit and OpenGL like this or should I avoid it? I have read some posts saying it's not a good idea and other saying it works just fine. What is your opinion and is it okey with Apple? 回答1: Depends on your target audience. If you care about older iPhone users, then mixing UIKit and OpenGL might not be

porting iPhone openGLES app to OSX?

泪湿孤枕 提交于 2019-12-09 13:11:03
问题 Developing for the iPhone has been my first experience with objective-c and first in-depth experience with xcode. How difficult would it be to port an openGLES iPhone app to the OSX desktop using openGL? I am not asking about user interface - obviously there is no equivalent to cocoa touch UI on the desktop. I am asking specifically about the app delegate and openGLES layers. Are there any major hurdles? Is it as straight forward as simply creating a new app delegate in a project of type

OpenGL state redundancy elimination Tree, render state priorities

穿精又带淫゛_ 提交于 2019-12-09 12:55:55
问题 I am working on a Automatic OpenGL batching method in my Game Engine, to reduce draw calls and redundant calls. My batch tree design begins with the most expensive states and adds leafs down for each less expensive state. Example: Tree Root: Shaders / Programs Siblings: Blend states ... a.s.o. So my question is what are most likely the most expensive calls, in this list: binding program binding textures binding buffers buffering texture, vertex data binding render targets glEnable / glDisable

General purpose compute with Vertex/Pixel shaders (Open GL / DirectX)

随声附和 提交于 2019-12-09 12:54:59
问题 I have a question regarding compute shaders. are compute shaders available in DX 9? would it be still possible to use a compute shader with a DX9 driver if there is no compute shader fragment on the GPU? ( SGX 545 does not have it, but SGX 6X generation is going to have it), as far as what IMG says. I would like to know If i can do some simple general purpose programming on SGXs GPUs with DirectX9 or OpenGL drivers. Also, is there anyway I can use OpenGL vertex shaders for GPGPU programming?

openGL ES textures from PNGs with transparency are being rendered with weird artifacts and driving me nuts!

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 09:26:59
问题 I am beginning to work on my first OpenGL iPhone app, but I've hit an early snag. I have a VERY SIMPLE little texture that I want to use as a sprite in a 2D game, but it renders with weird 'randomly' colored pixels up top. http://i40.tinypic.com/2s7c9ro.png <-- Screenshot here I sort of get the feeling that this is Photoshop's fault, so if anybody something about that please let me know. If it's not photoshop then it's gotta be my code... So here is the code in question... - (void)loadTexture

OpenGL on Android using C++ only [closed]

人走茶凉 提交于 2019-12-09 06:03:52
问题 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 last year . I'm developing an Android application for Android 2.1. I'm trying to code OpenGL's stuff with C++ only. Do you know a tutorial or an article showing an example about how to do that? UPDATE : Sorry, I've forget to say that I will use a Java home application to launch main activity. I'm trying to say if I have to

Positioning elements in 2D space with OpenGL ES

不想你离开。 提交于 2019-12-09 06:01:44
问题 In my spare time I like to play around with game development on the iPhone with OpenGL ES. I'm throwing together a small 2D side-scroller demo for fun, and I'm relatively new to OpenGL, and I wanted to get some more experienced developers' input on this. So here is my question: does it make sense to specify the vertices of each 2D element in model space, then translate each element to it's final view space each time a frame is drawn? For example, say I have a set of blocks (squares) that make

Android: page curl effect like iphone

别来无恙 提交于 2019-12-09 05:53:07
问题 I want to create half page curl animation effect as shown in image: I've used code from https://github.com/harism/android_page_curl/ , but it turns whole page. I just only want half page curl effect as shown in image. 回答1: You could try to modify my implementation. It's not 3D but a nice 2D simulation using the plain canvas: http://code.google.com/p/android-page-curl/ If you enbale the debug mode you will see how it works and modifying the curl plane should be easy. 回答2: It is enough to

Max size for Vertex Buffer Objects (OpenGL ES 2.0)

爱⌒轻易说出口 提交于 2019-12-09 05:45:15
问题 Is there a max size for vertex buffer objects binded to GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER??? Originally, I was drawing a mesh composed of 16 submeshes. For each submesh, I created a vertex buffer and during the rendering phase, I called glDrawElements. This worked fine on the iOS simulator, but when I tried to render to my device, the screen flashes constantly and the meshes aren't displayed. I then did some reading and found that you shouldn't call glDrawElements too many times