Xcomposite -> XRenderCreatePicture to OpenGL Texture

Help!!!

What I’m trying to do is using Xcomposite to be capable to grab the display in the backbuffer of my desktop applications running, convert them into texture and then present them inside an OpenGL application. So far so good, however I can’t figure it out how to convert the image that I got into memory to an OpenGL texture, check out the code below:
</font><blockquote><font size=“1” face=“Verdana, Arial”>code:</font><hr /><pre style=“font-size:x-small; font-family: monospace;”>#include <GL/gl.h>
#include <GL/glu.h>
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xrender.h>

int main(int argc, char ** argv)
{
Display *dpy = XOpenDisplay(":0.0");

bool hasNamePixmap = false;

int event_base, error_base;
if ( XCompositeQueryExtension( dpy, &event_base, &error_base ) )
{
	int major = 0, minor = 2;
	XCompositeQueryVersion( dpy, &major, &minor );	
	if ( major &gt; 0

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.