#include <main/framebuffer.h>
#include <main/renderbuffer.h>
#include <main/shared.h>
+#include <main/viewport.h>
#include <swrast/s_context.h>
#include <swrast/s_renderbuffer.h>
#include <swrast_setup/swrast_setup.h>
{
(void) ctx;
if(name == GL_RENDERER)
- return (const GLubyte *) "ReactOS Software Implementation";
-
+ {
+ static const GLubyte renderer[] = { 'R','e','a','c','t','O','S',' ',
+ 'S','o','f','t','w','a','r','e',' ',
+ 'I','m','p','l','e','m','e','n','t','a','t','i','o','n',0 };
+ return renderer;
+ }
+ /* Don't claim to support the fancy extensions that mesa supports, they will be slow anyway */
+ if(name == GL_EXTENSIONS)
+ {
+ static const GLubyte extensions[] = { 0 };
+ return extensions;
+ }
return NULL;
}
pixel_formats[fb->format_index].accum_bits,
pixel_formats[fb->format_index].accum_bits,
pixel_formats[fb->format_index].alpha_bits ?
- pixel_formats[fb->format_index].accum_bits : 0,
- 1 /* One sampling level */);
+ pixel_formats[fb->format_index].accum_bits : 0);
if(!fb->gl_visual)
{
/* Initialize the context */
if(!_mesa_initialize_context(&sw_ctx->mesa,
- API_OPENGL,
fb->gl_visual,
NULL,
&mesa_drv_functions,
PROC sw_GetProcAddress(LPCSTR name)
{
/* We don't support any extensions */
- assert(FALSE);
+ WARN("Asking for proc address %s, returning NULL.\n", name);
return NULL;
}
ERR("_mesa_make_current filaed!\n");
return FALSE;
}
+
+ /* Set the viewport if this is the first time we initialize this context */
+ if(sw_ctx->mesa.Viewport.X == 0 &&
+ sw_ctx->mesa.Viewport.Y == 0 &&
+ sw_ctx->mesa.Viewport.Width == 0 &&
+ sw_ctx->mesa.Viewport.Height == 0)
+ {
+ _mesa_set_viewport(&sw_ctx->mesa, 0, 0, width, height);
+ }
/* update the framebuffer size */
_mesa_resize_framebuffer(&sw_ctx->mesa, fb->gl_buffer, width, height);