<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>OpenGL Discussion and Help Forums - OpenGL on Linux</title>
		<link>http://www.opengl.org/discussion_boards/</link>
		<description>Discussions specific to Linux - getting things to work, hardware acceleration and coding</description>
		<language>en</language>
		<lastBuildDate>Mon, 20 May 2013 02:07:21 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.opengl.org/discussion_boards/images/misc/rss.png</url>
			<title>OpenGL Discussion and Help Forums - OpenGL on Linux</title>
			<link>http://www.opengl.org/discussion_boards/</link>
		</image>
		<item>
			<title>xdbeBackBuffer glxMakeCurrent GLXBadDrawable</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181721-xdbeBackBuffer-glxMakeCurrent-GLXBadDrawable?goto=newpost</link>
			<pubDate>Fri, 17 May 2013 12:27:49 GMT</pubDate>
			<description><![CDATA[Hi 
 
I'm trying to double buffer an animated image being written to an X Window on RHEL 5.0 using xdbe and glDrawPixels 
 
I'm getting a...]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I'm trying to double buffer an animated image being written to an X Window on RHEL 5.0 using xdbe and glDrawPixels<br />
<br />
I'm getting a GLXBadDrawable error when I try to make the xdbe back buffer current using glxMakeCurrent. The error occurs in the glxMakeCurrentCall.<br />
<br />
Using the back buffer for calls to XDrawString (for example) works fine and using the primary Window/Front buffer in glxMakeCurrent also works fine.<br />
<br />
The actual back buffer drawable value is contiguous with the Window value and works with normal X calls so is clearly correct.<br />
<br />
Can't find any reference to this on the web. Any ideas?<br />
<br />
Thanks<br />
<br />
John</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>JohnTheSoftware</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181721-xdbeBackBuffer-glxMakeCurrent-GLXBadDrawable</guid>
		</item>
		<item>
			<title>glGenVertexArrays returns 0 without glError in worker-thread?</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181708-glGenVertexArrays-returns-0-without-glError-in-worker-thread?goto=newpost</link>
			<pubDate>Thu, 16 May 2013 07:32:19 GMT</pubDate>
			<description><![CDATA[To change the scene-graph during runtime I'm using several working threads which disable the render-loop and update the gl-context (load/unload...]]></description>
			<content:encoded><![CDATA[<div>To change the scene-graph during runtime I'm using several working threads which disable the render-loop and update the gl-context (load/unload shaders / replace buffers etc.) e.g.<br />
<br />
stop render-loop<br />
get context<br />
update<br />
continue render-loop<br />
<br />
If I try to generate a vao in a worker thread with:<br />
<br />
   <b>glGenVertexArrays(1, &amp;vaoId);</b><br />
<br />
<i>vaoId</i> (the vertex array name) is <b>0</b> and glGenVertexArrays doesn't cast any error message.<br />
<br />
I use a library for the gl-context processing but the code looks like this:<br />
<b><br />
 glXMakeCurrent(_glfw.x11.display, window-&gt;x11.handle, window-&gt;glx.context);</b><br />
<br />
This behaviour isn't described in the SDK documatation about glGenVertexArrays.<br />
<br />
I'm using a 3.2 core context (also tested with 4.3). My actual workaround would be to create a name-heap at startup and manage them by myself instead of using the gl-Is and gl-delete functions.</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>yousry</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181708-glGenVertexArrays-returns-0-without-glError-in-worker-thread</guid>
		</item>
		<item>
			<title>Sharing contexts with GLX for multithreaded app</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181698-Sharing-contexts-with-GLX-for-multithreaded-app?goto=newpost</link>
			<pubDate>Wed, 15 May 2013 08:59:18 GMT</pubDate>
			<description><![CDATA[Hello everyone. 
 
I'm programming a flight simulator app and I have data for the whole world. 
Then, there is a lot of textures and geometry to load...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone.<br />
<br />
I'm programming a flight simulator app and I have data for the whole world.<br />
Then, there is a lot of textures and geometry to load so I made a background thread that dynamically load all that data depending on my position on Earth.<br />
Since I'm using SOIL to load my textures, I need to create a 2nd context for that background thread that will share OpenGL data with the main thread's context.<br />
<br />
I use GLX to manage my window and I didn't find any example of this. I just know which functions to use but I'm facing some problems.<br />
<br />
Here's what I do:<br />
<br />
- init XLib thread support<br />
- create the foreground context<br />
- create the background context with the foreground one as shareList<br />
- make the foreground context current for the rendering thread<br />
- create the loader thread passing a structure containing the Display, the Window and the background context<br />
- in the loader thread, make the background context current <br />
<br />
It crashes with a segfault on the last step, when I call glXMakeCurrent with the Display, the Window and the thread context...<br />
<br />
I'm doing something wrong but I don't know what and can't find solutions on forums.<br />
Do you have any idea ?<br />
<br />
Thank you for your help ! <br />
<br />
Here's my full code :<br />
<br />
main<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Display *dpy;
Window win;
GLXContext foregroundCtx, backgroundCtx;
&nbsp;
int32_t main(int32_t argc, char** argv) 
{       
    //init my own stuff (data paths, ini...)
    initVisualSystem(argc, argv);
&nbsp;
    //create the window
    initXDisplay();
&nbsp;
    glewInit();
    //init my openGL stuff and create background thread
    init(dpy, &amp;backgroundCtx, &amp;win, argc, argv);
&nbsp;
    event_loop(dpy, win);
&nbsp;
    cleanVisualSystem();
&nbsp;
    //XClean
    glXDestroyContext(dpy, foregroundCtx);
    glXDestroyContext(dpy, backgroundCtx);
    XDestroyWindow(dpy, win);
    XCloseDisplay(dpy);
&nbsp;
    return 0;
}</pre></div></code><hr />
</div><br />
initXDisplay<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">void initXDisplay()
{
    XInitThreads();
&nbsp;
    dpy = XOpenDisplay(NULL);
    if (!dpy) 
    {
        cerr &lt;&lt; &quot;Error: couldn't open display&quot; &lt;&lt; endl;
        exit(1);
    }
&nbsp;
    uint32_t width = renderer.getView()-&gt;getWidth();
    uint32_t height = renderer.getView()-&gt;getHeight();
&nbsp;
    make_window(dpy, &quot;XN3&quot;, 0, 0, width, height, &amp;win, &amp;foregroundCtx, &amp;backgroundCtx);
&nbsp;
    XMapWindow(dpy, win);
    &#91;b&#93;glXMakeCurrent(dpy, win, foregroundCtx);&#91;/b&#93;
&nbsp;
    if (FULLSCREEN) 
    {
        makeFullscreen(dpy, win);
    }
    hideCursor(dpy, win);
}
&nbsp;
&nbsp;
static void make_window( Display *dpy, const char *name,
             int x, int y, int width, int height,
             Window *winRet, GLXContext *foregroundCtxRet, GLXContext *backgroundCtxRet)
{
    if(VSYNC)
        putenv( (char *) &quot;__GL_SYNC_TO_VBLANK=1&quot; );
    else
        putenv( (char *) &quot;__GL_SYNC_TO_VBLANK=0&quot; );
&nbsp;
    int attrib&#91;&#93; = { GLX_RGBA,
                     GLX_RED_SIZE, 1,
                     GLX_GREEN_SIZE, 1,
                     GLX_BLUE_SIZE, 1,
                     GLX_DOUBLEBUFFER,
                     GLX_DEPTH_SIZE, 24,
                     GLX_SAMPLE_BUFFERS  , 1*MULTISAMPLING,      // &lt;-- MSAA
                     GLX_SAMPLES         , 4*MULTISAMPLING,      // &lt;-- MSAA
                     None };
    int scrnum;
    XSetWindowAttributes attr;
    unsigned long mask;
    Window root;
    Window win;
    GLXContext foregroundCtx, backgroundCtx;
    XVisualInfo *visinfo;
&nbsp;
    scrnum = DefaultScreen( dpy );
    root = RootWindow( dpy, scrnum );
&nbsp;
    visinfo = glXChooseVisual( dpy, scrnum, attrib );
    if (!visinfo) {
       printf(&quot;Error: couldn't get an RGB, Double-buffered visual\n&quot;);
       exit(1);
    }
&nbsp;
    /* window attributes */
    attr.background_pixel = 0;
    attr.border_pixel = 0;
    attr.colormap = XCreateColormap( dpy, root, visinfo-&gt;visual, AllocNone);
    attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPress | PointerMotionMask;
    mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
&nbsp;
    win = XCreateWindow( dpy, root, 0, 0, width, height,
                         0, visinfo-&gt;depth, InputOutput,
                         visinfo-&gt;visual, mask, &amp;attr );
&nbsp;
    /* set hints and properties */
    {
       XSizeHints sizehints;
       sizehints.x = x;
       sizehints.y = y;
       sizehints.width  = width;
       sizehints.height = height;
       sizehints.flags = USSize | USPosition;
       XSetNormalHints(dpy, win, &amp;sizehints);
       XSetStandardProperties(dpy, win, name, name,
                               None, (char **)NULL, 0, &amp;sizehints);
    }
&nbsp;
    foregroundCtx = glXCreateContext( dpy, visinfo, NULL, True );
    if (!foregroundCtx) {
       printf(&quot;Error: glXCreateContext for mainCtx failed\n&quot;);
       exit(1);
    }  
    backgroundCtx = glXCreateContext( dpy, visinfo, foregroundCtx, True );
    if (!backgroundCtx) {
       printf(&quot;Error: glXCreateContext for threadCtx failed\n&quot;);
       exit(1);
    }
&nbsp;
    XFree(visinfo);
&nbsp;
    *winRet = win;
    *foregroundCtxRet = foregroundCtx;
    *backgroundCtxRet = backgroundCtx;
}</pre></div></code><hr />
</div><br />
init<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">void init(Display *dpy, GLXContext* backgroundCtx, Window* win, int32_t argc, char** argv)
{          
    //init my OpenGL stuff (shaders...)
    ...
&nbsp;
    SLoaderThread sLoaderThread;
    sLoaderThread.pBV3DManager = renderer.getBV3DManager();
    sLoaderThread.dpy = dpy;
    sLoaderThread.backgroundCtx = backgroundCtx;
    sLoaderThread.win = win;
    pthread_create(&amp;loaderThread, NULL, startLoaderThread, (void*)&amp;sLoaderThread);
}
&nbsp;
struct SLoaderThread
{
    CBV3DManager* pBV3DManager;    //manages my world geometries and textures
    Display *dpy;
    GLXContext* backgroundCtx;
    Window* win;
};
&nbsp;
&nbsp;
void* startLoaderThread(void* data)
{
    SLoaderThread* pSLoaderThread = (SLoaderThread*)data;
&nbsp;
    glXMakeCurrent(pSLoaderThread-&gt;dpy, *pSLoaderThread-&gt;win, *pSLoaderThread-&gt;backgroundCtx);    //Crashes here with a segfault
    while(1)
    {
        pSLoaderThread-&gt;pBV3DManager-&gt;updateZones();
    }
    return NULL;
}</pre></div></code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>Vylsain</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181698-Sharing-contexts-with-GLX-for-multithreaded-app</guid>
		</item>
		<item>
			<title>RGBA filling in texture is not working using gles</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181666-RGBA-filling-in-texture-is-not-working-using-gles?goto=newpost</link>
			<pubDate>Fri, 10 May 2013 06:40:17 GMT</pubDate>
			<description>I am writing a code using gles. I created a texture and tried to fill that using different colours, But when i swapped the buffer only one color is...</description>
			<content:encoded><![CDATA[<div>I am writing a code using gles. I created a texture and tried to fill that using different colours, But when i swapped the buffer only one color is visible at whole screen.<br />
<br />
I am turning off the filtering using  glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST) and glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST). <br />
<br />
My texture width and height is 1920*1024.<br />
and i want to draw the complete texture as it is on my Device screen.<br />
<br />
Any help would be appreciated.</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>anilec</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181666-RGBA-filling-in-texture-is-not-working-using-gles</guid>
		</item>
		<item>
			<title>GLSL version confusion</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181647-GLSL-version-confusion?goto=newpost</link>
			<pubDate>Wed, 08 May 2013 08:58:58 GMT</pubDate>
			<description>Hi, 
Ubuntu 13.4 64bits 
Intel Mobile GM965/GL960 Integrated Graphics Controller 
My glxinfo gives: 
OpenGL vendor string: Intel Open Source...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
Ubuntu 13.4 64bits<br />
Intel Mobile GM965/GL960 Integrated Graphics Controller<br />
My glxinfo gives:<br />
OpenGL vendor string: Intel Open Source Technology Center<br />
OpenGL renderer string: Mesa DRI Intel(R) 965GM <br />
OpenGL version string: 2.1 Mesa 9.1.1<br />
OpenGL shading language version string: 1.20<br />
<br />
When opening a WebGL page in FireFox as well as Chromium with &quot;#version  110&quot; (or anything higher than 100),  I get an error:<br />
&quot;Error compiling shaderERROR: 0:1: '110' : version number not supported&quot;<br />
How is this possible? <br />
The GLSL version is 1.20.<br />
Thanks.</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>wimmla</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181647-GLSL-version-confusion</guid>
		</item>
		<item>
			<title>FBO missing attachment issue</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181583-FBO-missing-attachment-issue?goto=newpost</link>
			<pubDate>Tue, 30 Apr 2013 02:59:51 GMT</pubDate>
			<description><![CDATA[Hello folks, 
 
I'm getting a weird GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT status on an FBO that contains only a depth attachment. This didn't...]]></description>
			<content:encoded><![CDATA[<div>Hello folks,<br />
<br />
I'm getting a weird <i>GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT</i> status on an FBO that contains only a depth attachment. This didn't happen on my OSX station, so I suspect Linux drivers to be at fault. Here is what <i>apitrace</i> thinks is going on.<br />
<b>Texture &amp; FBO creation:</b><br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">529 glBindTexture(target = GL_TEXTURE_2D, texture = 37)
530 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_DEPTH_COMPONENT, width = 512, height = 512, border = 0, format = GL_DEPTH_COMPONENT, type = GL_UNSIGNED_BYTE, pixels = NULL)
531 glGenFramebuffers(n = 1, framebuffers = &amp;4)</pre></div></code><hr />
</div><b>Framebuffer binding:</b><br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">1134 glBindFramebuffer(target = GL_DRAW_FRAMEBUFFER, framebuffer = 4)
1135 glFramebufferTexture(target = GL_DRAW_FRAMEBUFFER, attachment = GL_DEPTH_ATTACHMENT, texture = 37, level = 0)
1136 glDrawBuffer(mode = GL_ZERO)
1137 glCheckFramebufferStatus(target = GL_DRAW_FRAMEBUFFER) = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT</pre></div></code><hr />
</div>The description for this FBO status is &quot;No images are attached to the framebuffer&quot;. In my case, there is clearly an image (depth texture) attached to it, so the status is at least misleading.<br />
<br />
<b>System Info:</b><br />
Linux mezon 3.8.10-1-ARCH #1 SMP PREEMPT Sat Apr 27 12:36:59 CEST 2013 x86_64 GNU/Linux<br />
OpenGL vendor string: X.Org<br />
OpenGL renderer string: Gallium 0.4 on AMD RV730<br />
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.1.1</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>DmitryM</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181583-FBO-missing-attachment-issue</guid>
		</item>
		<item>
			<title>serial reading</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181534-serial-reading?goto=newpost</link>
			<pubDate>Tue, 23 Apr 2013 15:08:39 GMT</pubDate>
			<description>is it possible to import data serially into glvertex3f function 
i mean inside like glvertext3f(call values ) 
please help me</description>
			<content:encoded><![CDATA[<div>is it possible to import data serially into glvertex3f function<br />
i mean inside like glvertext3f(call values )<br />
please help me</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>tharageorge</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181534-serial-reading</guid>
		</item>
		<item>
			<title>Connect Rdp via ubuntu 12.04 to Windows Server 2012 - OpenGL not workin`</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181533-Connect-Rdp-via-ubuntu-12-04-to-Windows-Server-2012-OpenGL-not-workin?goto=newpost</link>
			<pubDate>Tue, 23 Apr 2013 09:42:53 GMT</pubDate>
			<description><![CDATA[Hi! i have this problem. I'm connected with remmina remote desktop from ubuntu to a Server who had Windows Server 2012 software.. 
I work with...]]></description>
			<content:encoded><![CDATA[<div>Hi! i have this problem. I'm connected with remmina remote desktop from ubuntu to a Server who had Windows Server 2012 software..<br />
I work with photoshop and i want to work 3d but Open GL doesn't appear. What I have to do? Please Help. Thank you in advance.<br />
<br />
Jon.</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>Jonfr3</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181533-Connect-Rdp-via-ubuntu-12-04-to-Windows-Server-2012-OpenGL-not-workin</guid>
		</item>
		<item>
			<title><![CDATA[glCopyPixels doesn't work on Ubuntu 10.04]]></title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181525-glCopyPixels-doesn-t-work-on-Ubuntu-10-04?goto=newpost</link>
			<pubDate>Mon, 22 Apr 2013 06:46:01 GMT</pubDate>
			<description><![CDATA[I use glCopyPixels to implement that a image (filled in a window) shift from left to right, but it doesn't work and generate a error number, the...]]></description>
			<content:encoded><![CDATA[<div>I use glCopyPixels to implement that a image (filled in a window) shift from left to right, but it doesn't work and generate a error number, the error number doesn't match any error number define in the documentation of glCopyPixels.Does anyone know what is the problem?<br />
PS:The Video card I use is ATI Radeon HD 5670 and the driver support GL 4.2</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/8-OpenGL-on-Linux">OpenGL on Linux</category>
			<dc:creator>hzl2928963</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181525-glCopyPixels-doesn-t-work-on-Ubuntu-10-04</guid>
		</item>
	</channel>
</rss>
