i965: Enable NV_fog_distance
[mesa.git] / src / mesa / drivers / osmesa / osmesa.c
index ed69353743a1f2637b7784e70fa4ec1e35459b5b..3423eb632369f843fdf6116f26eabfe51c0f779a 100644 (file)
@@ -119,11 +119,13 @@ get_string( struct gl_context *ctx, GLenum name )
 static void
 osmesa_update_state(struct gl_context *ctx, GLuint new_state)
 {
+   if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
+      _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer);
+
    /* easy - just propogate */
    _swrast_InvalidateState( ctx, new_state );
    _swsetup_InvalidateState( ctx, new_state );
    _tnl_InvalidateState( ctx, new_state );
-   _vbo_InvalidateState( ctx, new_state );
 }
 
 static void
@@ -212,7 +214,6 @@ osmesa_choose_line_function( struct gl_context *ctx )
    }
 
    if (ctx->RenderMode != GL_RENDER ||
-       ctx->Line.SmoothFlag ||
        ctx->Texture._MaxEnabledTexImageUnit == -1 ||
        ctx->Light.ShadeModel != GL_FLAT ||
        ctx->Line.Width != 1.0F ||
@@ -831,6 +832,7 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
 
       /* Initialize device driver function table */
       _mesa_init_driver_functions(&functions);
+      _tnl_init_driver_draw_function(&functions);
       /* override with our functions */
       functions.GetString = get_string;
       functions.UpdateState = osmesa_update_state_wrapper;
@@ -911,6 +913,7 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
          swrast->choose_line = osmesa_choose_line;
          swrast->choose_triangle = osmesa_choose_triangle;
 
+         _mesa_override_extensions(ctx);
          _mesa_compute_version(ctx);
 
          if (ctx->Version < version_major * 10 + version_minor) {
@@ -1289,7 +1292,7 @@ OSMesaPostprocess(OSMesaContext osmesa, const char *filter,
 #define GL_GLEXT_PROTOTYPES
 #include "GL/gl.h"
 #include "glapi/glapi.h"
-#include "glapi/glapitable.h"
+#include "glapitable.h"
 
 #if defined(USE_MGL_NAMESPACE)
 #define NAME(func)  mgl##func
@@ -1305,6 +1308,6 @@ OSMesaPostprocess(OSMesaContext osmesa, const char *filter,
 
 /* skip normal ones */
 #define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
-#include "glapi/glapitemp.h"
+#include "glapitemp.h"
 
 #endif /* GLX_INDIRECT_RENDERING */