[141/906] some steps towards simplification. added a convenience function to gstglfilter and some comment here and there
This commit is contained in:
parent
7ea58ac050
commit
4eb4c0beea
@ -1996,6 +1996,13 @@ gst_gl_display_gen_fbo (GstGLDisplay* display, gint width, gint height,
|
|||||||
|
|
||||||
|
|
||||||
/* Called by glfilter */
|
/* Called by glfilter */
|
||||||
|
/* this function really has to be simplified... do we really need to
|
||||||
|
set projection this way? Wouldn't be better a set_projection
|
||||||
|
separate call? or just make glut functions available out of
|
||||||
|
gst-libs and call it if needed on drawcallback? -- Filippo */
|
||||||
|
/* GLCB too.. I think that only needed parameters should be
|
||||||
|
* GstGLDisplay *display and gpointer data, or just gpointer data */
|
||||||
|
/* ..everything here has to be simplified! */
|
||||||
gboolean
|
gboolean
|
||||||
gst_gl_display_use_fbo (GstGLDisplay* display, gint texture_fbo_width, gint texture_fbo_height,
|
gst_gl_display_use_fbo (GstGLDisplay* display, gint texture_fbo_width, gint texture_fbo_height,
|
||||||
GLuint fbo, GLuint depth_buffer, GLuint texture_fbo, GLCB cb,
|
GLuint fbo, GLuint depth_buffer, GLuint texture_fbo, GLCB cb,
|
||||||
|
@ -315,3 +315,19 @@ gst_gl_filter_do_transform (GstGLFilter* filter,
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* convenience functions to simplify filter development */
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_gl_filter_render_to_target (GstGLFilter *filter,
|
||||||
|
GLuint input, GLuint target,
|
||||||
|
GLCB func, gpointer data)
|
||||||
|
{
|
||||||
|
gst_gl_display_use_fbo (filter->display, filter->width, filter->height,
|
||||||
|
filter->fbo, filter->depthbuffer, target,
|
||||||
|
func,
|
||||||
|
filter->width, filter->height, input,
|
||||||
|
0, filter->width, 0, filter->height,
|
||||||
|
GST_GL_DISPLAY_PROJECTION_ORTHO2D,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
@ -72,6 +72,13 @@ struct _GstGLFilterClass
|
|||||||
|
|
||||||
GType gst_gl_filter_get_type(void);
|
GType gst_gl_filter_get_type(void);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_gl_filter_render_to_target (GstGLFilter *filter,
|
||||||
|
GLuint input, GLuint target,
|
||||||
|
GLCB func, gpointer data);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user