2009/4/2 Neil Roberts <[email protected]>

> On Thu, 2009-04-02 at 02:19 +0200, Julien Isorce wrote:
>
> > Is there something equivalent to:
> >
> > g_object_new (CLUTTER_GLX_TYPE_TEXTURE_PIXMAP,  "window", win,
> > "automatic-updates", TRUE, NULL);
> >
> > on win32 with clutter ?
>
> Unfortunately the Win32 backend has no equivalent to
> ClutterGLXTexturePixmap. I'm not aware of any equivalent to the
> texture-from-pixmap extension in WGL, although that doesn't mean there
> isn't one.


Hi,

I can read that "The functionality of this extension
(GLX_EXT_texture_from_pixmap) is similar to WGL_ARB_render_texture" from
http://people.freedesktop.org/~davidr/GLX_EXT_texture_from_pixmap.txt

Then I can read "This extension (WGL_ARB_render_texture) defines pixel
buffers (pbuffer for short) "
http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt

Here there is a start
http://www.gamedev.net/community/forums/topic.asp?topic_id=255756

I wanted to experiment WGL_ARB_render_texture:

-> call clutter_init (and make sure that clutter has created an opengl
context)
-> HWND win == clutter_win32_get_stage_window(default_stage)
-> at this point we have to be sure that there is a current opengl context
and attached to this window "win"
-> HDC dc = GetDC(win)
-> HPBUFFERARB pixelBuffer = wglCreatePbufferARB (dc, ...)
-> glGenTextures(1, &texture_id_from_pixel_buffer);
    glBindTexture(GL_TEXTURE_2D, texture_id_from_pixel_buffer);
-> cogl_texture_new_from_foreign(texture_id_from_pixel_buffer, ...)
-> ClutterActor*  tex = clutter_texture_new()
-> clutter_texture_set_cogl_texture(tex, texture_id_from_pixel_buffer)


Finally, tex is equivalent to the result of
"clutter_glx_texture_pixmap_new_with_window(xwindow)", but on win32.

I have not experimented it because I cannot find binaries/dev clutter
packages for msvc.

I tried to use clutter/master/build/msvc_2k5. genum things works but cogl.h
is not generated and it's using sdl backend instead of win32.
json files are includes too.
well it's weird.

On win32, for non professional developments (I mean experimentation and
personal projects), when using glib and other stuffs, people usually uses
the binaries/dev packages from there:
http://www.gtk.org/download-windows.html

Could you make binaries/dev clutter packages compatibles with those (glib,
pango, gtk, cairo etc..) from there:
http://www.gtk.org/download-windows.html
?

Sincerely

Julien


>
> Regards,
> - Neil
>
>

Reply via email to