mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
GSG: Fix symbol name conflict
This commit is contained in:
parent
fb52a8e15e
commit
35d095c2cf
@ -5240,9 +5240,9 @@ calc_fb_properties(DWORD cformat, DWORD dformat,
|
|||||||
#define GAMMA_1 (255.0 * 256.0)
|
#define GAMMA_1 (255.0 * 256.0)
|
||||||
|
|
||||||
static bool _gamma_table_initialized = false;
|
static bool _gamma_table_initialized = false;
|
||||||
static unsigned short _orignial_gamma_table [256 * 3];
|
static unsigned short _original_gamma_table [256 * 3];
|
||||||
|
|
||||||
void _create_gamma_table (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) {
|
void _create_gamma_table_dx9 (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) {
|
||||||
int i;
|
int i;
|
||||||
double gamma_correction;
|
double gamma_correction;
|
||||||
|
|
||||||
@ -5304,7 +5304,7 @@ get_gamma_table(void) {
|
|||||||
HDC hdc = GetDC(nullptr);
|
HDC hdc = GetDC(nullptr);
|
||||||
|
|
||||||
if (hdc) {
|
if (hdc) {
|
||||||
if (GetDeviceGammaRamp (hdc, (LPVOID) _orignial_gamma_table)) {
|
if (GetDeviceGammaRamp (hdc, (LPVOID) _original_gamma_table)) {
|
||||||
_gamma_table_initialized = true;
|
_gamma_table_initialized = true;
|
||||||
get = true;
|
get = true;
|
||||||
}
|
}
|
||||||
@ -5329,10 +5329,10 @@ static_set_gamma(bool restore, PN_stdfloat gamma) {
|
|||||||
unsigned short ramp [256 * 3];
|
unsigned short ramp [256 * 3];
|
||||||
|
|
||||||
if (restore && _gamma_table_initialized) {
|
if (restore && _gamma_table_initialized) {
|
||||||
_create_gamma_table (gamma, &_orignial_gamma_table [0], &_orignial_gamma_table [256], &_orignial_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]);
|
_create_gamma_table_dx9 (gamma, &_original_gamma_table [0], &_original_gamma_table [256], &_original_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_create_gamma_table (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]);
|
_create_gamma_table_dx9 (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SetDeviceGammaRamp (hdc, ramp)) {
|
if (SetDeviceGammaRamp (hdc, ramp)) {
|
||||||
|
@ -778,9 +778,9 @@ register_twindow_class() {
|
|||||||
#define GAMMA_1 (255.0 * 256.0)
|
#define GAMMA_1 (255.0 * 256.0)
|
||||||
|
|
||||||
static bool _gamma_table_initialized = false;
|
static bool _gamma_table_initialized = false;
|
||||||
static unsigned short _orignial_gamma_table [256 * 3];
|
static unsigned short _original_gamma_table [256 * 3];
|
||||||
|
|
||||||
void _create_gamma_table (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) {
|
void _create_gamma_table_wgl (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) {
|
||||||
int i;
|
int i;
|
||||||
double gamma_correction;
|
double gamma_correction;
|
||||||
|
|
||||||
@ -842,7 +842,7 @@ get_gamma_table(void) {
|
|||||||
HDC hdc = GetDC(nullptr);
|
HDC hdc = GetDC(nullptr);
|
||||||
|
|
||||||
if (hdc) {
|
if (hdc) {
|
||||||
if (GetDeviceGammaRamp (hdc, (LPVOID) _orignial_gamma_table)) {
|
if (GetDeviceGammaRamp (hdc, (LPVOID) _original_gamma_table)) {
|
||||||
_gamma_table_initialized = true;
|
_gamma_table_initialized = true;
|
||||||
get = true;
|
get = true;
|
||||||
}
|
}
|
||||||
@ -867,10 +867,10 @@ static_set_gamma(bool restore, PN_stdfloat gamma) {
|
|||||||
unsigned short ramp [256 * 3];
|
unsigned short ramp [256 * 3];
|
||||||
|
|
||||||
if (restore && _gamma_table_initialized) {
|
if (restore && _gamma_table_initialized) {
|
||||||
_create_gamma_table (gamma, &_orignial_gamma_table [0], &_orignial_gamma_table [256], &_orignial_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]);
|
_create_gamma_table_wgl (gamma, &_original_gamma_table [0], &_original_gamma_table [256], &_original_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_create_gamma_table (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]);
|
_create_gamma_table_wgl (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SetDeviceGammaRamp (hdc, ramp)) {
|
if (SetDeviceGammaRamp (hdc, ramp)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user