ReactOS 0.4.15-dev-8428-g6910fa6
swimpl.c File Reference
#include "opengl32.h"
#include <context.h>
#include <matrix.h>
#include "glfuncs.h"
Include dependency graph for swimpl.c:

Go to the source code of this file.

Classes

struct  pixel_format
 
struct  sw_framebuffer
 
struct  sw_context
 

Macros

#define WIDTH_BYTES_ALIGN32(cx, bpp)   ((((cx) * (bpp) + 31) & ~31) >> 3)
 
#define WIDTH_BYTES_ALIGN16(cx, bpp)   ((((cx) * (bpp) + 15) & ~15) >> 3)
 
#define SB_FLAGS   (PFD_DRAW_TO_BITMAP | PFD_SUPPORT_GDI | PFD_SUPPORT_OPENGL | PFD_GENERIC_FORMAT)
 
#define SB_FLAGS_WINDOW   (PFD_DRAW_TO_BITMAP | PFD_SUPPORT_GDI | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_FORMAT)
 
#define SB_FLAGS_PALETTE   (PFD_DRAW_TO_BITMAP | PFD_SUPPORT_GDI | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_FORMAT | PFD_NEED_PALETTE)
 
#define DB_FLAGS   (PFD_DOUBLEBUFFER | PFD_SWAP_COPY | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_FORMAT)
 
#define DB_FLAGS_PALETTE   (PFD_DOUBLEBUFFER | PFD_SWAP_COPY | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_FORMAT | PFD_NEED_PALETTE)
 
#define HANDLE_BPP(__x__)
 
#define MAKE_COLORREF(__bpp, __type)
 
#define CLEAR_INDEX(__bpp, __type)
 
#define CLEAR_COLOR(__bpp)
 
#define CLEAR(__bpp, __type, __pixel_size)
 
#define SET_INDEX(__bpp)
 
#define SET_COLOR(__bpp)
 
#define WRITE_COLOR_SPAN_FRONTBUFFER(__bpp)
 
#define WRITE_COLOR_SPAN(__bpp, __type, __pixel_size)
 
#define WRITE_MONOCOLOR_SPAN(__bpp, __type, __pixel_size)
 
#define WRITE_COLOR_PIXELS(__bpp, __type, __pixel_size)
 
#define WRITE_MONOCOLOR_PIXELS(__bpp, __type, __pixel_size)
 
#define READ_COLOR_SPAN(__bpp, __type, __pixel_size)
 
#define READ_COLOR_PIXELS(__bpp, __type, __pixel_size)
 
#define HANDLE_BPP(__bpp)
 
#define USE_GL_FUNC(name, proto_args, call_args, offset, stack)   extern void WINAPI _mesa_##name proto_args ;
 
#define USE_GL_FUNC_RET(name, ret_type, proto_args, call_args, offset, stack)   extern ret_type WINAPI _mesa_##name proto_args ;
 
#define USE_GL_FUNC(name, proto_args, call_args, offset, stack)   _mesa_##name,
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (opengl32)
 
static const struct pixel_formatget_format (INT pf_index, INT *pf_count)
 
INT sw_DescribePixelFormat (HDC hdc, INT format, UINT size, PIXELFORMATDESCRIPTOR *descr)
 
BOOL sw_SetPixelFormat (HDC hdc, struct wgl_dc_data *dc_data, INT format)
 
DHGLRC sw_CreateContext (struct wgl_dc_data *dc_data)
 
BOOL sw_DeleteContext (DHGLRC dhglrc)
 
void APIENTRY _mesa_ColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const void *)
 
void APIENTRY _mesa_ColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const void *)
 
void APIENTRY _mesa_GetColorTableEXT (GLenum, GLenum, GLenum, void *)
 
void APIENTRY _mesa_GetColorTableParameterivEXT (GLenum, GLenum, GLfloat *)
 
void APIENTRY _mesa_GetColorTableParameterfvEXT (GLenum, GLenum, GLint *)
 
static void APIENTRY _swimpl_AddSwapHintRectWIN (GLint x, GLint y, GLsizei width, GLsizei height)
 
PROC sw_GetProcAddress (LPCSTR name)
 
BOOL sw_CopyContext (DHGLRC dhglrcSrc, DHGLRC dhglrcDst, UINT mask)
 
BOOL sw_ShareLists (DHGLRC dhglrcSrc, DHGLRC dhglrcDst)
 
static LRESULT CALLBACK sw_call_window_proc (int nCode, WPARAM wParam, LPARAM lParam)
 
static const charrenderer_string (void)
 
static void PUT_PIXEL_8 (BYTE *Buffer, BYTE Value)
 
static void PUT_PIXEL_16 (USHORT *Buffer, USHORT Value)
 
static void PUT_PIXEL_24 (ULONG *Buffer, ULONG Value)
 
static void PUT_PIXEL_32 (ULONG *Buffer, ULONG Value)
 
static BYTE GET_PIXEL_8 (BYTE *Buffer)
 
static USHORT GET_PIXEL_16 (USHORT *Buffer)
 
static ULONG GET_PIXEL_24 (ULONG *Buffer)
 
static ULONG GET_PIXEL_32 (ULONG *Buffer)
 
static BYTE PACK_COLOR_8 (GLubyte r, GLubyte g, GLubyte b)
 
static USHORT PACK_COLOR_16 (GLubyte r, GLubyte g, GLubyte b)
 
static ULONG PACK_COLOR_24 (GLubyte r, GLubyte g, GLubyte b)
 
static ULONG PACK_COLOR_32 (GLubyte r, GLubyte g, GLubyte b)
 
static COLORREF PACK_COLORREF_8 (GLubyte r, GLubyte g, GLubyte b)
 
static COLORREF PACK_COLORREF_16 (GLubyte r, GLubyte g, GLubyte b)
 
static COLORREF PACK_COLORREF_24 (GLubyte r, GLubyte g, GLubyte b)
 
static COLORREF PACK_COLORREF_32 (GLubyte r, GLubyte g, GLubyte b)
 
static void UNPACK_COLOR_8 (BYTE Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLOR_16 (USHORT Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLOR_24 (ULONG Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLOR_32 (ULONG Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLORREF_8 (COLORREF Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLORREF_16 (COLORREF Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLORREF_24 (COLORREF Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void UNPACK_COLORREF_32 (COLORREF Color, GLubyte *r, GLubyte *g, GLubyte *b)
 
static void clear_frontbuffer (struct sw_context *sw_ctx, struct sw_framebuffer *fb, GLint x, GLint y, GLint width, GLint height, COLORREF ClearColor)
 
static GLboolean set_buffer (GLcontext *ctx, GLenum mode)
 
static void buffer_size (GLcontext *ctx, GLuint *width, GLuint *height)
 
static void write_monocolor_span_frontbuffer (struct sw_framebuffer *fb, GLuint n, GLint x, GLint y, const GLubyte mask[], COLORREF Color)
 
static void write_monocolor_pixels_frontbuffer (struct sw_framebuffer *fb, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[], COLORREF Color)
 
static void write_index_span (GLcontext *ctx, GLuint n, GLint x, GLint y, const GLuint index[], const GLubyte mask[])
 
static void write_index_pixels (GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLuint index[], const GLubyte mask[])
 
static void read_index_span (GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint index[])
 
static void read_index_pixels (GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], const GLubyte mask[])
 
static void setup_DD_pointers (GLcontext *ctx)
 
GLcontextgl_get_thread_context (void)
 
BOOL sw_SetContext (struct wgl_dc_data *dc_data, DHGLRC dhglrc)
 
void sw_ReleaseContext (DHGLRC dhglrc)
 
BOOL sw_SwapBuffers (HDC hdc, struct wgl_dc_data *dc_data)
 

Variables

static const struct pixel_format pixel_formats_32 []
 
static const struct pixel_format pixel_formats_24 []
 
static const struct pixel_format pixel_formats_16 []
 
static const struct pixel_format pixel_formats_8 []
 
static GLCLTPROCTABLE sw_api_table
 

Macro Definition Documentation

◆ CLEAR

#define CLEAR (   __bpp,
  __type,
  __pixel_size 
)

Definition at line 798 of file swimpl.c.

◆ CLEAR_COLOR

#define CLEAR_COLOR (   __bpp)
Value:
static void clear_color_##__bpp( GLcontext* ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) \
{ \
struct sw_context* sw_ctx = ctx->DriverCtx; \
\
sw_ctx->u##__bpp.ClearColor = PACK_COLOR_##__bpp(r, g, b); \
\
TRACE("Set Clear color %u, %u, %u.\n", r, g, b); \
}
unsigned char GLubyte
Definition: gl.h:157
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean g
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
BYTE ClearColor
Definition: swimpl.c:251

Definition at line 752 of file swimpl.c.

◆ CLEAR_INDEX

#define CLEAR_INDEX (   __bpp,
  __type 
)
Value:
static void clear_index_##__bpp(GLcontext* ctx, GLuint index) \
{ \
struct sw_context* sw_ctx = ctx->DriverCtx; \
\
sw_ctx->u##__bpp.ClearColor = (__type)index; \
}
unsigned int GLuint
Definition: gl.h:159
GLuint index
Definition: glext.h:6031

Definition at line 736 of file swimpl.c.

◆ DB_FLAGS

◆ DB_FLAGS_PALETTE

◆ HANDLE_BPP [1/2]

#define HANDLE_BPP (   __bpp)
Value:
case __bpp: \
ctx->Driver.ClearIndex = clear_index_##__bpp; \
ctx->Driver.ClearColor = clear_color_##__bpp; \
ctx->Driver.Clear = clear_##__bpp; \
ctx->Driver.Index = set_index_##__bpp; \
ctx->Driver.Color = set_color_##__bpp; \
ctx->Driver.WriteColorSpan = write_color_span_##__bpp; \
ctx->Driver.WriteMonocolorSpan = write_monocolor_span_##__bpp; \
ctx->Driver.WriteMonoindexSpan = write_monocolor_span_##__bpp; \
ctx->Driver.WriteColorPixels = write_color_pixels_##__bpp; \
ctx->Driver.WriteMonocolorPixels = write_monocolor_pixels_##__bpp; \
ctx->Driver.WriteMonoindexPixels = write_monocolor_pixels_##__bpp; \
ctx->Driver.ReadColorSpan = read_color_span_##__bpp; \
ctx->Driver.ReadColorPixels = read_color_pixels_##__bpp; \
break

◆ HANDLE_BPP [2/2]

#define HANDLE_BPP (   __x__)
Value:
case __x__: \
nb_format = ARRAYSIZE(pixel_formats_##__x__); \
if ((pf_index > nb_format) || (pf_index <= 0)) \
ret = NULL; \
else \
ret = &pixel_formats_##__x__[pf_index - 1]; \
break
#define NULL
Definition: types.h:112
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
int ret

◆ MAKE_COLORREF

#define MAKE_COLORREF (   __bpp,
  __type 
)
Value:
static inline COLORREF MAKE_COLORREF_##__bpp(const struct pixel_format *format, __type Color) \
{ \
GLubyte r,g,b; \
\
if (format->iPixelType == PFD_TYPE_COLORINDEX) \
return PALETTEINDEX(Color); \
\
UNPACK_COLOR_##__bpp(Color, &r, &g, &b); \
\
return PACK_COLORREF_##__bpp(r, g, b); \
}
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define b
Definition: ke_i.h:79
DWORD COLORREF
Definition: windef.h:300
#define PFD_TYPE_COLORINDEX
Definition: wingdi.h:297
#define PALETTEINDEX(i)
Definition: wingdi.h:2943

Definition at line 715 of file swimpl.c.

◆ READ_COLOR_PIXELS

#define READ_COLOR_PIXELS (   __bpp,
  __type,
  __pixel_size 
)

Definition at line 1264 of file swimpl.c.

◆ READ_COLOR_SPAN

#define READ_COLOR_SPAN (   __bpp,
  __type,
  __pixel_size 
)

Definition at line 1215 of file swimpl.c.

◆ SB_FLAGS

Definition at line 20 of file swimpl.c.

◆ SB_FLAGS_PALETTE

◆ SB_FLAGS_WINDOW

Definition at line 21 of file swimpl.c.

◆ SET_COLOR

#define SET_COLOR (   __bpp)
Value:
static void set_color_##__bpp( GLcontext* ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) \
{ \
struct sw_context* sw_ctx = ctx->DriverCtx; \
\
sw_ctx->u##__bpp.CurrentColor = PACK_COLOR_##__bpp(r, g, b); \
}
BYTE CurrentColor
Definition: swimpl.c:252

Definition at line 855 of file swimpl.c.

◆ SET_INDEX

#define SET_INDEX (   __bpp)
Value:
static void set_index_##__bpp(GLcontext* ctx, GLuint index) \
{ \
struct sw_context* sw_ctx = ctx->DriverCtx; \
\
sw_ctx->u##__bpp.CurrentColor = index; \
}
#define index(s, c)
Definition: various.h:29

Definition at line 841 of file swimpl.c.

◆ USE_GL_FUNC [1/2]

#define USE_GL_FUNC (   name,
  proto_args,
  call_args,
  offset,
  stack 
)    extern void WINAPI _mesa_##name proto_args ;

Definition at line 1369 of file swimpl.c.

◆ USE_GL_FUNC [2/2]

#define USE_GL_FUNC (   name,
  proto_args,
  call_args,
  offset,
  stack 
)    _mesa_##name,

Definition at line 1369 of file swimpl.c.

◆ USE_GL_FUNC_RET

#define USE_GL_FUNC_RET (   name,
  ret_type,
  proto_args,
  call_args,
  offset,
  stack 
)    extern ret_type WINAPI _mesa_##name proto_args ;

Definition at line 1370 of file swimpl.c.

◆ WIDTH_BYTES_ALIGN16

#define WIDTH_BYTES_ALIGN16 (   cx,
  bpp 
)    ((((cx) * (bpp) + 15) & ~15) >> 3)

Definition at line 17 of file swimpl.c.

◆ WIDTH_BYTES_ALIGN32

#define WIDTH_BYTES_ALIGN32 (   cx,
  bpp 
)    ((((cx) * (bpp) + 31) & ~31) >> 3)

Definition at line 16 of file swimpl.c.

◆ WRITE_COLOR_PIXELS

#define WRITE_COLOR_PIXELS (   __bpp,
  __type,
  __pixel_size 
)

Definition at line 1095 of file swimpl.c.

◆ WRITE_COLOR_SPAN

#define WRITE_COLOR_SPAN (   __bpp,
  __type,
  __pixel_size 
)

Definition at line 981 of file swimpl.c.

◆ WRITE_COLOR_SPAN_FRONTBUFFER

#define WRITE_COLOR_SPAN_FRONTBUFFER (   __bpp)
Value:
static void write_color_span_frontbuffer_##__bpp(struct sw_framebuffer* fb, \
const GLubyte red[], const GLubyte green[], \
const GLubyte blue[], const GLubyte mask[] ) \
{ \
TRACE("Writing color span at %u, %u (%u)\n", x, y, n); \
\
if (mask) \
{ \
while (n--) \
{ \
if (mask[n]) \
{ \
SetPixel(fb->Hdc, x + n, fb->height - y, \
PACK_COLORREF_##__bpp(red[n], green[n], blue[n])); \
} \
} \
} \
else \
{ \
while (n--) \
{ \
SetPixel(fb->Hdc, x + n, fb->height - y, \
PACK_COLORREF_##__bpp(red[n], green[n], blue[n])); \
} \
} \
}
GLclampf green
Definition: gl.h:1740
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLclampf GLclampf blue
Definition: gl.h:1740
int GLint
Definition: gl.h:156
GLdouble n
Definition: glext.h:7729
GLenum GLint GLuint mask
Definition: glext.h:6028
#define red
Definition: linetest.c:67

Definition at line 947 of file swimpl.c.

◆ WRITE_MONOCOLOR_PIXELS

#define WRITE_MONOCOLOR_PIXELS (   __bpp,
  __type,
  __pixel_size 
)
Value:
static void write_monocolor_pixels_##__bpp(GLcontext* ctx, GLuint n, \
const GLint x[], const GLint y[], \
const GLubyte mask[] ) \
{ \
struct sw_context* sw_ctx = ctx->DriverCtx; \
struct sw_framebuffer* fb = sw_ctx->fb; \
\
if (sw_ctx->Mode == GL_FRONT) \
{ \
write_monocolor_pixels_frontbuffer(fb, n, x, y, mask, \
MAKE_COLORREF_##__bpp(fb->pixel_format, sw_ctx->u##__bpp.CurrentColor)); \
\
return; \
} \
\
while (n--) \
{ \
if (mask[n]) \
{ \
+ x[n] * __pixel_size; \
PUT_PIXEL_##__bpp((__type*)Buffer, sw_ctx->u##__bpp.CurrentColor); \
} \
} \
}
Definition: bufpool.h:45
#define GL_FRONT
Definition: gl.h:270
GLenum Mode
Definition: swimpl.c:270
struct sw_framebuffer * fb
Definition: swimpl.c:244
const struct pixel_format * pixel_format
Definition: swimpl.c:226
GLuint width
Definition: swimpl.c:230
BYTE * BackBuffer
Definition: swimpl.c:233
#define WIDTH_BYTES_ALIGN32(cx, bpp)
Definition: swimpl.c:16
unsigned char BYTE
Definition: xxhash.c:193

Definition at line 1159 of file swimpl.c.

◆ WRITE_MONOCOLOR_SPAN

#define WRITE_MONOCOLOR_SPAN (   __bpp,
  __type,
  __pixel_size 
)

Definition at line 1053 of file swimpl.c.

Function Documentation

◆ _mesa_ColorSubTableEXT()

void APIENTRY _mesa_ColorSubTableEXT ( GLenum  target,
GLsizei  start,
GLsizei  count,
GLenum  format,
GLenum  type,
const void data 
)

Definition at line 2839 of file api.c.

2842{
2843 struct gl_image *image;
2846 (*CC->API.ColorSubTable)( CC, target, start, image );
2847 if (image->RefCount == 0)
2849}
GLcontext * CC
#define GET_CONTEXT
Definition: api.h:64
struct gl_image * gl_unpack_image(GLcontext *ctx, GLint width, GLint height, GLenum srcFormat, GLenum srcType, const GLvoid *pixels)
Definition: image.c:314
void gl_free_image(struct gl_image *image)
Definition: image.c:661
GLuint start
Definition: gl.h:1545
GLeglImageOES image
Definition: gl.h:2204
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum target
Definition: glext.h:7315
struct gl_api_table API
Definition: types.h:1268

Referenced by sw_GetProcAddress().

◆ _mesa_ColorTableEXT()

void APIENTRY _mesa_ColorTableEXT ( GLenum  target,
GLenum  internalFormat,
GLsizei  width,
GLenum  format,
GLenum  type,
const void table 
)

Definition at line 2826 of file api.c.

2829{
2830 struct gl_image *image;
2833 (*CC->API.ColorTable)( CC, target, internalFormat, image );
2834 if (image->RefCount == 0)
2836}
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum internalFormat
Definition: glext.h:8404

Referenced by sw_GetProcAddress().

◆ _mesa_GetColorTableEXT()

void APIENTRY _mesa_GetColorTableEXT ( GLenum  target,
GLenum  format,
GLenum  type,
void table 
)

Definition at line 2851 of file api.c.

2853{
2855 (*CC->API.GetColorTable)(CC, target, format, type, table);
2856}

Referenced by sw_GetProcAddress().

◆ _mesa_GetColorTableParameterfvEXT()

void APIENTRY _mesa_GetColorTableParameterfvEXT ( GLenum  ,
GLenum  ,
GLint  
)

Referenced by sw_GetProcAddress().

◆ _mesa_GetColorTableParameterivEXT()

void APIENTRY _mesa_GetColorTableParameterivEXT ( GLenum  ,
GLenum  ,
GLfloat  
)

Referenced by sw_GetProcAddress().

◆ _swimpl_AddSwapHintRectWIN()

static void APIENTRY _swimpl_AddSwapHintRectWIN ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
static

Definition at line 473 of file swimpl.c.

474{
476}
#define UNIMPLEMENTED
Definition: debug.h:118

Referenced by sw_GetProcAddress().

◆ buffer_size()

static void buffer_size ( GLcontext ctx,
GLuint width,
GLuint height 
)
static

Definition at line 888 of file swimpl.c.

889{
890 struct sw_context* sw_ctx = ctx->DriverCtx;
891 struct sw_framebuffer* fb = sw_ctx->fb;
893
894 if (Window)
895 {
896 RECT client_rect;
897 GetClientRect(Window, &client_rect);
898 *width = client_rect.right - client_rect.left;
899 *height = client_rect.bottom - client_rect.top;
900 }
901 else
902 {
903 /* We are drawing to a bitmap */
904 BITMAP bm;
905 HBITMAP Hbm;
906
907 Hbm = GetCurrentObject(fb->Hdc, OBJ_BITMAP);
908
909 if (!GetObjectW(Hbm, sizeof(bm), &bm))
910 return;
911
912 TRACE("Framebuffer size : %i, %i\n", bm.bmWidth, bm.bmHeight);
913
914 *width = bm.bmWidth;
915 *height = bm.bmHeight;
916 }
917
918 if ((*width != fb->width) || (*height != fb->height))
919 {
920 const struct pixel_format* pixel_format = fb->pixel_format;
921
923 {
924 /* Allocate a new backbuffer */
926 if (!fb->BackBuffer)
927 {
929 }
930 else
931 {
933 }
934 if (!fb->BackBuffer)
935 {
936 ERR("Failed allocating back buffer !.\n");
937 return;
938 }
939 }
940
941 fb->width = *width;
942 fb->height = *height;
943 }
944}
#define ERR(fmt,...)
Definition: precomp.h:57
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
static HBITMAP
Definition: button.c:44
#define OBJ_BITMAP
Definition: objidl.idl:1415
#define TRACE(s)
Definition: solgame.cpp:4
Definition: window.c:28
Definition: bl.h:1331
DWORD dwFlags
Definition: swimpl.c:29
BYTE cColorBits
Definition: swimpl.c:31
GLuint height
Definition: swimpl.c:230
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428
#define PFD_DOUBLEBUFFER
Definition: wingdi.h:301
HWND WINAPI WindowFromDC(_In_ HDC hDC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by __ConvertToCP(), deque< _Tp, >::_M_fill_initialize(), deque< wstring >::_M_fill_insert(), _Deque_base< _Tp, _Alloc >::_M_initialize_map(), deque< _Tp, >::_M_new_elements_at_front(), BitmapClipper_CopyPixels(), BitmapScaler_CopyPixels(), checkConvertedFrameAndBounds(), deque< _Tp, >::clear(), CLRMetaHost_GetVersionFromFile(), CLRRuntimeInfo_GetRuntimeDirectory(), CLRRuntimeInfo_GetVersionString(), ComponentInfo_GetStringValue(), d3dx9_mesh_GenerateAdjacency(), D3DXCreatePolygonTest(), D3DXLoadMeshFromXInMemory(), D3DXLoadSkinMeshFromXof(), debug_target_return_string(), debugclient_GetIdentity(), debugclient_GetKernelConnectionOptions(), debugclient_GetOutputLinePrefix(), debugcontrol_Disassemble(), debugcontrol_GetEventFilterCommand(), debugcontrol_GetEventFilterText(), debugcontrol_GetExceptionFilterSecondCommand(), debugcontrol_GetLogFile(), debugcontrol_GetPromptText(), debugcontrol_GetSpecificFilterArgument(), debugcontrol_GetTextMacro(), debugcontrol_Input(), debugdataspaces_ReadBusData(), debugdataspaces_ReadControl(), debugdataspaces_ReadDebuggerData(), debugdataspaces_ReadIo(), debugdataspaces_ReadPhysical(), debugdataspaces_ReadProcessorSystemData(), debugdataspaces_ReadVirtual(), debugdataspaces_ReadVirtualUncached(), debugdataspaces_WriteBusData(), debugdataspaces_WriteControl(), debugdataspaces_WriteIo(), debugdataspaces_WritePhysical(), debugdataspaces_WriteVirtual(), debugdataspaces_WriteVirtualUncached(), debugsymbols_FindSourceFile(), debugsymbols_FindSourceFileWide(), debugsymbols_GetConstantName(), debugsymbols_GetConstantNameWide(), debugsymbols_GetFieldName(), debugsymbols_GetFieldNameWide(), debugsymbols_GetFunctionEntryByOffset(), debugsymbols_GetImagePath(), debugsymbols_GetImagePathWide(), debugsymbols_GetLineByOffset(), debugsymbols_GetLineByOffsetWide(), debugsymbols_GetModuleNameString(), debugsymbols_GetModuleNameStringWide(), debugsymbols_GetModuleVersionInformation(), debugsymbols_GetModuleVersionInformationWide(), debugsymbols_GetNameByOffset(), debugsymbols_GetNameByOffsetWide(), debugsymbols_GetNearNameByOffset(), debugsymbols_GetNearNameByOffsetWide(), debugsymbols_GetNextSymbolMatch(), debugsymbols_GetNextSymbolMatchWide(), debugsymbols_GetSourceEntryString(), debugsymbols_GetSourceEntryStringWide(), debugsymbols_GetSourcePath(), debugsymbols_GetSourcePathElement(), debugsymbols_GetSourcePathElementWide(), debugsymbols_GetSourcePathWide(), debugsymbols_GetSymbolEntryString(), debugsymbols_GetSymbolEntryStringWide(), debugsymbols_GetSymbolPath(), debugsymbols_GetSymbolPathWide(), debugsymbols_GetTypeName(), debugsymbols_GetTypeNameWide(), debugsymbols_ReadTypedDataPhysical(), debugsymbols_ReadTypedDataVirtual(), debugsymbols_WriteTypedDataPhysical(), debugsymbols_WriteTypedDataVirtual(), debugsystemobjects_GetCurrentProcessExecutableName(), DECLARE_INTERFACE_(), EDIT_MakeFit(), generate_effects(), get_parameter_fc(), getConvertedFrameAndBounds(), GetDeviceData(), hash_file_data(), IAssemblyName_GetPath(), IWICPixelFormatInfo_GetChannelMask_Proxy_W(), ME_CallWordBreakProc(), METAFILE_GraphicsDeleted(), midi_IDirectMusicPort_GetFormat(), PathAllocCanonicalize(), ReadByte(), run_test(), SearchCHM_File(), server_thread(), setup_DD_pointers(), SetupGetSourceFileLocationA(), SetupGetSourceFileLocationW(), SetupGetSourceInfoA(), SetupGetSourceInfoW(), SetupGetTargetPathA(), SetupGetTargetPathW(), sheet_callback(), START_TEST(), test_D3DXSaveTextureToFileInMemory(), test_SetupDecompressOrCopyFile(), test_SetWinMetaFileBits(), test_SxsLookupClrGuid(), validate_resource_view(), WNetUseConnectionA(), WNetUseConnectionW(), write_buffer_to_file(), and xmlStringLenDecodeEntities().

◆ clear_frontbuffer()

static void clear_frontbuffer ( struct sw_context sw_ctx,
struct sw_framebuffer fb,
GLint  x,
GLint  y,
GLint  width,
GLint  height,
COLORREF  ClearColor 
)
static

Definition at line 771 of file swimpl.c.

779{
780 HBRUSH Brush;
781 BOOL ret;
782
783 TRACE("Clearing front buffer (%u, %u, %u, %u), color 0x%08x.\n", x, y, width, height, ClearColor);
784
785 Brush = CreateSolidBrush(ClearColor);
786 Brush = SelectObject(fb->Hdc, Brush);
787
788 ret = PatBlt(fb->Hdc, x, fb->height - (y + height), width, height, PATCOPY);
789 if (!ret)
790 {
791 ERR("PatBlt failed. last Error %d.\n", GetLastError());
792 }
793
794 Brush = SelectObject(fb->Hdc, Brush);
796}
unsigned int BOOL
Definition: ntddk_ex.h:94
pKey DeleteObject()
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
#define PATCOPY
Definition: wingdi.h:335
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)

◆ get_format()

static const struct pixel_format * get_format ( INT  pf_index,
INT pf_count 
)
static

Definition at line 274 of file swimpl.c.

275{
276 HDC hdc;
277 INT bpp, nb_format;
278 const struct pixel_format* ret;
279
280 hdc = GetDC(NULL);
283
284 switch (bpp)
285 {
286#define HANDLE_BPP(__x__) \
287 case __x__: \
288 nb_format = ARRAYSIZE(pixel_formats_##__x__); \
289 if ((pf_index > nb_format) || (pf_index <= 0)) \
290 ret = NULL; \
291 else \
292 ret = &pixel_formats_##__x__[pf_index - 1]; \
293 break
294
295 HANDLE_BPP(32);
296 HANDLE_BPP(24);
297 HANDLE_BPP(16);
298 HANDLE_BPP(8);
299#undef HANDLE_BPP
300 default:
301 FIXME("Unhandled bit depth %u, defaulting to 32bpp\n", bpp);
302 nb_format = ARRAYSIZE(pixel_formats_32);
303 if ((pf_index > nb_format) || (pf_index == 0))
304 ret = NULL;
305 else
306 ret = &pixel_formats_32[pf_index - 1];
307 }
308
309 if (pf_count)
310 *pf_count = nb_format;
311
312 return ret;
313}
#define FIXME(fmt,...)
Definition: precomp.h:53
DWORD bpp
Definition: surface.c:185
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static const struct pixel_format pixel_formats_32[]
Definition: swimpl.c:41
#define HANDLE_BPP(__x__)
int32_t INT
Definition: typedefs.h:58
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define BITSPIXEL
Definition: wingdi.h:720
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by sw_DescribePixelFormat(), and sw_SetPixelFormat().

◆ GET_PIXEL_16()

static USHORT GET_PIXEL_16 ( USHORT Buffer)
inlinestatic

Definition at line 604 of file swimpl.c.

605{
606 return *Buffer;
607}

◆ GET_PIXEL_24()

static ULONG GET_PIXEL_24 ( ULONG Buffer)
inlinestatic

Definition at line 609 of file swimpl.c.

610{
611 return *Buffer & 0x00FFFFFF;
612}

◆ GET_PIXEL_32()

static ULONG GET_PIXEL_32 ( ULONG Buffer)
inlinestatic

Definition at line 614 of file swimpl.c.

615{
616 return *Buffer;
617}

◆ GET_PIXEL_8()

static BYTE GET_PIXEL_8 ( BYTE Buffer)
inlinestatic

Definition at line 599 of file swimpl.c.

600{
601 return *Buffer;
602}

◆ gl_get_thread_context()

GLcontext * gl_get_thread_context ( void  )

Definition at line 1383 of file swimpl.c.

1384{
1385 struct sw_context* sw_ctx = (struct sw_context*)IntGetCurrentDHGLRC();
1386 return sw_ctx->gl_ctx;
1387}
FORCEINLINE DHGLRC IntGetCurrentDHGLRC(void)
Definition: opengl32.h:177
GLcontext * gl_ctx
Definition: swimpl.c:238

◆ PACK_COLOR_16()

static USHORT PACK_COLOR_16 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 624 of file swimpl.c.

625{
626 return ((r & 0x1F) << 11) | ((g & 0x3F) << 5) | (b & 0x1F);
627}

◆ PACK_COLOR_24()

static ULONG PACK_COLOR_24 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 629 of file swimpl.c.

630{
631 return (r << 16) | (g << 8) | (b);
632}

◆ PACK_COLOR_32()

static ULONG PACK_COLOR_32 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 634 of file swimpl.c.

635{
636 return (r << 16) | (g << 8) | (b);
637}

◆ PACK_COLOR_8()

static BYTE PACK_COLOR_8 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 619 of file swimpl.c.

620{
621 return (r & 0x7) | ((g & 0x7) << 3) | ((b & 0x3) << 6);
622}

◆ PACK_COLORREF_16()

static COLORREF PACK_COLORREF_16 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 644 of file swimpl.c.

645{
646 return RGB(r << 3, g << 2, b << 3);
647}
#define RGB(r, g, b)
Definition: precomp.h:71

◆ PACK_COLORREF_24()

static COLORREF PACK_COLORREF_24 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 649 of file swimpl.c.

650{
651 return RGB(r, g, b);
652}

◆ PACK_COLORREF_32()

static COLORREF PACK_COLORREF_32 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 654 of file swimpl.c.

655{
656 return RGB(r, g, b);
657}

◆ PACK_COLORREF_8()

static COLORREF PACK_COLORREF_8 ( GLubyte  r,
GLubyte  g,
GLubyte  b 
)
inlinestatic

Definition at line 639 of file swimpl.c.

640{
641 return RGB(r << 5, g << 5, b << 6);
642}

◆ PUT_PIXEL_16()

static void PUT_PIXEL_16 ( USHORT Buffer,
USHORT  Value 
)
inlinestatic

Definition at line 585 of file swimpl.c.

586{
587 *Buffer = Value;
588}
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

◆ PUT_PIXEL_24()

static void PUT_PIXEL_24 ( ULONG Buffer,
ULONG  Value 
)
inlinestatic

Definition at line 589 of file swimpl.c.

590{
591 *Buffer &= 0xFF000000ul;
592 *Buffer |= Value & 0x00FFFFFF;
593}

◆ PUT_PIXEL_32()

static void PUT_PIXEL_32 ( ULONG Buffer,
ULONG  Value 
)
inlinestatic

Definition at line 594 of file swimpl.c.

595{
596 *Buffer = Value;
597}

◆ PUT_PIXEL_8()

static void PUT_PIXEL_8 ( BYTE Buffer,
BYTE  Value 
)
inlinestatic

Definition at line 581 of file swimpl.c.

582{
583 *Buffer = Value;
584}

◆ read_index_pixels()

static void read_index_pixels ( GLcontext ctx,
GLuint  n,
const GLint  x[],
const GLint  y[],
GLuint  index[],
const GLubyte  mask[] 
)
static

Definition at line 1255 of file swimpl.c.

1258{
1259
1260 ERR("Not implemented yet !\n");
1261}

Referenced by setup_DD_pointers().

◆ read_index_span()

static void read_index_span ( GLcontext ctx,
GLuint  n,
GLint  x,
GLint  y,
GLuint  index[] 
)
static

Definition at line 1209 of file swimpl.c.

1210{
1211 ERR("Not implemented yet !\n");
1212}

Referenced by setup_DD_pointers().

◆ renderer_string()

static const char * renderer_string ( void  )
static

Definition at line 576 of file swimpl.c.

577{
578 return "ReactOS SW Implementation";
579}

Referenced by setup_DD_pointers().

◆ set_buffer()

static GLboolean set_buffer ( GLcontext ctx,
GLenum  mode 
)
static

Definition at line 872 of file swimpl.c.

873{
874 struct sw_context* sw_ctx = ctx->DriverCtx;
875 struct sw_framebuffer* fb = sw_ctx->fb;
876
877 if (!fb->gl_visual->DBflag)
878 return GL_FALSE;
879
880 if ((mode != GL_FRONT) && (mode != GL_BACK))
881 return GL_FALSE;
882
883 sw_ctx->Mode = mode;
884 return GL_TRUE;
885}
#define GL_TRUE
Definition: gl.h:174
#define GL_BACK
Definition: gl.h:271
#define GL_FALSE
Definition: gl.h:173
GLenum mode
Definition: glext.h:6217
GLboolean DBflag
Definition: types.h:1138
GLvisual * gl_visual
Definition: swimpl.c:223

Referenced by CProgressDialog::SetCancelMsg(), CProgressDialog::SetLine(), CProgressDialog::SetTitle(), and setup_DD_pointers().

◆ setup_DD_pointers()

static void setup_DD_pointers ( GLcontext ctx)
static

Definition at line 1308 of file swimpl.c.

1309{
1310 struct sw_context* sw_ctx = ctx->DriverCtx;
1311
1312 ctx->Driver.RendererString = renderer_string;
1313 ctx->Driver.UpdateState = setup_DD_pointers;
1314
1315 switch (sw_ctx->fb->pixel_format->cColorBits)
1316 {
1317#define HANDLE_BPP(__bpp) \
1318 case __bpp: \
1319 ctx->Driver.ClearIndex = clear_index_##__bpp; \
1320 ctx->Driver.ClearColor = clear_color_##__bpp; \
1321 ctx->Driver.Clear = clear_##__bpp; \
1322 ctx->Driver.Index = set_index_##__bpp; \
1323 ctx->Driver.Color = set_color_##__bpp; \
1324 ctx->Driver.WriteColorSpan = write_color_span_##__bpp; \
1325 ctx->Driver.WriteMonocolorSpan = write_monocolor_span_##__bpp; \
1326 ctx->Driver.WriteMonoindexSpan = write_monocolor_span_##__bpp; \
1327 ctx->Driver.WriteColorPixels = write_color_pixels_##__bpp; \
1328 ctx->Driver.WriteMonocolorPixels = write_monocolor_pixels_##__bpp; \
1329 ctx->Driver.WriteMonoindexPixels = write_monocolor_pixels_##__bpp; \
1330 ctx->Driver.ReadColorSpan = read_color_span_##__bpp; \
1331 ctx->Driver.ReadColorPixels = read_color_pixels_##__bpp; \
1332 break
1333HANDLE_BPP(8);
1334HANDLE_BPP(16);
1335HANDLE_BPP(24);
1336HANDLE_BPP(32);
1337#undef HANDLE_BPP
1338 default:
1339 ERR("Unhandled bit depth %u, defaulting to 32bpp.\n", sw_ctx->fb->pixel_format->cColorBits);
1340 ctx->Driver.ClearIndex = clear_index_32;
1341 ctx->Driver.ClearColor = clear_color_32;
1342 ctx->Driver.Clear = clear_32;
1343 ctx->Driver.Index = set_index_32;
1344 ctx->Driver.Color = set_color_32;
1345 ctx->Driver.WriteColorSpan = write_color_span_32;
1346 ctx->Driver.WriteMonocolorSpan = write_monocolor_span_32;
1347 ctx->Driver.WriteMonoindexSpan = write_monocolor_span_32;
1348 ctx->Driver.WriteColorPixels = write_color_pixels_32;
1349 ctx->Driver.WriteMonocolorPixels = write_monocolor_pixels_32;
1350 ctx->Driver.WriteMonoindexPixels = write_monocolor_pixels_32;
1351 ctx->Driver.ReadColorSpan = read_color_span_32;
1352 ctx->Driver.ReadColorPixels = read_color_pixels_32;
1353 break;
1354 }
1355
1356 ctx->Driver.SetBuffer = set_buffer;
1357 ctx->Driver.GetBufferSize = buffer_size;
1358
1359 /* Pixel/span writing functions: */
1360 ctx->Driver.WriteIndexSpan = write_index_span;
1361 ctx->Driver.WriteIndexPixels = write_index_pixels;
1362
1363 /* Pixel/span reading functions: */
1364 ctx->Driver.ReadIndexSpan = read_index_span;
1365 ctx->Driver.ReadIndexPixels = read_index_pixels;
1366}
static const char * renderer_string(void)
Definition: swimpl.c:576
static void read_index_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], const GLubyte mask[])
Definition: swimpl.c:1255
static void write_index_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLuint index[], const GLubyte mask[])
Definition: swimpl.c:1192
static void read_index_span(GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint index[])
Definition: swimpl.c:1209
static void write_index_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLuint index[], const GLubyte mask[])
Definition: swimpl.c:1201
static void setup_DD_pointers(GLcontext *ctx)
Definition: swimpl.c:1308
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:888
static GLboolean set_buffer(GLcontext *ctx, GLenum mode)
Definition: swimpl.c:872

Referenced by setup_DD_pointers(), and sw_SetContext().

◆ sw_call_window_proc()

static LRESULT CALLBACK sw_call_window_proc ( int  nCode,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 525 of file swimpl.c.

529{
530 struct wgl_dc_data* dc_data = IntGetCurrentDcData();
531 struct sw_context* ctx = (struct sw_context*)IntGetCurrentDHGLRC();
532 PCWPSTRUCT pParams = (PCWPSTRUCT)lParam;
533
534 if((!dc_data) || (!ctx))
535 return 0;
536
537 if(!(dc_data->flags & WGL_DC_OBJ_DC))
538 return 0;
539
540 if((nCode < 0) || (dc_data->owner.hwnd != pParams->hwnd) || (dc_data->sw_data == NULL))
541 return CallNextHookEx(ctx->hook, nCode, wParam, lParam);
542
543 if (pParams->message == WM_WINDOWPOSCHANGED)
544 {
545 /* We handle WM_WINDOWPOSCHANGED instead of WM_SIZE because according to
546 * http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx
547 * WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it
548 * can be masked out by the application. */
549 LPWINDOWPOS lpWindowPos = (LPWINDOWPOS)pParams->lParam;
550 if((lpWindowPos->flags & SWP_SHOWWINDOW) ||
551 !(lpWindowPos->flags & SWP_NOMOVE) ||
552 !(lpWindowPos->flags & SWP_NOSIZE))
553 {
554 /* Size in WINDOWPOS includes the window frame, so get the size
555 * of the client area via GetClientRect. */
556 RECT client_rect;
558
559 TRACE("Got WM_WINDOWPOSCHANGED\n");
560
561 GetClientRect(pParams->hwnd, &client_rect);
562 width = client_rect.right - client_rect.left;
563 height = client_rect.bottom - client_rect.top;
564 /* Do not reallocate for minimized windows */
565 if(width <= 0 || height <= 0)
566 goto end;
567 /* Propagate to mesa */
568 gl_ResizeBuffersMESA(ctx->gl_ctx);
569 }
570 }
571
572end:
573 return CallNextHookEx(ctx->hook, nCode, wParam, lParam);
574}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
void gl_ResizeBuffersMESA(GLcontext *ctx)
Definition: context.c:1497
GLuint GLuint end
Definition: gl.h:1545
unsigned int UINT
Definition: ndis.h:50
#define WGL_DC_OBJ_DC
Definition: opengl32.h:84
static struct wgl_dc_data * IntGetCurrentDcData(void)
Definition: opengl32.h:156
UINT flags
Definition: winuser.h:3594
LPARAM lParam
Definition: winuser.h:3025
UINT message
Definition: winuser.h:3027
ULONG flags
Definition: opengl32.h:94
union wgl_dc_data::@293 owner
HWND hwnd
Definition: opengl32.h:90
void * sw_data
Definition: opengl32.h:105
#define SWP_NOMOVE
Definition: winuser.h:1244
struct tagCWPSTRUCT * PCWPSTRUCT
#define SWP_NOSIZE
Definition: winuser.h:1245
#define SWP_SHOWWINDOW
Definition: winuser.h:1248
struct _WINDOWPOS * LPWINDOWPOS
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1662

Referenced by sw_SetContext().

◆ sw_CopyContext()

BOOL sw_CopyContext ( DHGLRC  dhglrcSrc,
DHGLRC  dhglrcDst,
UINT  mask 
)

Definition at line 498 of file swimpl.c.

499{
500 FIXME("Software wglCopyContext is UNIMPLEMENTED, mask %lx.\n", mask);
501 return FALSE;
502}
#define FALSE
Definition: types.h:117

Referenced by wglCopyContext().

◆ sw_CreateContext()

DHGLRC sw_CreateContext ( struct wgl_dc_data dc_data)

Definition at line 422 of file swimpl.c.

423{
424 struct sw_context* sw_ctx;
425 struct sw_framebuffer* fb = dc_data->sw_data;
426
427 sw_ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*sw_ctx));
428 if(!sw_ctx)
429 return NULL;
430
431 /* Initialize the context */
432 sw_ctx->gl_ctx = gl_create_context(fb->gl_visual, NULL, sw_ctx);
433 if(!sw_ctx->gl_ctx)
434 {
435 ERR("Failed to initialize the mesa context.\n");
436 HeapFree(GetProcessHeap(), 0, sw_ctx);
437 return NULL;
438 }
439
440 sw_ctx->fb = fb;
441
442 /* Choose relevant default */
443 sw_ctx->Mode = fb->gl_visual->DBflag ? GL_BACK : GL_FRONT;
444
445 return (DHGLRC)sw_ctx;
446}
GLcontext * gl_create_context(GLvisual *visual, GLcontext *share_list, void *driver_ctx)
Definition: context.c:1093
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134

Referenced by wglCreateContext(), and wglCreateLayerContext().

◆ sw_DeleteContext()

BOOL sw_DeleteContext ( DHGLRC  dhglrc)

Definition at line 448 of file swimpl.c.

449{
450 struct sw_context* sw_ctx = (struct sw_context*)dhglrc;
451 /* Those get clobbered by _mesa_free_context_data via _glapi_set{context,dispath_table} */
452 void* icd_save = IntGetCurrentICDPrivate();
453 const GLDISPATCHTABLE* table_save = IntGetCurrentDispatchTable();
454
455 /* Destroy everything */
456 gl_destroy_context(sw_ctx->gl_ctx);
457
458 HeapFree(GetProcessHeap(), 0, sw_ctx);
459
460 /* Restore this */
461 IntSetCurrentDispatchTable(table_save);
462 IntSetCurrentICDPrivate(icd_save);
463
464 return TRUE;
465}
#define TRUE
Definition: types.h:120
void gl_destroy_context(GLcontext *ctx)
Definition: context.c:1186
FORCEINLINE void IntSetCurrentDispatchTable(const GLDISPATCHTABLE *table)
Definition: opengl32.h:124
FORCEINLINE void IntSetCurrentICDPrivate(void *value)
Definition: opengl32.h:163
FORCEINLINE const GLDISPATCHTABLE * IntGetCurrentDispatchTable(void)
Definition: opengl32.h:117
FORCEINLINE void * IntGetCurrentICDPrivate(void)
Definition: opengl32.h:170

Referenced by wglCreateContext(), wglCreateLayerContext(), and wglDeleteContext().

◆ sw_DescribePixelFormat()

INT sw_DescribePixelFormat ( HDC  hdc,
INT  format,
UINT  size,
PIXELFORMATDESCRIPTOR descr 
)

Definition at line 315 of file swimpl.c.

316{
317 INT ret;
318 const struct pixel_format *pixel_format;
319
320 TRACE("Describing format %i.\n", format);
321
323 if(!descr)
324 return ret;
325 if((format > ret) || (size != sizeof(*descr)))
326 return 0;
327
328 /* Fill the structure */
329 descr->nSize = sizeof(*descr);
330 descr->nVersion = 1;
331 descr->dwFlags = pixel_format->dwFlags;
332 descr->iPixelType = pixel_format->iPixelType;
333 descr->cColorBits = pixel_format->cColorBits;
334 descr->cRedBits = pixel_format->cRedBits;
335 descr->cRedShift = pixel_format->cRedShift;
336 descr->cGreenBits = pixel_format->cGreenBits;
337 descr->cGreenShift = pixel_format->cGreenShift;
338 descr->cBlueBits = pixel_format->cBlueBits;
339 descr->cBlueShift = pixel_format->cBlueShift;
340 descr->cAlphaBits = pixel_format->cAlphaBits;
341 descr->cAlphaShift = pixel_format->cAlphaShift;
342 descr->cAccumBits = pixel_format->cAccumBits;
343 descr->cAccumRedBits = pixel_format->cAccumRedBits;
344 descr->cAccumGreenBits = pixel_format->cAccumGreenBits;
345 descr->cAccumBlueBits = pixel_format->cAccumBlueBits;
346 descr->cAccumAlphaBits = pixel_format->cAccumAlphaBits;
347 descr->cDepthBits = pixel_format->cDepthBits;
348 descr->cStencilBits = STENCIL_BITS;
349 descr->cAuxBuffers = 0;
350 descr->iLayerType = PFD_MAIN_PLANE;
351 descr->bReserved = 0;
352 descr->dwLayerMask = 0;
353 descr->dwVisibleMask = 0;
354 descr->dwDamageMask = 0;
355
356 return ret;
357}
#define STENCIL_BITS
Definition: config.h:152
GLsizeiptr size
Definition: glext.h:5919
const char * descr
Definition: boot.c:45
BYTE cAccumGreenBits
Definition: swimpl.c:37
BYTE cGreenBits
Definition: swimpl.c:33
BYTE cAlphaShift
Definition: swimpl.c:35
BYTE cGreenShift
Definition: swimpl.c:33
BYTE iPixelType
Definition: swimpl.c:30
BYTE cDepthBits
Definition: swimpl.c:38
BYTE cRedShift
Definition: swimpl.c:32
BYTE cAccumRedBits
Definition: swimpl.c:37
BYTE cAccumBlueBits
Definition: swimpl.c:37
BYTE cAccumBits
Definition: swimpl.c:36
BYTE cAlphaBits
Definition: swimpl.c:35
BYTE cAccumAlphaBits
Definition: swimpl.c:37
BYTE cBlueBits
Definition: swimpl.c:34
BYTE cBlueShift
Definition: swimpl.c:34
BYTE cRedBits
Definition: swimpl.c:32
static const struct pixel_format * get_format(INT pf_index, INT *pf_count)
Definition: swimpl.c:274
#define PFD_MAIN_PLANE
Definition: wingdi.h:298

Referenced by get_dc_data_ex(), and wglDescribePixelFormat().

◆ sw_GetProcAddress()

PROC sw_GetProcAddress ( LPCSTR  name)

Definition at line 478 of file swimpl.c.

479{
480 /* GL_EXT_paletted_texture */
481 if (strcmp(name, "glColorTableEXT") == 0)
483 if (strcmp(name, "glColorSubTableEXT") == 0)
485 if (strcmp(name, "glColorGetTableEXT") == 0)
487 if (strcmp(name, "glGetColorTableParameterivEXT") == 0)
489 if (strcmp(name, "glGetColorTableParameterfvEXT") == 0)
491 if (strcmp(name, "glAddSwapHintRectWIN") == 0)
493
494 WARN("Asking for proc address %s, returning NULL.\n", name);
495 return NULL;
496}
#define PROC(name)
Definition: WinHttpOpen.c:37
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define WARN(fmt,...)
Definition: precomp.h:61
Definition: name.c:39
void APIENTRY _mesa_GetColorTableParameterivEXT(GLenum, GLenum, GLfloat *)
void APIENTRY _mesa_GetColorTableParameterfvEXT(GLenum, GLenum, GLint *)
void APIENTRY _mesa_GetColorTableEXT(GLenum, GLenum, GLenum, void *)
Definition: api.c:2851
void APIENTRY _mesa_ColorSubTableEXT(GLenum, GLsizei, GLsizei, GLenum, GLenum, const void *)
Definition: api.c:2839
static void APIENTRY _swimpl_AddSwapHintRectWIN(GLint x, GLint y, GLsizei width, GLsizei height)
Definition: swimpl.c:473
void APIENTRY _mesa_ColorTableEXT(GLenum, GLenum, GLsizei, GLenum, GLenum, const void *)
Definition: api.c:2826

Referenced by wglGetProcAddress().

◆ sw_ReleaseContext()

void sw_ReleaseContext ( DHGLRC  dhglrc)

Definition at line 1477 of file swimpl.c.

1478{
1479 struct sw_context* sw_ctx = (struct sw_context*)dhglrc;
1480
1481 /* Forward to mesa */
1483
1484 /* Unhook */
1485 if(sw_ctx->hook)
1486 {
1487 UnhookWindowsHookEx(sw_ctx->hook);
1488 sw_ctx->hook = NULL;
1489 }
1490}
void gl_make_current(GLcontext *ctx, GLframebuffer *buffer)
Definition: context.c:1276
HHOOK hook
Definition: swimpl.c:241
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)

Referenced by wglMakeCurrent().

◆ sw_SetContext()

BOOL sw_SetContext ( struct wgl_dc_data dc_data,
DHGLRC  dhglrc 
)

Definition at line 1390 of file swimpl.c.

1391{
1392 struct sw_context* sw_ctx = (struct sw_context*)dhglrc;
1393 struct sw_framebuffer* fb = dc_data->sw_data;
1394 UINT width, height;
1395
1396 /* Get framebuffer size */
1397 if(dc_data->flags & WGL_DC_OBJ_DC)
1398 {
1399 HWND hwnd = dc_data->owner.hwnd;
1400 RECT client_rect;
1401 if(!hwnd)
1402 {
1403 ERR("Physical DC without a window!\n");
1404 return FALSE;
1405 }
1406 if(!GetClientRect(hwnd, &client_rect))
1407 {
1408 ERR("GetClientRect failed!\n");
1409 return FALSE;
1410 }
1411
1412 /* This is a physical DC. Setup the hook */
1415 NULL,
1417
1418 /* Calculate width & height */
1419 width = client_rect.right - client_rect.left;
1420 height = client_rect.bottom - client_rect.top;
1421 }
1422 else /* OBJ_MEMDC */
1423 {
1424 BITMAP bm;
1425 HBITMAP hbmp;
1426 HDC hdc = dc_data->owner.hdc;
1427
1428 if(fb->gl_visual->DBflag)
1429 {
1430 ERR("Memory DC called with a double buffered format.\n");
1431 return FALSE;
1432 }
1433
1435 if(!hbmp)
1436 {
1437 ERR("No Bitmap!\n");
1438 return FALSE;
1439 }
1440 if(GetObject(hbmp, sizeof(bm), &bm) == 0)
1441 {
1442 ERR("GetObject failed!\n");
1443 return FALSE;
1444 }
1445 width = bm.bmWidth;
1446 height = bm.bmHeight;
1447 }
1448
1449 if(!width) width = 1;
1450 if(!height) height = 1;
1451
1452 /* Also make the mesa context current to mesa */
1453 gl_make_current(sw_ctx->gl_ctx, fb->gl_buffer);
1454
1455 /* Setup our functions */
1456 setup_DD_pointers(sw_ctx->gl_ctx);
1457
1458 /* Set the viewport if this is the first time we initialize this context */
1459 if(sw_ctx->gl_ctx->Viewport.X == 0 &&
1460 sw_ctx->gl_ctx->Viewport.Y == 0 &&
1461 sw_ctx->gl_ctx->Viewport.Width == 0 &&
1462 sw_ctx->gl_ctx->Viewport.Height == 0)
1463 {
1464 gl_Viewport(sw_ctx->gl_ctx, 0, 0, width, height);
1465 }
1466
1467 /* update the framebuffer size */
1469
1470 /* Use our API table */
1472
1473 /* We're good */
1474 return TRUE;
1475}
HBITMAP hbmp
void gl_Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height)
Definition: matrix.c:1014
GLDISPATCHTABLE glDispatchTable
Definition: icd.h:357
struct gl_viewport_attrib Viewport
Definition: types.h:1336
GLframebuffer * gl_buffer
Definition: swimpl.c:224
static LRESULT CALLBACK sw_call_window_proc(int nCode, WPARAM wParam, LPARAM lParam)
Definition: swimpl.c:525
static GLCLTPROCTABLE sw_api_table
Definition: swimpl.c:1373
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define GetObject
Definition: wingdi.h:4468
#define SetWindowsHookEx
Definition: winuser.h:5865
#define WH_CALLWNDPROC
Definition: winuser.h:34

Referenced by wglMakeCurrent().

◆ sw_SetPixelFormat()

BOOL sw_SetPixelFormat ( HDC  hdc,
struct wgl_dc_data dc_data,
INT  format 
)

Definition at line 359 of file swimpl.c.

360{
361 struct sw_framebuffer* fb;
362 const struct pixel_format *pixel_format;
363
364 /* So, someone is crazy enough to ask for sw implementation. Announce it. */
365 TRACE("OpenGL software implementation START for hdc %p, format %i!\n", hdc, format);
366
368 if (!pixel_format)
369 return FALSE;
370
371 /* allocate our structure */
372 fb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*fb));
373 if(!fb)
374 {
375 ERR("HeapAlloc FAILED!\n");
376 return FALSE;
377 }
378 /* Set the format */
380
389 ((1ul << pixel_format->cRedBits) - 1),
390 ((1ul << pixel_format->cGreenBits) - 1),
391 ((1ul << pixel_format->cBlueBits) - 1),
392 pixel_format->cAlphaBits != 0 ? ((1ul << pixel_format->cAlphaBits) - 1) : 255.0f,
397
398 if(!fb->gl_visual)
399 {
400 ERR("Failed to allocate a GL visual.\n");
401 HeapFree(GetProcessHeap(), 0, fb);
402 return FALSE;
403 }
404
405 /* Allocate the framebuffer structure */
407 if (!fb->gl_buffer) {
408 ERR("Failed to allocate the mesa framebuffer structure.\n");
410 HeapFree(GetProcessHeap(), 0, fb);
411 return FALSE;
412 }
413
414 /* Save our DC */
415 fb->Hdc = hdc;
416
417 /* Everything went fine */
418 dc_data->sw_data = fb;
419 return TRUE;
420}
GLvisual * gl_create_visual(GLboolean rgb_flag, GLboolean alpha_flag, GLboolean db_flag, GLint depth_bits, GLint stencil_bits, GLint accum_bits, GLint index_bits, GLfloat red_scale, GLfloat green_scale, GLfloat blue_scale, GLfloat alpha_scale, GLint red_bits, GLint green_bits, GLint blue_bits, GLint alpha_bits)
Definition: context.c:936
GLframebuffer * gl_create_framebuffer(GLvisual *visual)
Definition: context.c:1230
void gl_destroy_visual(GLvisual *vis)
Definition: context.c:1029
#define max(a, b)
Definition: svc.c:63
#define PFD_TYPE_RGBA
Definition: wingdi.h:296

Referenced by wglSetPixelFormat().

◆ sw_ShareLists()

BOOL sw_ShareLists ( DHGLRC  dhglrcSrc,
DHGLRC  dhglrcDst 
)

Definition at line 504 of file swimpl.c.

505{
506#if 0
507 struct sw_context* sw_ctx_src = (struct sw_context*)dhglrcSrc;
508 struct sw_context* sw_ctx_dst = (struct sw_context*)dhglrcDst;
509
510 /* See if it was already shared */
511 if(sw_ctx_dst->gl_ctx->Shared->RefCount > 1)
512 return FALSE;
513
514 /* Unreference the old, share the new */
515 gl_reference_shared_state(sw_ctx_dst->gl_ctx,
516 &sw_ctx_dst->gl_ctx->Shared,
517 sw_ctx_src->gl_ctx->Shared);
518#endif
519 FIXME("Unimplemented!\n");
520 return TRUE;
521}
struct gl_shared_state * Shared
Definition: types.h:1265

Referenced by wglShareLists().

◆ sw_SwapBuffers()

BOOL sw_SwapBuffers ( HDC  hdc,
struct wgl_dc_data dc_data 
)

Definition at line 1492 of file swimpl.c.

1493{
1494 struct sw_framebuffer* fb = dc_data->sw_data;
1495 char Buffer[sizeof(BITMAPINFOHEADER) + 3 * sizeof(DWORD)];
1496 BITMAPINFO *bmi = (BITMAPINFO*)Buffer;
1497 BYTE Bpp = fb->pixel_format->cColorBits;
1498
1499 if (!fb->gl_visual->DBflag)
1500 return TRUE;
1501
1502 if (!fb->BackBuffer)
1503 return FALSE;
1504
1505 bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
1506 bmi->bmiHeader.biBitCount = Bpp;
1507 bmi->bmiHeader.biClrImportant = 0;
1508 bmi->bmiHeader.biClrUsed = 0;
1509 bmi->bmiHeader.biPlanes = 1;
1510 bmi->bmiHeader.biSizeImage = WIDTH_BYTES_ALIGN32(fb->width, Bpp) * fb->height;
1511 bmi->bmiHeader.biXPelsPerMeter = 0;
1512 bmi->bmiHeader.biYPelsPerMeter = 0;
1513 bmi->bmiHeader.biHeight = fb->height;
1514 bmi->bmiHeader.biWidth = fb->width;
1515 bmi->bmiHeader.biCompression = Bpp == 16 ? BI_BITFIELDS : BI_RGB;
1516
1517 if (Bpp == 16)
1518 {
1519 DWORD* BitMasks = (DWORD*)(&bmi->bmiColors[0]);
1520 BitMasks[0] = 0x0000F800;
1521 BitMasks[1] = 0x000007E0;
1522 BitMasks[2] = 0x0000001F;
1523 }
1524
1525 return SetDIBitsToDevice(fb->Hdc, 0, 0, fb->width, fb->height, 0, 0, 0, fb->height, fb->BackBuffer, bmi,
1527}
#define BI_RGB
Definition: precomp.h:56
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BI_BITFIELDS
Definition: mmreg.h:507
ULONG biClrImportant
Definition: precomp.h:52
USHORT biBitCount
Definition: precomp.h:46
LONG biYPelsPerMeter
Definition: precomp.h:50
ULONG biCompression
Definition: precomp.h:47
LONG biXPelsPerMeter
Definition: precomp.h:49
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1476
RGBQUAD bmiColors[1]
Definition: wingdi.h:1477
#define DIB_RGB_COLORS
Definition: wingdi.h:367
int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
#define DIB_PAL_COLORS
Definition: wingdi.h:366

Referenced by wglSwapBuffers().

◆ UNPACK_COLOR_16()

static void UNPACK_COLOR_16 ( USHORT  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 666 of file swimpl.c.

667{
668 *r = (Color >> 11) & 0x1F;
669 *g = (Color >> 5) & 0x3F;
670 *b = Color & 0x1F;
671}

◆ UNPACK_COLOR_24()

static void UNPACK_COLOR_24 ( ULONG  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 673 of file swimpl.c.

674{
675 *r = (Color >> 16) & 0xFF;
676 *g = (Color >> 8) & 0xFF;
677 *b = Color & 0xFF;
678}

◆ UNPACK_COLOR_32()

static void UNPACK_COLOR_32 ( ULONG  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 680 of file swimpl.c.

681{
682 *r = (Color >> 16) & 0xFF;
683 *g = (Color >> 8) & 0xFF;
684 *b = Color & 0xFF;
685}

◆ UNPACK_COLOR_8()

static void UNPACK_COLOR_8 ( BYTE  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 659 of file swimpl.c.

660{
661 *r = Color & 0x7;
662 *g = (Color >> 3) & 0x7;
663 *b = (Color >> 6) & 0x3;
664}

◆ UNPACK_COLORREF_16()

static void UNPACK_COLORREF_16 ( COLORREF  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 694 of file swimpl.c.

695{
696 *r = GetRValue(Color) >> 3;
697 *g = GetGValue(Color) >> 2;
698 *b = GetBValue(Color) >> 3;
699}
#define GetBValue(quad)
Definition: precomp.h:75
#define GetGValue(quad)
Definition: precomp.h:74
#define GetRValue(quad)
Definition: precomp.h:73

◆ UNPACK_COLORREF_24()

static void UNPACK_COLORREF_24 ( COLORREF  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 701 of file swimpl.c.

702{
703 *r = GetRValue(Color);
704 *g = GetGValue(Color);
705 *b = GetBValue(Color);
706}

◆ UNPACK_COLORREF_32()

static void UNPACK_COLORREF_32 ( COLORREF  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 708 of file swimpl.c.

709{
710 *r = GetRValue(Color);
711 *g = GetGValue(Color);
712 *b = GetBValue(Color);
713}

◆ UNPACK_COLORREF_8()

static void UNPACK_COLORREF_8 ( COLORREF  Color,
GLubyte r,
GLubyte g,
GLubyte b 
)
inlinestatic

Definition at line 687 of file swimpl.c.

688{
689 *r = GetRValue(Color) >> 5;
690 *g = GetGValue(Color) >> 5;
691 *b = GetBValue(Color) >> 6;
692}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( opengl32  )

◆ write_index_pixels()

static void write_index_pixels ( GLcontext ctx,
GLuint  n,
const GLint  x[],
const GLint  y[],
const GLuint  index[],
const GLubyte  mask[] 
)
static

Definition at line 1201 of file swimpl.c.

1204{
1205 ERR("Not implemented yet !\n");
1206}

Referenced by setup_DD_pointers().

◆ write_index_span()

static void write_index_span ( GLcontext ctx,
GLuint  n,
GLint  x,
GLint  y,
const GLuint  index[],
const GLubyte  mask[] 
)
static

Definition at line 1192 of file swimpl.c.

1196{
1197 ERR("Not implemented yet !\n");
1198}

Referenced by setup_DD_pointers().

◆ write_monocolor_pixels_frontbuffer()

static void write_monocolor_pixels_frontbuffer ( struct sw_framebuffer fb,
GLuint  n,
const GLint  x[],
const GLint  y[],
const GLubyte  mask[],
COLORREF  Color 
)
static

Definition at line 1139 of file swimpl.c.

1143{
1144 TRACE("Writing monocolor pixels to front buffer.\n");
1145
1146 while (n--)
1147 {
1148 if (mask[n])
1149 {
1150 SetPixel(fb->Hdc, x[n], fb->height - y[n], Color);
1151 }
1152 }
1153}
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
Definition: arm.h:55

◆ write_monocolor_span_frontbuffer()

static void write_monocolor_span_frontbuffer ( struct sw_framebuffer fb,
GLuint  n,
GLint  x,
GLint  y,
const GLubyte  mask[],
COLORREF  Color 
)
static

Definition at line 1028 of file swimpl.c.

1030{
1031 TRACE("Writing monocolor span at %u %u (%u), Color 0x%08x\n", x, y, n, Color);
1032
1033 if (mask)
1034 {
1035 while (n--)
1036 {
1037 if (mask[n])
1038 SetPixel(fb->Hdc, x + n, y, Color);
1039 }
1040 }
1041 else
1042 {
1043 HBRUSH Brush = CreateSolidBrush(Color);
1044 Brush = SelectObject(fb->Hdc, Brush);
1045
1046 PatBlt(fb->Hdc, x, fb->height - y, n, 1, PATCOPY);
1047
1048 Brush = SelectObject(fb->Hdc, Brush);
1050 }
1051}

Variable Documentation

◆ pixel_formats_16

const struct pixel_format pixel_formats_16[]
static

Definition at line 131 of file swimpl.c.

◆ pixel_formats_24

const struct pixel_format pixel_formats_24[]
static

Definition at line 86 of file swimpl.c.

◆ pixel_formats_32

const struct pixel_format pixel_formats_32[]
static

Definition at line 41 of file swimpl.c.

Referenced by get_format().

◆ pixel_formats_8

const struct pixel_format pixel_formats_8[]
static

Definition at line 176 of file swimpl.c.

◆ sw_api_table

GLCLTPROCTABLE sw_api_table
static
Initial value:
=
{
{
#define USE_GL_FUNC(name, proto_args, call_args, offset, stack)
}
}
#define OPENGL_VERSION_110_ENTRIES
Definition: icd.h:10

Definition at line 1373 of file swimpl.c.

Referenced by sw_SetContext().