opengl

Facing problem in setting up libpng

Hello, I am new to iphone game development so apologies if I ask something stupid. =( What I'm trying to do is to use libpng in my opengl project to load sprites using xcode. I've downloaded the package of libpng from internet and added its source to my project but when I try to build, it gives this error: "Command Developer/Platform...

In OpenGL, how can I determine the current drawing position?

I am trying to apply a scissor transformation over a specific part of my application. The problem is, I don't know the window coordinates, so I don't know exactly where to place the scissor. Is there an OpenGL state variable that would tell me where the current drawing position is? ...

OpenGL Nvidia Driver 259.12 texture not working

My OpenGL application which was working fine on ATI card stopped working when I put in an NVIDIA Quadro card. Texture simply don't work at all! I've reduced my program to a single display function which doesn't work: void glutDispCallback() { //ALLOCATE TEXTURE unsigned char * noise = new unsigned char [32 * 32 * 3]; memset(noise, 255...

OpenGL: how to limit to an image component?

I am busy climbing the learning curve for OpenGL, using Delphi (pascal); I am using an excellent text, but every example in the book draws to the entire Form. I want to place an image component on the from, and draw to that. I tried assigning the Device context handle (GDC) to the handle of the image control's canvas, rather than to t...

gluLookAt not working despite using Push/PopMatrix for transforms

I'm trying to use gluLookAt in an Android app to move the "camera" around, but I'm not seeing any results. I've looked around and I gather that any glLoadIndentity() calls will reset the matrix, cancelling the effect of the gluLookAt. Problem is, no matter what I put in my gluLookAt call, nothing moves. So here's the relevant part of ...

Antialiasing an entire scene after resterization

I ran into an issue while compiling an openGl code. The thing is that i want to achieve full scene anti-aliasing and i don't know how. I turned on force-antialiasing from the Nvidia control-panel and that was what i really meant to gain. I do it now with GL_POLYGON_SMOOTH. Obviously it is not efficient and good-looking. Here are the ques...

Lighting inside of a sphere?

I have this question in mind: I need to make a scene that looks like a real sky. My first idea was to make a cube and texturize it. It wasn't that good looking. I came up with the idea of using a sphere. But I couldn't light it from inside. I've put the camera on the origin watching (0,0,-100). Ambient and specular light source also at t...

Intensive graphics application in C# (with .NET/Mono)

Hi, If you were writing a 2d graphics intensive application in C# (like animation software or a music sequencer with automated graphics control), which one would be a better choice for graphics library? I'd like to develop a cross-platform application (at least portable on Windows 7, Linux), and I'd like to use only C#, avoiding mixing...

How can I adjust the Hue for Multiple UIImageVIews on the iPhone?

I've run into what originally seemed should be a very simple problem, but have spent many many hours trying to figure out and have gotten nowhere. I'm working with Apple's GLImageProcessing sample code and have simplified it to display one EAGLView with a UISlider that adjusts the hue of an image. I've modified EAGLView to inherit fro...

GLUTesselator for realtime tesselation?

I'm trying to make a vector drawing application using OpenGL which will allow the user to see the result in real time. The way I have it set up is with an edge flag callback so the glu tesselator only outputs triangles which I then pass to a VBO. I'v tried t make all my algorithms as fast as possible and this is not where my issue is. Ac...

Can anyone decipher why this OpenGL Hello World draws a black window?

Please excuse the length (and the width; it's for clarity on an IDE) but I thought of showing the full length of the code since the purpose is a simple Hello World in modern VBO and GLSL. It was initially based on http://people.freedesktop.org/~idr/OpenGL_tutorials/02-GLSL-hello-world.pdf The main point is no single error message or wa...

Render to FBO not working, gDEBugger says otherwise

I'm trying to render to a texture using an FBO. When trying to do so, gDEBugger shows the correct texture, but when drawing it on a quad its just "white" / the glColor4f. Here is the code to create the texture, fbo and renderbuffer: glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEX...

Getting started with OpenGL... in Android

I'm an experienced Android developer (if such thing exists) who has never worked with OpenGL before. There are various advantages of the Android platform (open-source, open distribution, portable, and so on) that make me think that it might be a great environment to finally get into OpenGL. But I'm also worried that the complexity of ...

OpenGL: Crashes at random OpenGL function call

I am getting weird problem, the crash happens at random times, for example i managed to use the 3d app for a while without crashing, then most of the times it crashes always when i suddenly render a lot of objects at same time. I have recently noticed that changing the huge texture surface on this ATI card will crash my whole computer ...

Numpy position and vector arrays - implement collision detection

I'm using point sprites in PyOpenGL with numpy and glDrawArrays. So I have two arrays, one for the points and one for the vectors. r = lambda: random.random() self.pts = numpy.zeros((2000,2), dtype=numpy.uint16) for pt in self.pts: pt[0] = 300*r() pt[1] = 200*r() self.vect...

OpenGL Multisampling Lines

Is there a way to just use multisampling on just lines drawn with OpenGL and not with the entire program? Thanks in advance! ...

Drawing in several windows with gl/glx

Hi, I am looking at the NeHe OpenGL tutorials (nehe.gamedev.net), which as almost every example also for Linux/glx. But how can open several windows and draw into all of them? Thanks! ...

g++ linker: /usr/lib/libGL.so.1: could not read symbols: Invalid operation

Hello, I'm trying to build a very simple OpenGL-app under Ubuntu 10.04 (I have a 32 bit system). When I'm trying to compile the file, I get the error message: g++ -L/usr/lib simple.cpp -lglut /usr/bin/ld: /tmp/ccoPczAo.o: undefined reference to symbol 'glEnd' /usr/bin/ld: note: 'glEnd' is defined in DSO //usr/lib/libGL.so.1 so try add...

Why does pressing numlock crash OCaml opengl program?

I don't have any experience with openGL, so maybe I'm just missing something. I have this ocaml code using lablGL. To compile I use ocamlopt -I +lablGL lablglut.cmxa lablgl.cmxa gl.ml -o gl.opt or ocamlc -I +lablGL lablglut.cma lablgl.cma gl.ml -o gl.byte let keyboard ~key ~x ~y = match key with | 27 -> exit 0 | _ -> ignor...

Making 3d Models Transparent in OpenGl and OpenFrameworks

I'm using c++ OpenFrameworks and ofx3dModelLoader to load in 3ds models that I've already created. This is working great. However I would like to smoothly transition models visually as the enter the frustum's back plane. I have fog working but would really like to fade the models in from transparency. Is there any way to do this eithe...