SDL GL context and rendering GLX Pixmaps

I am writing an SDL test app that suppoed to render textures created
from glx pixmaps.

In my low level thread I create an X pixmap default , GLX pixmaps, GL
context. I then update the GLXPixmaps with a video decoding routine,
make the context current, create a texture. At this point the texture
is backed by updated data from GLX/x Pixmap. My goal now is to show
this using SDL/open GL. In my SDL code, I create the window with

SDL_SetVideoMode(dispW, dispH, 32, SDL_OPENGL);

followed by other init routines for deocding. Then in a loop I call my
decoder routine which gives me textures. At this point, I guess I am
supposed to make the SDL-open GL context current display the texture.
But I am lost in two different places:

  1. How to pass the window id created with SDL_SetVideoMode to my
    lower level routine which creates x/glx pixmap out of it.
  2. How to get a hold of the texture that got passed from lower level,
    make it current and display it?