opengl

QGLWidget and hardware acceleration ?

Greetings all, Does simply subclassing QGLWidget and reimplementing paintEvent() make use of OpenGL and hardware acceleration? I create a QPainter and draw QImages in this paintEvent(). What happen inside the paintEvent() method of QGLWidget? Does it convert the images(QImage,QPixmap) into OpenGL textures? Does it use hardware acceler...

OpenGL translucent texture over other texture

I got a 2 png images, being used as textures in a Qt/C++ 2D OpenGL application. The first is used as some kind of "middle" ground and the second is used as an "object" being rendered "ontop" (Note: they all have the same z-value atm, I get the desired behaviour be rendering it in a defined order). The "object"-texture is partly transluce...

About FBX binary file format.

I want to read FBX binary format, but I want to not use FBX sdk of Autodesk. Please teach when someone knows that web sites of fbx binary file format. ...

How can I repeat a 3x9 texture in OpenGL's GLSL?

I have a texture with a 3x9 repeating section. I don't want to store the tesselated 1920x1080 image that I have for the texture, I'd much rather generate it in code so that it can be applied correctly at other resolutions. Any ideas on how I can do this? The original texture is here: http://img684.imageshack.us/img684/6282/matte1.png I ...

Compiling cairo and pango --with-included-modules

I'm trying to compile cairo together with pango to enable advanced font rendering in my application. I got it to work, but I cannot use unicode characters (i.e. I tested with Chinese character). When I run my application I get this message: (process:42776): Pango-WARNING **: Failed to load Pango module '/Users/pollux/Downloads/cairo_p...

OpenGL: How much memory anisotropic filtered textures will use?

I'm curious, does the anisotropic texture filtering increase the memory usage? And how to calculate it? ...

Faster method for rendering anisotropic textures?

Is there any faster methods for improving texture quality on oblique angles than using anisotropic texture filter? In my previous question i asked if it takes more memory than normal mip mapped textures, but apparently it doesnt, so i am hoping this could be optimized. So is there any way to optimize the rendering speed ? ...

How to apply multiple textures to a VBO of a cube?

Dear reader, I'm new to VBO's and read some articles on creating and using VBO's. I am working on a application where I want to create a dozen of rotating cubes. I'm connected to a server which pushes text messages to my application. When I receive 6 text messages, I render these messages using Pango and Cairo. Then I want to create t...

Strange Results with ChangeDisplaySettings and Intel graphics card

I've been getting weird results with ChangeDisplaySettings and my Intel Graphics card. I find that when I try to go fullscreen, it won't do it in the same way as other programs. My Intel control panel lets me handle different resolutions in 3 ways: Stretching the image, using the original resolution but centering the image, or Maintain...

GFLW threading tutorials

Hi everyone , i'm looking for some tutorials about Threads in GLFW ...

GlBufferDataARB is giving me memory issues

Basically I do something like this: GenerateLinePoly(Contour[i].DrawingPoints, Contour[i].Outline.OutlineWidth); Contour[i].Outline.OutlineSize = OutlineVec.size() / 2; glBindBufferARB(GL_ARRAY_BUFFER_ARB,Contour[i].Outline.OutlineVBO); glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * OutlineVec.size(), &Outlin...

Manage mapped memory (glMapBuffer) with std::vector

Hi everyone, it occurred to me that it would be a good idea to manage a range of mapped memory (from glMapBuffer) with a std::vector. // map data to ptr T* dataPtr = (T*)glMapBuffer(this->target, access); [... debug code ...] // try to construct a std::vector from dataPtr T* dataPtrLast = dataPtr + size; mappedVector = new std::vecto...

No keyboard input from GLUT while mouse is moving (In OS X)

So I just built an OpenGL application on a Mac for the first time. I'm using GLUT to get keyboard input. The trouble is, I've discovered that if I'm moving the mouse at the same time I push a button on the keyboard, my keyboard function doesn't get called! If I push a button when the mouse isn't moving, it gets called just fine. The same...

How to get OpenGL running on OSX

Hi, I normally program on Windows, but I got a macbook pro from my school, so I'm trying to make an OpenGL app for OSX. I downloaded and installed XCode, but I have no clue how to get a simple OpenGL app going. I would prefer not to use Objective-C, but I definitely don't want to use GLUT. Can someone point me in the right direction? ...

Transform quadrilateral into a rectangle ?

I have scene composed of one arbitrary quadrilateral. I need to be able to transform that quadrilateral into a rect. Each quad is in 2d coordinates, so they have 4 vertex (x_i, y_i). The transformation need to have an inverse because the idea is to go back to the original quad after manipulating the rectangle. What would be the easiest...

Dynamically changing a texture in OpenGL

I have some (OpenCV) code that generates images. I'm displaying these using OpenGL. When new images are created I run the following function (each time) with the same texture name and a new image: void loadCVTexture(GLuint& texture, const cv::Mat_<Vec3f>& image){ if(texture != 0){ glBindTexture(GL_TEXTURE_2D, texture); glTexSu...

How to use GLUT/OpenGL to render to a file?

I have a program which simulates a physical system that changes over time. I want to, at predetermined intervals (say every 10 seconds) output a visualization of the state of the simulation to a file. I want to do it in such a way that it is easy to "turn the visualization off" and not output the visualization at all. I am looking at O...

OpenGL: Buffer object performance issue

Hi, I have a question related to Buffer object performance. I have rendered a mesh using standard Vertex Arrays (not interleaved) and I wanted to change it to Buffer Object to get some performance boost. When I introduce buffers object I was in shock when I find out that using Buffers object lowers performance four times. I think that b...

glFramebufferTexture2D fails with GL_INVALID_VALUE

I'm seeing a certain call to glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0) regularly (not always though) fail with GL_INVALID_VALUE on NVidia (Quadro FX 4600 here, but happens also on other cards) hardware, with the newest (258.49) drivers (but similarly this also happened with older drivers). GPU m...

Installing OpenGL/GLUT & running C program?

I'm new to OpenGL and GLUT and need help installing them and running hello.c (see below) in Visual C++ 2010 Express Edition. I'm using Windows XP and was reading on the OpenGL wiki that the OpenGL Library is already installed on my computer. As a result, I only downloaded GLUT for Win32 dll, lib and header file and extracted it. I hav...