opengl

Error with bc++ and glut

hey guys This code compiles fine in Vc++ but in borland c++ gives me this error.. Please help me out.. The code has no syntax errors and works fine.. Seems like there is a problem with the header.. But these are the standard headers and library files Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland main.c: Error E2337 c:\Bor...

What is EGL And How Can I Use It

Hi all , Can Anybody explain me what is EGL And How it does ?! How can i use EGL with OpenGL-ES On Linux?! IS EGL a Layer Between Hardware And Operating System ?! ...

How to use OpenGL functions on a QT OpenGL Widget?

I'm starting off QT 4.6's example "OpenGL - 2D painting" It uses a subclass of QGLWidget, and makes painting operations with the class QPainter. I'd like to know how to do drawing directly with OpenGL functions on the OpenGL Widget. ...

Should Display Lists be cpu intensive?

My application is rendering about 100 display lists / second. While I do expect this to be intensive for the gpu, I don't see why it brings my cpu up to 80 - 90 %. Arn't display lists stored in the graphics card and not in system memory? What would I have to do to reduce this crazy cpu usage? My objects never change so that's why im usin...

OpenGL extensions causing linker problems

I'm trying to get the addresses for the VBO addon. In my stdafx.h I have the gl.h, glext.h and wglext.h If I do: glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)wglGetProcAddress("glGenBuffersARB"); glGenBuffersARB(0,0); in stdafx.cpp, this will compile. but if I try to use glGenBuffersARB(0,0); in any of my other h or cpp f...

Where to download all needed OpenGL libraries, includes and compiled dll's to make up-to-date games?

Is there any packages for this purpose, one download link? Edit: got VBO working now, so this question is useless for me atm, i can accept answers though if there ever comes one. ...

The best way to use Video with QGraphicsScene

I am currently using Phonon VideoWidgets inside of a QGraphicsScene using a QGraphicsProxyWidget. I have my viewport set to a QGLWidget. However, it causes me big issues when I try to apply some transforms to the video such as a rotation that isn't evenly divisible by 90 degrees since then it slows my program down a lot. After reading...

Using VBO's and CPU usage is very high

I'm really not sure what to do anymore. I'v made my application use VBO's and my cpu usage still goes into the 70's and 80's. My render proceedure works like this: Set the camera transformation if the shape has not been tesselated, tesselate it. create it's VBO if it has a VBO, use it. You will notice I have display lists too, I might ...

Best way to do alpha blending with OpenGL?

I'm drawing 2D Polygons, actually I'm drawing lots of triangles and using GLUOrtho2D. I noticed that by zooming out I got much better frame rates. I realized I was maxing out the graphics card's fill rate, not drawing too many polygons as I had initially suspected. I think this is because I'm drawing lots of overlapping polygons and usin...

OpenGL quad from normal

Hi Is possible to draw a quad given its normal vector, a point that is center of the quad and the size of the quad? I know the equation of a plane with normal vector n=(a,b,c) passing through the point (x_0,y_0,z_0) is given by a(x-x_0)+b(y-y_0)+c(z-z_0)=0. (from here) But how to find the coordinate of the four vertex of the quad? T...

OpenGL getting perspective pixel data

Hello, I am working with a 3D rendering of a large field containing various objects. My program views this field in perspective from a high point. I need to access the pixel data of (only) a rectangle in the field as viewed from above. I have the coordinates of this rectangle in the field, and would like to: (a) Find the pixels corresp...

Does this cause a memory leak?

I create my VBO like this: glGenBuffersARB(1,&polyvbo); glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo); glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * tempvct.size(),&tempvct[0],GL_DYNAMIC_COPY); Then to update it I just do the same thing: glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo); glBufferDataARB(GL_ARRAY_BU...

OpenGL 2d example game

Im beginning to learn SDL and OpenGL to start off game programming. I can load sprites and stuff in SDL but I want to learn to use OpenGL to load sprites and make the sprites move. I cant seem to find a single tutorial on 2D OpenGL game programming. From what I've read there are many advantages to using 2D with OpenGL rather than strictl...

compatibility of native code C++ and openGL in Windows Phone 7

Hi, We have a windows mobile 6.5 gaming application which uses openGL . Now we planned to port it to WP7 (windows phone 7). When I check the compatibility of native code C++ and openGL in WP7, they are telling that there is no support in the WP7. WP7 support only Silverlight, XNA and the .NET Framework. So what we thought of use XNA....

Should Direct3D be used over OpenGL in Windows?

Since Microsoft is generally a bit bias toward Direct3D, would a scene using VBO's in Direct3D be faster than the same scene using VBO's in OpenGL, or would it be the same since it's up to the Graphics Card driver? Thanks ...

Circle on non plane surface in opengl

Hi all . I need to draw a circle on some arbitrary non plane surface, but this circle should lay on surface and follow surface's irregular form. In other words ( that is actuially can be one of possible solutions) want to have a "shadow" like projection on non plane surface near the mouse pointer. Do I need to create in memory a sphere ...

OpenGL pausing problems.

Hi, I have the following function that is used as the glutKeyboardFunc function parameter: void handleKeypress(unsigned char key, //The key that was pressed int x, int y) { //The current mouse coordinates switch (key) { case 27: //Escape key exit(0); //Exit the program } if (key ...

Techniques to prevent overdraw (OpenGL)

I'm drawing lots of semi transparent polygons. My scene is 2D and uses 2f verticies. I can't use the depth buffer since it wont help because of alpha blending. What are some other techniques to reduce overdraw since this is what is crippling my application, not polygon counts since I use VBO's. Thanks ...

Zooming into the mouse position with a translation?

To zoom into the mouse position I was using: glTranslatef(current.ScalePoint.x,current.ScalePoint.y,0); glScalef(current.ScaleFactor,current.ScaleFactor,current.ScaleFactor); glTranslatef(-current.ScalePoint.x,-current.ScalePoint.y,0); so basically I translate to the new origin (the mouse position) then scale by the current sc...

Getting the points from wglUseFontOutlines?

I'm making a vector application for Windows. Right now i'm using wglUseFontOutlines to generate display lists which wrks well, except I would like to be able to let the user remodel the font. I would also like to use VBO's instead of DL's for this. Does Microsoft provide a way to get the points for this, or atleast the outlines, I could ...