mga: enable GL_ARB_vertex_array_object extension
[mesa.git] / src / mesa / drivers / dri / mga / mga_xmesa.c
index 7e92396370139dae4b3d48feac95448e891fd2ed..6ec99dbc3ba79ae6039dd3cb00c459e310230af4 100644 (file)
@@ -66,6 +66,7 @@
 
 #include "GL/internal/dri_interface.h"
 
+#define need_GL_ARB_vertex_array_object
 #define need_GL_ARB_vertex_program
 #define need_GL_EXT_fog_coord
 #define need_GL_EXT_gpu_program_parameters
@@ -382,6 +383,7 @@ static const struct dri_extension g400_extensions[] =
 static const struct dri_extension card_extensions[] =
 {
    { "GL_ARB_texture_rectangle",      NULL },
+   { "GL_ARB_vertex_array_object",    GL_ARB_vertex_array_object_functions },
    { "GL_EXT_blend_logic_op",         NULL },
    { "GL_EXT_fog_coord",              GL_EXT_fog_coord_functions },
    /* paletted_textures currently doesn't work, but we could fix them later */
@@ -427,7 +429,7 @@ mgaCreateContext( gl_api api,
 {
    int i;
    unsigned   maxlevels;
-   GLcontext *ctx, *shareCtx;
+   struct gl_context *ctx, *shareCtx;
    mgaContextPtr mmesa;
    __DRIscreen *sPriv = driContextPriv->driScreenPriv;
    mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private;
@@ -457,7 +459,7 @@ mgaCreateContext( gl_api api,
       shareCtx = ((mgaContextPtr) sharedContextPrivate)->glCtx;
    else 
       shareCtx = NULL;
-   mmesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
+   mmesa->glCtx = _mesa_create_context(API_OPENGL, mesaVis, shareCtx,
                                        &functions, (void *) mmesa);
    if (!mmesa->glCtx) {
       FREE(mmesa);
@@ -820,7 +822,7 @@ mgaSwapBuffers(__DRIdrawable *dPriv)
 {
    if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
       mgaContextPtr mmesa;
-      GLcontext *ctx;
+      struct gl_context *ctx;
       mmesa = (mgaContextPtr) dPriv->driContextPriv->driverPrivate;
       ctx = mmesa->glCtx;