Go to the source code of this file.
|
| | WINE_DEFAULT_DEBUG_CHANNEL (d3d) |
| |
| ULONG CDECL | wined3d_palette_incref (struct wined3d_palette *palette) |
| |
| static void | wined3d_palette_destroy_object (void *object) |
| |
| ULONG CDECL | wined3d_palette_decref (struct wined3d_palette *palette) |
| |
| HRESULT CDECL | wined3d_palette_get_entries (const struct wined3d_palette *palette, uint32_t flags, unsigned int start, unsigned int count, PALETTEENTRY *entries) |
| |
| void CDECL | wined3d_palette_apply_to_dc (const struct wined3d_palette *palette, HDC dc) |
| |
| HRESULT CDECL | wined3d_palette_set_entries (struct wined3d_palette *palette, uint32_t flags, unsigned int start, unsigned int count, const PALETTEENTRY *entries) |
| |
| static HRESULT | wined3d_palette_init (struct wined3d_palette *palette, struct wined3d_device *device, uint32_t flags, unsigned int entry_count, const PALETTEENTRY *entries) |
| |
| HRESULT CDECL | wined3d_palette_create (struct wined3d_device *device, uint32_t flags, unsigned int entry_count, const PALETTEENTRY *entries, struct wined3d_palette **palette) |
| |
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
d3d |
| ) |
|
◆ wined3d_palette_apply_to_dc()
◆ wined3d_palette_create()
Definition at line 161 of file palette.c.
163{
166
167 TRACE(
"device %p, flags %#x, entry_count %u, entries %p, palette %p.\n",
169
170 if (!(
object =
calloc(1,
sizeof(*
object))))
172
174 {
175 WARN(
"Failed to initialize palette, hr %#lx.\n",
hr);
178 }
179
180 TRACE(
"Created palette %p.\n",
object);
182
184}
static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wined3d_device *device, uint32_t flags, unsigned int entry_count, const PALETTEENTRY *entries)
Referenced by ddraw_palette_init().
◆ wined3d_palette_decref()
Definition at line 42 of file palette.c.
43{
45
46 TRACE(
"%p decreasing refcount to %u.\n",
palette, refcount);
47
48 if (!refcount)
49 {
53 }
54
55 return refcount;
56}
#define InterlockedDecrement
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
static void wined3d_palette_destroy_object(void *object)
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)
Referenced by ddraw_palette_Release().
◆ wined3d_palette_destroy_object()
| static void wined3d_palette_destroy_object |
( |
void * |
object | ) |
|
|
static |
◆ wined3d_palette_get_entries()
Definition at line 58 of file palette.c.
60{
62 TRACE(
"palette %p, flags %#x, start %u, count %u, entries %p.\n",
64
69
71 {
73
76 }
77 else
78 {
80 {
85 }
86 }
87
89}
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define WINED3D_PALETTE_8BIT_ENTRIES
static bool wined3d_bound_range(unsigned int start, unsigned int count, unsigned int limit)
#define WINED3DERR_INVALIDCALL
Referenced by ddraw_palette_GetEntries(), and wined3d_colour_from_ddraw_colour().
◆ wined3d_palette_incref()
Definition at line 26 of file palette.c.
27{
29
30 TRACE(
"%p increasing refcount to %u.\n",
palette, refcount);
31
32 return refcount;
33}
#define InterlockedIncrement
◆ wined3d_palette_init()
Definition at line 142 of file palette.c.
144{
146
151
153 {
154 WARN(
"Failed to set palette entries, hr %#lx.\n",
hr);
156 }
157
159}
HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette, uint32_t flags, unsigned int start, unsigned int count, const PALETTEENTRY *entries)
Referenced by wined3d_palette_create().
◆ wined3d_palette_set_entries()
Definition at line 97 of file palette.c.
99{
101
102 TRACE(
"palette %p, flags %#x, start %u, count %u, entries %p.\n",
105
107
109 {
111
114 }
115 else
116 {
118 {
123 }
124
125
127 {
128 TRACE(
"WINED3D_PALETTE_ALLOW_256 not set, overriding palette entry 0 with black and 255 with white.\n");
130 palette->colors[0].rgbGreen = 0;
131 palette->colors[0].rgbBlue = 0;
132
133 palette->colors[255].rgbRed = 255;
134 palette->colors[255].rgbGreen = 255;
135 palette->colors[255].rgbBlue = 255;
136 }
137 }
138
140}
#define WINED3D_PALETTE_ALLOW_256
static void wined3d_cs_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
@ WINED3D_CS_QUEUE_DEFAULT
Referenced by ddraw_palette_SetEntries(), and wined3d_palette_init().