st/mesa: test for FEATURE defines
authornobled <nobled@dreamwidth.org>
Fri, 13 Aug 2010 20:23:11 +0000 (20:23 +0000)
committerChia-I Wu <olv@lunarg.com>
Mon, 16 Aug 2010 12:29:19 +0000 (20:29 +0800)
'struct dd_function_table' only conditionally contains
the function pointer NewFramebuffer and friends based on
FEATURE_EXT_framebuffer_* defines. (See src/mesa/main/dd.h)

Fixes the build when the features are disabled and the vfuncs
don't exist.

src/mesa/state_tracker/st_cb_fbo.c

index 13119ce2037fb6510fca0debec4507589809c830..86bb78890324111022feaeb5ee327f533da6fdfe 100644 (file)
@@ -543,6 +543,7 @@ st_ReadBuffer(GLcontext *ctx, GLenum buffer)
 
 void st_init_fbo_functions(struct dd_function_table *functions)
 {
+#if FEATURE_EXT_framebuffer_object
    functions->NewFramebuffer = st_new_framebuffer;
    functions->NewRenderbuffer = st_new_renderbuffer;
    functions->BindFramebuffer = st_bind_framebuffer;
@@ -550,6 +551,7 @@ void st_init_fbo_functions(struct dd_function_table *functions)
    functions->RenderTexture = st_render_texture;
    functions->FinishRenderTexture = st_finish_render_texture;
    functions->ValidateFramebuffer = st_validate_framebuffer;
+#endif
    /* no longer needed by core Mesa, drivers handle resizes...
    functions->ResizeBuffers = st_resize_buffers;
    */