Hi everyone,
I'm working on an iPhone project in Xcode 3.2.4 for which I'd like to display textures using OpenGL ES 2.0. I don't have much previous experience working with OpenGL, but so far it doesn't seem too awful. So far I've mainly been referring to The OpenGL ES 2.0 Programming Guide (gold book).
Right now I've got a project base...
On iOS if I want to overlay two views and then blend from one scene to another.
E.g.: From menu of a game to the actual game. Have menu first, then on click ("start game") load game view and have a nice blend/transform from the menu to the game stage.
This is not a specific question for blending but on how to handle multiple views in...
Hello, I'm trying to port a ogre function written in opengl to opengl ES, but this function uses defines from glew.h, and I have no idea how to port this code.
The problem si that GL_S (for example) is not declared, because is int glew.h, and i have not glew.h for iPhone.
This is the code:
void GLRenderSystem::_setTextureCoordCalculat...
I am developing a simple iPhone app, which:
retrieves data from the server
presents the data
In order to present the data better I want to add nice 3d dynamic objects, for example:
a car with spinning wheels next to car sales bar chart.
power plant with smoke coming out of the chimney next to CO2 emission numbers
The questions a...
I'm trying to learn OpenGL ES with the "OpenGL ES Training Course" (An OpenGL ES tutorial). I use OPENGL-ES 1.1 WINDOWS PC EMULATION with visual studio 2010. I'm trying to comile the 'hello triangle' program and get 9 warnings and an error:
The warnings:
#include <stdio.h> skipped when looking for precompiled header use
#include <TCHAR...
I'm trying to implement textured points (e.g. point sprites) in OpenGL ES 2.0 for a particle system. Problem I'm having is the points all render as solid black squares, rather than having the texture properly mapped.
I have verified that gl_PointCoord is in fact returning x/y values from 0.0 to 1.0, which would map across the entir...
I'm trying to learn OpenGL ES with the "OpenGL ES Training Course" (An OpenGL ES tutorial). I use OPENGL-ES 1.1 WINDOWS PC EMULATION with visual studio 2010. I'm trying to compile the 'hello triangle' program and get an error:
'WinMain': function cannot be overloaded
EDIT: I have only one definition of WinMain in the project: The o...
I'm trying to port some old game code of mine and what I have is a 1024x768 array of pixels.
I created an CADisplayLink and each frame I glTexImage2D() the entire thing.
This causes a problem: cpu-side twiddling. Seems that iPad makes 32x32 twiddling in realtime, before uploading the texture.
Can this be avoided? I must keep my pixel...
I'm trying to render a simple textured quad on Android 2.2 using GLSurfaceView. I'm loading a BMP image (128x128) with BitmapFactory.decodeResource() - this seems to work. But whenever I try to put this bitmap into an OpenGL texture using GLUtils.glTexImage2D I get an OpenGL error: glGetError() returns 1280, GL_INVALID_ENUM. What am I do...
Hello, I am new to both openGL and android development so please forgive me if my question is very trivial.
I am trying to build a simple little app that takes input from the user in three EditTexts representing a 0 - 100% value for each component of a RGB color to be displayed in a GLSurfaceView.
The catch is that I need this to use o...
Hi guys
I have drawn a 2D triangle on the my EAGLView using openGL coding. Now my requirement is like, user can rotate this triangle 360 degree by his finger's motion.
My code is working pretty well but still not perfect. My triange is getting stucks for few pixels at some edges.
Here is sample of my rotation code :
GLfloat tot...
Hello,
I'm new to OpenGL ES and having a simple kind of problem in my project. I've successfully drawn a square on my screen but the problem is that my "drawView" function in my EAGLView is
only called once however I wrote code to call it again n again as in Xcode's OpenGL ES Template.
Do anyone have clue where's the mistake?
Followin...
[I'm going to be interviewed for a position, and I don't want to oversell myself...]
I can do just about anything in Objective-C (some things need a lot of code) in 2D, but I haven't actually learned any C fundamentals (except as related to Obj-C). For instance, if an Array is not an NSArray I don't know how to work with it. That said, ...
Hello, I'm trying to get a depth buffer working so I can start making a game for iOS. I'm fine with OpenGL and Objective-C for OSX but this is my first time making an iphone application.
I removed the ES1Renderer and ES2Renderer classes and moved the ES1 code into the EAGLView class. The default animation worked when I did that. When I ...
I'm just learning OpenGL ES on Android, and I am trying to get some kind of anisotropic filtering on textures. I want to increase the size of a sprite, with some kind of interpolation, instead of this "nearest-pixel-interpolation".
Is there anything like this in the OpenGL ES standard or do I have to make one texture for each size?
...
I have some objects on the screen and would like to rotate only one of them. I tried using the glRotatef(...) function but turns out glRotatef(...) rotates all my objects (rotates the camera, maybe?).
How can I rotate only one?
I use openGL ES 1.1
...
I have a cube which I want to rotate. I also have a light source GL_LIGHT0. I want to rotate the cube and leave the light source fixed in its location. But the light source is rotating together with my cube. I use OpenGL ES 1.1
Here's a snippet of my code to make my question more clear.
GLfloat glfarr[] = {...} //cube points
GLubyte glu...
Hey all,
I know that to save/restore matrix state you use standard push/pop operations. I haven't been able to find a decent convention for saving/restoring state such as when using glLineWidth() or glColor4ub().
It seems not really necessary as long as you set your line width or color up properly whenever you want to draw anything but...
hello, i am starting out with opengles coming from old opengl.
i see there is no immediate mode anymore. so functions like glVertex glTexCoord are missing, right?
instead i have to use vertexarrays. right?
how can i modify the values of those arrays each frame?
for example, if i want to animate the texture coordinates, in old OpenGL i...
I'm making an OpenGLES Android app using Android NDK, expanding from android's gljni example, which can be found here
It's using GLSurfaceView. Textures are initialized in a JNI function called from onSurfaceChanged() of GLSurfaceView.Renderer
When the user touches screen, the app needs more textures. In order to do so, glGenTextures(...