#include "config.h"
#include "wine/port.h"
#include "wined3d_private.h"
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, DWORD flags, DWORD start, DWORD 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, DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries) |
|
static HRESULT | wined3d_palette_init (struct wined3d_palette *palette, struct wined3d_device *device, DWORD flags, unsigned int entry_count, const PALETTEENTRY *entries) |
|
HRESULT CDECL | wined3d_palette_create (struct wined3d_device *device, DWORD 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 162 of file palette.c.
164{
167
168 TRACE(
"device %p, flags %#x, entry_count %u, entries %p, palette %p.\n",
170
171 if (!(object = heap_alloc_zero(sizeof(*object))))
173
175 {
176 WARN(
"Failed to initialize palette, hr %#x.\n",
hr);
179 }
180
181 TRACE(
"Created palette %p.\n",
object);
183
185}
static BOOL heap_free(void *mem)
static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wined3d_device *device, DWORD flags, unsigned int entry_count, const PALETTEENTRY *entries)
Referenced by ddraw_palette_init().
◆ wined3d_palette_decref()
Definition at line 41 of file palette.c.
42{
44
45 TRACE(
"%p decreasing refcount to %u.\n",
palette, refcount);
46
47 if (!refcount)
49
50 return refcount;
51}
#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)
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 53 of file palette.c.
55{
57 TRACE(
"palette %p, flags %#x, start %u, count %u, entries %p.\n",
59
64
66 {
68
71 }
72 else
73 {
75 {
80 }
81 }
82
84}
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
#define WINED3DERR_INVALIDCALL
Referenced by ddraw_palette_GetEntries(), and wined3d_colour_from_ddraw_colour().
◆ wined3d_palette_incref()
Definition at line 27 of file palette.c.
28{
30
31 TRACE(
"%p increasing refcount to %u.\n",
palette, refcount);
32
33 return refcount;
34}
#define InterlockedIncrement
◆ wined3d_palette_init()
Definition at line 143 of file palette.c.
145{
147
152
154 {
155 WARN(
"Failed to set palette entries, hr %#x.\n",
hr);
157 }
158
160}
HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette, DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries)
Referenced by wined3d_palette_create().
◆ wined3d_palette_set_entries()
Definition at line 100 of file palette.c.
102{
104
105 TRACE(
"palette %p, flags %#x, start %u, count %u, entries %p.\n",
108
110 {
112
115 }
116 else
117 {
119 {
124 }
125
126
128 {
129 TRACE(
"WINED3D_PALETTE_ALLOW_256 not set, overriding palette entry 0 with black and 255 with white.\n");
131 palette->colors[0].rgbGreen = 0;
132 palette->colors[0].rgbBlue = 0;
133
134 palette->colors[255].rgbRed = 255;
135 palette->colors[255].rgbGreen = 255;
136 palette->colors[255].rgbBlue = 255;
137 }
138 }
139
141}
#define WINED3D_PALETTE_ALLOW_256
Referenced by ddraw_palette_SetEntries(), and wined3d_palette_init().