PBuffers.. and a hard time

Hi, I am currently working in a project where we are using SDL to keep cross-platform, but we still use a Render MOdule originnaly built to WIN. I am in the proccess bring that Render module to linux and now face a problem with pBuffers.

Original PBuffers code works on windows just because It uses all wgl stuff. No problem… since it can get the current context from windows EVEN if it was not created by traditional windows methods (SDL we use) since windows provides such function.

Now I need to re-write that piece of code and I see 2 options. Support pBuffers using SDL to give me the buffers pointers etc…( changing context etc… (but can´t find anything on SDL supporting it) OR I make an analogous solution to the windows one. But I can´t find a glxfunction that gives me the current context, I can only have the context by the function that creates it!!!

Does anyone have any idea of how to solve this?

>Now I need to re-write that piece of code and I
>see 2 options. Support pBuffers using SDL to
>give me the buffers pointers etc…( changing
>context etc… (but can´t find anything on SDL
>supporting it) OR I make an analogous solution
>to the windows one. But I can´t find a
>glxfunction that gives me the current context,
>I can only have the context by the function
>that creates it!!!

There were efforts to create a SDL Interface to RenderToTexture, however that Interface was considered as not important and not merged into the mainline.

the glX Function that return the currently bound render context is:
GLXContext glXGetCurrentContext( void );

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