1
0
Fork 0
Commit graph

7 commits

Author SHA1 Message Date
Neil Roberts
19058afe82 Removed COGLhandle and changed shader and program functions to be
wrapped in reference-counted CoglHandles instead.

	* clutter/cogl/gl/cogl-shader.c: 
	* clutter/cogl/gl/cogl-shader.h: 
	* clutter/cogl/gl/cogl-program.c: 
	* clutter/cogl/gl/cogl-program.h: 
	New files to hold the shader and program functions.

	* clutter/cogl/gl/cogl.c: Removed shader and program functions.

	* clutter/cogl/common/cogl-handle.h: New header to define
	COGL_HANDLE_DEFINE which helps build functions to create
	reference-counted handles. This reduces the amount of duplicated
	code.

	* clutter/cogl/gl/cogl-texture.c: 
	* clutter/cogl/gles/cogl-texture.c: 
	* clutter/cogl/gl/cogl-fbo.c: Converted to use COGL_HANDLE_DEFINE
	from cogl-handle.h to avoid duplicating some of the common code.

	* clutter/cogl/gles/cogl-defines.h.in: 
	* clutter/cogl/gl/cogl-defines.h.in: Removed COGLhandle

	* clutter/cogl/gl/cogl-context.h: Added handle arrays for programs
	and shaders.

	* clutter/cogl/gl/cogl-context.c (cogl_create_context): Added
	initialisers for shader_handles and program_handles.
	(cogl_destroy_context): Added calls to g_array_free for all handle
	arrays.

	* clutter/cogl/gl/Makefile.am (libclutter_cogl_la_SOURCES): Added
	cogl-{program,shader}.{c,h}

	* clutter/cogl/common/Makefile.am
	(libclutter_cogl_common_la_SOURCES): Added cogl-handle.h

	* clutter/cogl/gles/cogl.c:
	* clutter/cogl/cogl.h.in: Programs and shaders are now wrapped in
	CoglHandles instead of COGLhandles. cogl_program_destroy and
	cogl_shader_destroy is now replaced with cogl_program_unref and
	cogl_shader_unref. cogl_program_ref and cogl_shader_ref are also
	added.

	* clutter/clutter-shader.c: Converted to use CoglHandles for the
	programs and shaders instead of COGLhandles.

	* cogl/cogl-sections.txt: Added cogl_shader_ref,
	cogl_shader_unref, cogl_is_shader, cogl_program_ref,
	cogl_program_unref, cogl_is_program and cogl_is_offscreen.
2008-04-29 16:10:37 +00:00
Emmanuele Bassi
e2f72ae557 2008-01-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/cogl.h: Rename COGLhandleARB to COGLhandle.

	* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/cogl/gl/cogl.c: Update GL implementation of COGL.

	* clutter/cogl/gles/cogl-defines.h:
	* clutter/cogl/gles/cogl.c: Update GLES implementation of COGL.

	* clutter/clutter-shader.c: Fix ClutterShader to use the new
	COGLhandle type instead of COGLhandlerARB.
2008-01-16 10:38:05 +00:00
Øyvind Kolås
063386c1e2 Added COGLhandleARB since the underlying type on OSX is void*,
patch from Tommi Komulainen <tommi.komulainen@iki.fi>, (#694)
* clutter/cogl/gl/cogl-defines.h.in: Added COGLhandleARB typedef.
* clutter/cogl/cogl.h:
* clutter/cogl/gl/cogl.c:
* clutter/clutter-shader.c: Use COGLhandleARB instead of COGLint when
referring to program or shader handles.
2008-01-10 09:55:44 +00:00
Tomas Frydrych
263d8ea5a0 2007-12-19 Tomas Frydrych <tf@openedhand.com>
* clutter/Makefile.am:
	* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/pango/pangoclutter-render.c:
	* configure.ac:
	Fixes to allow cross-compilation with mingw (patch by Neil
	Roberts).
	Removed trailing whitespace.
2007-12-19 16:16:10 +00:00
Matthew Allum
9a2a4ef7b3 2007-12-14 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl-defines.h.in:
        * clutter/cogl/gles/cogl-defines.h:
        Add CLUTTER_COGL_HAS_GL/GLES defines
2007-12-14 12:36:45 +00:00
Øyvind Kolås
e92b864dff Support for shaders in clutter. At the moment limited to drivers
providing GLSL support.
* clutter/cogl/cogl.h: added rather direct binding of needed for glsl
shaders.
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl-defines.h: added stubs.
* clutter/cogl/gles/cogl.c: added stubs.
* clutter/glx/clutter-stage-glx.c:
(clutter_stage_glx_realize): unrelated memory management sanity fix.
(clutter_stage_glx_unrealize): unbind all shaders on stage unrealize.
* clutter/Makefile.am: added clutter-shader.[ch]
* clutter/clutter-actor.[ch]: adding shader capability to 
actors.
* clutter/clutter-feature.h: added CLUTTER_FEATURE_SHADERS_GLSL
* clutter/clutter-private.h: added stack of shaders to context.
* clutter/clutter-shader.[ch]: new.
* tests/Makefile.am: added shader test.
* tests/test-shader.c: (frame_cb), (main): simple shader test,
cycle through the inline shader with right/left mouse buttons.
2007-12-03 16:29:18 +00:00
Emmanuele Bassi
6fd7fbf460 2007-10-29 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac:
	* clutter/cogl/gl/cogl-defines.h.in: The OS X backend has a funny
	OpenGL header location, so it basically did break every application
	including clutter/cogl.h because the GL header inclusion depended
	on symbols defined into Clutter's config.h. Now, we define the
	GL header into the configure template and use it to create the
	cogl-defines.h file cogl.h includes.
2007-10-29 16:50:34 +00:00
Renamed from clutter/cogl/gl/cogl-defines.h (Browse further)