opengl

opengl - blending with previous contents of framebuffer

Hello, I am rendering to a texture through a framebuffer object, and when I draw transparent primitives, the primitives are blended properly with other primitives drawn in that single draw step, but they are not blended properly with the previous contents of the framebuffer. Is there a way to properly blend the contents of the texture w...

Loading textures. CGContextDrawImage performance

I have been using Texture2D class from standard iPhone SDK samples for loading and displaying OpenGL textures . It works fine for me, although, there is still one small problem I would like to solve. The performance of loading PNG textures is quite slow for me. I am trying to load about 10 PNG files with 512x512 size and it takes a whil...

Good source to learn about the differences between ATI and NVIDIA in OpenGL rendering?

The more i learn about OpenGL, the more problems i find! All i need is a list of the most common problems between ATI/NVIDIA cards, with solutions. So where is this magical source? ...

OpenGL pixel doubling on an NSOpenGLView

I have a 480x320 NSOpenGLView that I'd like to scale up to 960x640, but in a way that pixels appear as twice the size (and sharp). If I call [myglview setFrame:CGRectMake(0,0,960,640)]; the view scales up to the desired size, but the pixels rendered by OpenGL calls are still at the native resolution. How can I scale up the GL view,...

call OpenGL functions from another thread

My application has two threads: A and B. The A is the main thread and B is my video thread. The video thread has an initialized OpenGL context where OpenGL functions work properly. However, when I call OpenGL functions from thread A, the function failed with a 1282 error (GL_INVALID_OPERATION) Is it possible to call OpenGL functions from...

load ppm file using glut

I want to do a texture mapping to a PPM file in C++. Is there some way I can load the PPM file. Thanks. ...

What defines those OpenGL render dimension limits?

On my system, anything I draw with OpenGL outside of the range of around (-32700,32700) is not rendered (or folded back into the range, I can't figure out). What defines those limits? Can they be modified? Edit: Thanks all for pointing the right direction. It turned out my drawing code was using GLshort values. I replaced those by GL...

Draw World Map [WGS84] with OpenGL in a wide Range

hi I've got a quite specific problem. I want to draw a Map, consisting of 256x256 pixle Tiles (a lot of them). These cover a big area. The transformation to convert lat|lon(from the globe) to x|y (map) spawns quite big values. With these big values goes accurcy and so, if I go far away from the 0/0 Point, I get inaccuracies of multiple...

Texture mapping in OpenGL (with SOIL)

I'm having trouble getting a texture loaded with SOIL to show up properly on this quad. In case it's not clear, I'm just writing up a little 2D sprite engine, and this is the rendering portion (needs a bit of optimization without a doubt). I haven't done any OpenGL in a couple months, and I'm admittedly quite rusty. #include <OpenGL/Ope...

Center an OpenGL window with GLUT

I have an openGL window that is 640x480 that I need to center in the middle of the screen. I previously used: glutInitWindowPosition((GetSystemMetrics(SM_CXSCREEN)-640)/2, (GetSystemMetrics(SM_CYSCREEN)-480)/2); which WORKED. But now all of a sudden when I compile... Linking... 1>Project1.obj : error LNK2028:...

How can you animate in OpenGL without using the idle function glutIdleFunc()?

Basically, what is another method for animating besides idle? ...

How do you make sure the speed of OpenGL animation is consistent on different machines?

How do you control the speed of an animation? My objects animate faster on another's machine. void idle(void){ if (!wantPause){ circleSpin = circleSpin + 2.0; //spin circles if(circleSpin > 360.0) { circleSpin = circleSpin - 360.0; } diamondSpin = diamondSpin - 4.0; //spin diamonds if(diamondSpi...

where are the opengl libraries get stored on ubuntu : i need this to mention in my make file

where are the opengl libraries get stored on ubuntu9.10 : i need this to mention in my make file and what are all the link files i need to mention ...

What is the easiest way to print text to screen in OpenGL?

I need to print 3 lines of text to a window as a menu. 1 - Menu 2 - Pause 3 - Exit ...

glGetTexImage() doesnt work properly on ATI cards? fails when miplevel > 0

I use that function to get my texture from the graphics card, but for some reason it doesnt return anything on some cards if miplevel > 0 Here is the code im using to get image: glGetTexImage(GL_TEXTURE_2D, miplevel, GL_RGB, GL_UNSIGNED_BYTE, data); here is the code i use to check which method to use for mipmapping: ext = (char*)gl...

Augmented Reality - Mapping GPS to OpenGL

I am writing an Android AR application and have my engine working but it contains a strange behaviour that I can't seem to get fix. I am overlaying an OpenGL surface on the camera image and am placing 3D objects in the view accordingly. If I use dummy data for the location of my AR objects, i.e. LAT 10 LON 10 become x=10 y=10 on the Open...

How do I use cygwin to cross compile to linux, when I have an application that needs libX11.so, libGL.so, and libGLU.so?

Will I have to use the crosstool that cygwin provides to make the libX11.so, libGL.so, and libGLU.so libraries using their respective source code? Or do you know where I can find them compiled already for crosstool (I'm new to this cross compilation)? Just for clarification: I'm on a windows 7 machine trying to get my application also t...

What is a good code structure for api-independant vertex processing?

Currently working on a 3D media engine using C# and I have come across a little conundrum. I have my rending loop figured out, I got a great plug-in architecture and content management system and even a material pipeline all planned out. Then engine is planned to use DirectX and OpenGL (via 'renderer' plug-ins), along with both APIs' pro...

which tools to use for designing cooliris type applications?

Hi.. I want to utilise the 3dwall feature of cooliris, the physics effects of the icons in bumtop to design an application for making the image viewing more intuitive and interactive. I dont want to use flash as it would slow down the speed for interaction on desktop. PLease could someone tell me about choice of 1.) physics engine - ph...

how to start building cooliris in openGL and C++?

I have seen the post where somebody commented that cooliris can be built using C++ and openGL. I have just started learning openGL. I wanted to ask how to go about creating it? ...