opengl-es

Using OpenGL ES functions on a Mac

I am trying to draw opengl into 2d space, and am doing the following, however it wont compile: int vPort[4]; glGetIntegerv(GL_VIEWPORT, vPort); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrthof(0, vPort[2], 0, vPort[3], -1, 1); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoad...

Detecting touches on a NSOpenGLView

I have added an NSOpenGLView to my MainMenu.xib file, and have implemented drawRect to draw to it, this works great, so far so good. How do I detect touches on the screen? I imagine I could perhaps dump some transparent buttons or something over the NSOpenGLView area in Interface Builder? The application is simple, i just need to know ...

OpenGL ES Framebuffer weird mirroring when drawing

I really can't wrap my mind around this: Previously I couldn't get Framebuffers to work, but I've got it going now. However, there is this incredibly weird mirroring going on with the texture generated from the framebuffer, and I have no idea why. Basically, I will try to draw a texture at 0,0 using GL_TRIANGLE_FAN, and the texture appe...

Beginners guide to 3D programming in IPhone SDK

I'm thinking of starting a project to make a game, maybe just a simple one, but still a game in 3D for the IPhone. Though i still have a long way to go, learning objective-C and so on, but a question popped in to my mind while thinking of the 3D gaming world. Would i benefit from learning OpenGL(PC/Mac) first before doing games for the...

Why is my opengl-es texture coming out white?!

I have been at this for quite some time now, reading tutorials and so on, and I can't work out what the heck is wrong with this, is anyone else able to help me understand what is going wrong? // Sets up an array of values to use as the sprite vertices. const GLfloat spriteVertices[] = { 20.0f, 50.5f, 305.0f, 50.0f, 10.5f, 2...

How to draw text in iPhone OpenGL ES

What is an easy way to draw text in an opengl view. I need to be able to draw any/all characters (ie support not just english). Apple has a sample on how to do this for OpenGL (not ES) called GLstring.m which is neat, but cant be translated to iPhone. Not all of us are writing applications just for Americans, ie Techniques that involve ...

OpenGL ES Polygon with Normals rendering (Note the 'ES!')

Ok... imagine I have a relatively simple solid that has six distinct normals but actually has close to 48 faces (8 faces per direction) and there are a LOT of shared vertices between faces. What's the most efficient way to render that in OpenGL? I know I can place the vertices in an array, then use an index array to render them, but I ...

Android OpenGL ES Transparent Background

I'm building an Android app that takes advantage of OpenGL. As it stands, the background for the GLSurfaceView is dynamically generated by my code and loaded in as a texture and drawn with glDrawTexfOES. Which is "ok", but I can simply display the image much more smoothly to its own surface (without OpenGL). Is there any way that I can m...

If I build and link an OpenGL application using only OpenGL ES 1.x calls, will it still work?

I am writing an OpenGL game which will hopefuflly be for both linux and iphoneOS, I basically want to be able to build using the OpenGL ES 1.5 headers and run it on my linux desktop. Can I do this? IE, I want to only use the subset of API calls common between OpenGL and OpenGL-ES. Doing the above and linking with normal libGL.a from my ...

Most effective "architecture" for layered 2D app using OpenGL on iPhone?

Hi all. I'm working on an iPhone OS app whose primary view is a 2-D OpenGL view (this is a subclass of Apple's EAGLView class, basically setting up an ortho-projected 2D environment) that the user interacts with directly. Sometimes (not at all times) I'd like to render some controls on top of this baseline GL view-- think like a Heads-U...

Trouble with Native OpenGL Renderer

I am using Native code to render OpenGL in Android and I get periodic errors that look like this: ERROR/IMGSRV(1435): frameresource.c:610: WaitUntilResourceIsNotNeeded: PVRSRVEventObjectWait failed ERROR/IMGSRV(1018): sgxif.c:124: WaitForRender: PVRSRVEventObjectWait failed ERROR/IMGSRV(1435): osfunc_um.c:318: PVRSRVEventOb...

How does GLPaint work

Ok completely OpenGL-ES noob question. If anyone could explain how apple does GLPaint or better yet the VERY BASIC code of how they accomplished that, I would be thrilled. I am honestly not trying to ask for you to write my program, but trying to understand the basics of how apple accomplished the GLPaint drawing feature. P.S: I don't...

Introduction to 3D Graphics Programming

Hi everyone! I'm a self-taught programmer with absolutely nil 3D programming experience. A client of mine has related to me an idea for an iPhone app that requires OpenGL ES 2.0 for it's inherently complex 3D structure and animations. Where do I start on this ( albeit long ) journey toward OpenGL ES competence? I'm willing to put in ...

Android runs OpenGL ES 1.1 or 1.0?

I'm developing a native app for Android and I'm trying to use functions such as glIsEnabled which appear to be only available in OpenGL ES 1.1. Google's docs claim that NDK 1.6R1 supports OpenGL ES v1.1 but the function call fails with "unimplemented Open GL ES API" and if i do a glGetString(GL_VERSION) it returns "OpenGL ES 1.0 CM" as t...

Implementing flipview in a iPhone OpenGL ES app?

Hi, I was wondering if anyone could help me out implementing a flipview within an OpenGL ES iPhone template? ...

GLUI problem when using cocos2d OpenGL

Has anyone come across this problem when building with cocos2d (OpenGL library for iPhone 2D games)? "glui/GL/glui.h" file is not found gluOrtho2D was not declared GL_COLOR_BUFFER_BIT was not declared. There seems to be very little info on GLUI for iPhone on the web. I am new to OpenGL, so appreciate the help! I have included Open...

OpenGLES 1.1 and 2.0, supporting both

I have 2 separate renderers, one for 1.1 and another for 2.2 I have a bunch of Items which hold image information and the texture handle generated by whichever renderer I am using. Items are just dumb objects and I don't want to introduce any OpenGL specific functionality into them. The problem is, I need to store their texture handl...

OpenGL ES 2.0 SDK for Windows Mobile

I would like to get started developing native (C/C++) OpenGL ES 2.0 applications for Windows Mobile (version 5 or later, any version would do, really). I do however have trouble finding appropriate headers and libraries. What I am looking for is a OpenGL ES 2.0 SDK for Windows Mobile, or an SDK which contains the appropriate headers and...

OpenGL ES - huge map, best practice

If I want to render just a huge map, what is the best practice when using OpenGL ES with a mobile device (Android or iPhone based)? What is the best structure to contain all the vertices, normales and texture coordinates? I guess using a interleaved structure may give you some performance benefits caused by memory caching. Ok? Should ...

What language should I learn to prepare for WebGL?

I am thinking about making a 3D game with WebGL (just for conceptual purposes, for now), but all I have never done anything in 3D and have only programmed in PHP for the most part. From what I understand, WebGL is Javascript, which I use heavily in all of my projects, but it is also my understanding that it is very different from regula...