summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/SConscript5
-rw-r--r--src/mesa/drivers/windows/gdi/SConscript38
-rw-r--r--src/mesa/drivers/windows/gdi/mesa.def107
-rw-r--r--src/mesa/drivers/windows/gdi/wgl.c4
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c11
-rw-r--r--src/mesa/drivers/windows/gdi/wmesadef.h2
6 files changed, 52 insertions, 115 deletions
diff --git a/src/mesa/drivers/SConscript b/src/mesa/drivers/SConscript
index 82159b65f56..ab0f8943290 100644
--- a/src/mesa/drivers/SConscript
+++ b/src/mesa/drivers/SConscript
@@ -1 +1,6 @@
+Import('*')
+
SConscript('osmesa/SConscript')
+
+if env['platform'] == 'windows':
+ SConscript('windows/gdi/SConscript')
diff --git a/src/mesa/drivers/windows/gdi/SConscript b/src/mesa/drivers/windows/gdi/SConscript
new file mode 100644
index 00000000000..10a7eeaa19f
--- /dev/null
+++ b/src/mesa/drivers/windows/gdi/SConscript
@@ -0,0 +1,38 @@
+Import('*')
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '#src/mapi',
+ '#src/mesa',
+])
+
+env.AppendUnique(CPPDEFINES = [
+ '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+])
+if not env['gles']:
+ # prevent _glapi_* from being declared __declspec(dllimport)
+ env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
+
+env.Prepend(LIBS = [
+ glapi,
+ mesa,
+ glsl,
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+])
+
+sources = [
+ 'mesa.def',
+ 'wgl.c',
+ 'wmesa.c',
+]
+
+mesagdi = env.SharedLibrary(
+ target = 'opengl32',
+ source = sources,
+)
+
+env.Alias('mesagdi', mesagdi)
diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def
index b537b3460c5..d5c98801d32 100644
--- a/src/mesa/drivers/windows/gdi/mesa.def
+++ b/src/mesa/drivers/windows/gdi/mesa.def
@@ -26,9 +26,6 @@ VERSION 6.5
; be needed (for the gl* functions) since the entry
; points are compiled with dllexport declspec.
;
-; However, this file is still needed to export "internal"
-; Mesa symbols for the benefit of the OSMESA32.DLL.
-;
EXPORTS
glNewList
glEndList
@@ -857,107 +854,3 @@ EXPORTS
wglUseFontOutlinesA
wglUseFontOutlinesW
wglGetExtensionsStringARB
-;
-; Mesa internals - mostly for OSMESA
- _vbo_CreateContext
- _vbo_DestroyContext
- _vbo_InvalidateState
- _glapi_check_multithread
- _glapi_get_context
- _glapi_get_proc_address
- _mesa_add_soft_renderbuffers
- _mesa_add_renderbuffer
- _mesa_check_conditional_render
- _mesa_choose_tex_format
- _mesa_create_framebuffer
- _mesa_create_visual
- _mesa_delete_array_object
- _mesa_delete_program
- _mesa_delete_texture_object
- _mesa_destroy_framebuffer
- _mesa_destroy_visual
- _mesa_enable_1_3_extensions
- _mesa_enable_1_4_extensions
- _mesa_enable_1_5_extensions
- _mesa_enable_2_0_extensions
- _mesa_enable_2_1_extensions
- _mesa_enable_sw_extensions
- _mesa_error
- _mesa_finish_render_texture
- _mesa_framebuffer_renderbuffer
- _mesa_free_context_data
- _mesa_free_texture_image_data
- _mesa_generate_mipmap
- _mesa_get_compressed_teximage
- _mesa_get_current_context
- _mesa_get_teximage
- _mesa_init_driver_functions
- _mesa_init_glsl_driver_functions
- _mesa_init_renderbuffer
- _mesa_initialize_context
- _mesa_make_current
- _mesa_new_array_object
- _mesa_new_framebuffer
- _mesa_new_program
- _mesa_new_renderbuffer
- _mesa_new_soft_renderbuffer
- _mesa_new_texture_image
- _mesa_new_texture_object
- _mesa_problem
- _mesa_reference_renderbuffer
- _mesa_remove_renderbuffer
- _mesa_render_texture
- _mesa_ResizeBuffersMESA
- _mesa_resize_framebuffer
- _mesa_store_compressed_teximage1d
- _mesa_store_compressed_teximage2d
- _mesa_store_compressed_teximage3d
- _mesa_store_compressed_texsubimage1d
- _mesa_store_compressed_texsubimage2d
- _mesa_store_compressed_texsubimage3d
- _mesa_store_teximage1d
- _mesa_store_teximage2d
- _mesa_store_teximage3d
- _mesa_store_texsubimage1d
- _mesa_store_texsubimage2d
- _mesa_store_texsubimage3d
- _mesa_test_proxy_teximage
- _mesa_reference_framebuffer
- _mesa_update_framebuffer_visual
- _mesa_use_program
- _mesa_Viewport
- _mesa_meta_init
- _mesa_meta_free
- _mesa_meta_CopyColorSubTable
- _mesa_meta_CopyColorTable
- _mesa_meta_CopyConvolutionFilter1D
- _mesa_meta_CopyConvolutionFilter2D
- _mesa_meta_CopyTexImage1D
- _mesa_meta_CopyTexImage2D
- _mesa_meta_CopyTexSubImage1D
- _mesa_meta_CopyTexSubImage2D
- _mesa_meta_CopyTexSubImage3D
- _swrast_Accum
- _swrast_Bitmap
- _swrast_BlitFramebuffer
- _swrast_CopyPixels
- _swrast_DrawPixels
- _swrast_GetDeviceDriverReference
- _swrast_Clear
- _swrast_choose_line
- _swrast_choose_triangle
- _swrast_CreateContext
- _swrast_DestroyContext
- _swrast_exec_fragment_program
- _swrast_InvalidateState
- _swrast_ReadPixels
- _swsetup_Wakeup
- _swsetup_CreateContext
- _swsetup_DestroyContext
- _swsetup_InvalidateState
- _tnl_CreateContext
- _tnl_DestroyContext
- _tnl_InvalidateState
- _tnl_run_pipeline
- _tnl_program_string
- _tnl_RasterPos
diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c
index 8d8087067f5..1dafe6e2952 100644
--- a/src/mesa/drivers/windows/gdi/wgl.c
+++ b/src/mesa/drivers/windows/gdi/wgl.c
@@ -54,8 +54,8 @@
#include <windows.h>
#endif
-#include "config.h"
-#include "glapi.h"
+#include "main/config.h"
+#include "glapi/glapi.h"
#include "GL/wmesa.h" /* protos for wmesa* functions */
/*
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 4a8b1b283d5..e3a37eb1ace 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -7,10 +7,11 @@
#include "colors.h"
#include <GL/wmesa.h>
#include <winuser.h>
-#include "context.h"
-#include "extensions.h"
-#include "framebuffer.h"
-#include "renderbuffer.h"
+#include "main/context.h"
+#include "main/extensions.h"
+#include "main/framebuffer.h"
+#include "main/renderbuffer.h"
+#include "main/macros.h"
#include "drivers/common/driverfuncs.h"
#include "drivers/common/meta.h"
#include "vbo/vbo.h"
@@ -185,7 +186,7 @@ BOOL wmCreateBackingStore(WMesaFramebuffer pwfb, long lxSize, long lySize)
}
-static wmDeleteBackingStore(WMesaFramebuffer pwfb)
+static void wmDeleteBackingStore(WMesaFramebuffer pwfb)
{
if (pwfb->hbmDIB) {
SelectObject(pwfb->dib_hDC, pwfb->hOldBitmap);
diff --git a/src/mesa/drivers/windows/gdi/wmesadef.h b/src/mesa/drivers/windows/gdi/wmesadef.h
index a73609b007a..32289ebc700 100644
--- a/src/mesa/drivers/windows/gdi/wmesadef.h
+++ b/src/mesa/drivers/windows/gdi/wmesadef.h
@@ -3,7 +3,7 @@
#ifdef __MINGW32__
#include <windows.h>
#endif
-#include "context.h"
+#include "main/context.h"
/**