Reformat all the things. Have fun with merge conflicts.
This commit is contained in:
parent
2115e8a4a6
commit
3570c7f03a
|
@ -15,304 +15,84 @@ namespace ButtonManager
|
|||
std::unordered_map<std::string, InputDevice*> m_controllers;
|
||||
std::vector<std::string> configStrings = {
|
||||
// GC
|
||||
"InputA",
|
||||
"InputB",
|
||||
"InputStart",
|
||||
"InputX",
|
||||
"InputY",
|
||||
"InputZ",
|
||||
"DPadUp",
|
||||
"DPadDown",
|
||||
"DPadLeft",
|
||||
"DPadRight",
|
||||
"MainUp",
|
||||
"MainDown",
|
||||
"MainLeft",
|
||||
"MainRight",
|
||||
"CStickUp",
|
||||
"CStickDown",
|
||||
"CStickLeft",
|
||||
"CStickRight",
|
||||
"InputL",
|
||||
"InputR",
|
||||
"InputA", "InputB", "InputStart", "InputX", "InputY", "InputZ", "DPadUp", "DPadDown",
|
||||
"DPadLeft", "DPadRight", "MainUp", "MainDown", "MainLeft", "MainRight", "CStickUp",
|
||||
"CStickDown", "CStickLeft", "CStickRight", "InputL", "InputR",
|
||||
// Wiimote
|
||||
"WiimoteA",
|
||||
"WiimoteB",
|
||||
"WiimoteMinus",
|
||||
"WiimotePlus",
|
||||
"WiimoteHome",
|
||||
"Wiimote1",
|
||||
"Wiimote2",
|
||||
"WiimoteUp",
|
||||
"WiimoteDown",
|
||||
"WiimoteLeft",
|
||||
"WiimoteRight",
|
||||
"IRUp",
|
||||
"IRDown",
|
||||
"IRLeft",
|
||||
"IRRight",
|
||||
"IRForward",
|
||||
"IRBackward",
|
||||
"IRHide",
|
||||
"SwingUp",
|
||||
"SwingDown",
|
||||
"SwingLeft",
|
||||
"SwingRight",
|
||||
"SwingForward",
|
||||
"SwingBackward",
|
||||
"TiltForward",
|
||||
"TiltBackward",
|
||||
"TiltLeft",
|
||||
"TiltRight",
|
||||
"TiltModifier"
|
||||
"WiimoteA", "WiimoteB", "WiimoteMinus", "WiimotePlus", "WiimoteHome", "Wiimote1", "Wiimote2",
|
||||
"WiimoteUp", "WiimoteDown", "WiimoteLeft", "WiimoteRight", "IRUp", "IRDown", "IRLeft",
|
||||
"IRRight", "IRForward", "IRBackward", "IRHide", "SwingUp", "SwingDown", "SwingLeft",
|
||||
"SwingRight", "SwingForward", "SwingBackward", "TiltForward", "TiltBackward", "TiltLeft",
|
||||
"TiltRight", "TiltModifier"
|
||||
"ShakeX",
|
||||
"ShakeY",
|
||||
"ShakeZ",
|
||||
"ShakeY", "ShakeZ",
|
||||
// Nunchuk
|
||||
"NunchukC",
|
||||
"NunchukZ",
|
||||
"NunchukUp",
|
||||
"NunchukDown",
|
||||
"NunchukLeft",
|
||||
"NunchukRight",
|
||||
"NunchukSwingUp",
|
||||
"NunchukSwingDown",
|
||||
"NunchukSwingLeft",
|
||||
"NunchukSwingRight",
|
||||
"NunchukSwingForward",
|
||||
"NunchukSwingBackward",
|
||||
"NunchukTiltForward",
|
||||
"NunchukTiltBackward",
|
||||
"NunchukTiltLeft",
|
||||
"NunchukTiltRight",
|
||||
"NunchukTiltModifier",
|
||||
"NunchukShakeX",
|
||||
"NunchukShakeY",
|
||||
"NunchukC", "NunchukZ", "NunchukUp", "NunchukDown", "NunchukLeft", "NunchukRight",
|
||||
"NunchukSwingUp", "NunchukSwingDown", "NunchukSwingLeft", "NunchukSwingRight",
|
||||
"NunchukSwingForward", "NunchukSwingBackward", "NunchukTiltForward", "NunchukTiltBackward",
|
||||
"NunchukTiltLeft", "NunchukTiltRight", "NunchukTiltModifier", "NunchukShakeX", "NunchukShakeY",
|
||||
"NunchukShakeZ",
|
||||
// Classic
|
||||
"ClassicA",
|
||||
"ClassicB",
|
||||
"ClassicX",
|
||||
"ClassicY",
|
||||
"ClassicMinus",
|
||||
"ClassicPlus",
|
||||
"ClassicHome",
|
||||
"ClassicZL",
|
||||
"ClassicZR",
|
||||
"ClassicUp",
|
||||
"ClassicDown",
|
||||
"ClassicLeft",
|
||||
"ClassicRight",
|
||||
"ClassicLeftStickUp",
|
||||
"ClassicLeftStickDown",
|
||||
"ClassicLeftStickLeft",
|
||||
"ClassicLeftStickRight",
|
||||
"ClassicRightStickUp",
|
||||
"ClassicRightStickDown",
|
||||
"ClassicRightStickLeft",
|
||||
"ClassicRightStickRight",
|
||||
"ClassicTriggerL",
|
||||
"ClassicTriggerR",
|
||||
"ClassicA", "ClassicB", "ClassicX", "ClassicY", "ClassicMinus", "ClassicPlus", "ClassicHome",
|
||||
"ClassicZL", "ClassicZR", "ClassicUp", "ClassicDown", "ClassicLeft", "ClassicRight",
|
||||
"ClassicLeftStickUp", "ClassicLeftStickDown", "ClassicLeftStickLeft", "ClassicLeftStickRight",
|
||||
"ClassicRightStickUp", "ClassicRightStickDown", "ClassicRightStickLeft",
|
||||
"ClassicRightStickRight", "ClassicTriggerL", "ClassicTriggerR",
|
||||
// Guitar
|
||||
"GuitarMinus",
|
||||
"GuitarPlus",
|
||||
"GuitarGreen",
|
||||
"GuitarRed",
|
||||
"GuitarYellow",
|
||||
"GuitarBue",
|
||||
"GuitarOrange",
|
||||
"GuitarStrumUp",
|
||||
"GuitarStrumDown",
|
||||
"GuitarUp",
|
||||
"GuitarDown",
|
||||
"GuitarLeft",
|
||||
"GuitarRight",
|
||||
"GuitarWhammy",
|
||||
"GuitarMinus", "GuitarPlus", "GuitarGreen", "GuitarRed", "GuitarYellow", "GuitarBue",
|
||||
"GuitarOrange", "GuitarStrumUp", "GuitarStrumDown", "GuitarUp", "GuitarDown", "GuitarLeft",
|
||||
"GuitarRight", "GuitarWhammy",
|
||||
// Drums
|
||||
"DrumsMinus",
|
||||
"DrumsPlus",
|
||||
"DrumsRed",
|
||||
"DrumsYellow",
|
||||
"DrumsBlue",
|
||||
"DrumsGreen",
|
||||
"DrumsOrange",
|
||||
"DrumsBass",
|
||||
"DrumsUp",
|
||||
"DrumsDown",
|
||||
"DrumsLeft",
|
||||
"DrumsRight",
|
||||
"DrumsMinus", "DrumsPlus", "DrumsRed", "DrumsYellow", "DrumsBlue", "DrumsGreen", "DrumsOrange",
|
||||
"DrumsBass", "DrumsUp", "DrumsDown", "DrumsLeft", "DrumsRight",
|
||||
// Turntable
|
||||
"TurntableGreenLeft",
|
||||
"TurntableRedLeft",
|
||||
"TurntableBlueLeft",
|
||||
"TurntableGreenRight",
|
||||
"TurntableRedRight",
|
||||
"TurntableBlueRight",
|
||||
"TurntableMinus",
|
||||
"TurntablePlus",
|
||||
"TurntableHome",
|
||||
"TurntableEuphoria",
|
||||
"TurntableLeftTLeft",
|
||||
"TurntableLeftTRight",
|
||||
"TurntableRightTLeft",
|
||||
"TurntableRightTRight",
|
||||
"TurntableUp",
|
||||
"TurntableDown",
|
||||
"TurntableLeft",
|
||||
"TurntableRight",
|
||||
"TurntableEffDial",
|
||||
"TurntableCrossLeft",
|
||||
"TurntableCrossRight",
|
||||
"TurntableGreenLeft", "TurntableRedLeft", "TurntableBlueLeft", "TurntableGreenRight",
|
||||
"TurntableRedRight", "TurntableBlueRight", "TurntableMinus", "TurntablePlus", "TurntableHome",
|
||||
"TurntableEuphoria", "TurntableLeftTLeft", "TurntableLeftTRight", "TurntableRightTLeft",
|
||||
"TurntableRightTRight", "TurntableUp", "TurntableDown", "TurntableLeft", "TurntableRight",
|
||||
"TurntableEffDial", "TurntableCrossLeft", "TurntableCrossRight",
|
||||
};
|
||||
std::vector<ButtonType> configTypes = {
|
||||
// GC
|
||||
BUTTON_A,
|
||||
BUTTON_B,
|
||||
BUTTON_START,
|
||||
BUTTON_X,
|
||||
BUTTON_Y,
|
||||
BUTTON_Z,
|
||||
BUTTON_UP,
|
||||
BUTTON_DOWN,
|
||||
BUTTON_LEFT,
|
||||
BUTTON_RIGHT,
|
||||
STICK_MAIN_UP,
|
||||
STICK_MAIN_DOWN,
|
||||
STICK_MAIN_LEFT,
|
||||
STICK_MAIN_RIGHT,
|
||||
STICK_C_UP,
|
||||
STICK_C_DOWN,
|
||||
STICK_C_LEFT,
|
||||
STICK_C_RIGHT,
|
||||
TRIGGER_L,
|
||||
TRIGGER_R,
|
||||
BUTTON_A, BUTTON_B, BUTTON_START, BUTTON_X, BUTTON_Y, BUTTON_Z, BUTTON_UP, BUTTON_DOWN,
|
||||
BUTTON_LEFT, BUTTON_RIGHT, STICK_MAIN_UP, STICK_MAIN_DOWN, STICK_MAIN_LEFT, STICK_MAIN_RIGHT,
|
||||
STICK_C_UP, STICK_C_DOWN, STICK_C_LEFT, STICK_C_RIGHT, TRIGGER_L, TRIGGER_R,
|
||||
// Wiimote
|
||||
WIIMOTE_BUTTON_A,
|
||||
WIIMOTE_BUTTON_B,
|
||||
WIIMOTE_BUTTON_MINUS,
|
||||
WIIMOTE_BUTTON_PLUS,
|
||||
WIIMOTE_BUTTON_HOME,
|
||||
WIIMOTE_BUTTON_1,
|
||||
WIIMOTE_BUTTON_2,
|
||||
WIIMOTE_UP,
|
||||
WIIMOTE_DOWN,
|
||||
WIIMOTE_LEFT,
|
||||
WIIMOTE_RIGHT,
|
||||
WIIMOTE_IR_UP,
|
||||
WIIMOTE_IR_DOWN,
|
||||
WIIMOTE_IR_LEFT,
|
||||
WIIMOTE_IR_RIGHT,
|
||||
WIIMOTE_IR_FORWARD,
|
||||
WIIMOTE_IR_BACKWARD,
|
||||
WIIMOTE_IR_HIDE,
|
||||
WIIMOTE_SWING_UP,
|
||||
WIIMOTE_SWING_DOWN,
|
||||
WIIMOTE_SWING_LEFT,
|
||||
WIIMOTE_SWING_RIGHT,
|
||||
WIIMOTE_SWING_FORWARD,
|
||||
WIIMOTE_SWING_BACKWARD,
|
||||
WIIMOTE_TILT_FORWARD,
|
||||
WIIMOTE_TILT_BACKWARD,
|
||||
WIIMOTE_TILT_LEFT,
|
||||
WIIMOTE_TILT_RIGHT,
|
||||
WIIMOTE_TILT_MODIFIER,
|
||||
WIIMOTE_SHAKE_X,
|
||||
WIIMOTE_SHAKE_Y,
|
||||
WIIMOTE_SHAKE_Z,
|
||||
WIIMOTE_BUTTON_A, WIIMOTE_BUTTON_B, WIIMOTE_BUTTON_MINUS, WIIMOTE_BUTTON_PLUS,
|
||||
WIIMOTE_BUTTON_HOME, WIIMOTE_BUTTON_1, WIIMOTE_BUTTON_2, WIIMOTE_UP, WIIMOTE_DOWN, WIIMOTE_LEFT,
|
||||
WIIMOTE_RIGHT, WIIMOTE_IR_UP, WIIMOTE_IR_DOWN, WIIMOTE_IR_LEFT, WIIMOTE_IR_RIGHT,
|
||||
WIIMOTE_IR_FORWARD, WIIMOTE_IR_BACKWARD, WIIMOTE_IR_HIDE, WIIMOTE_SWING_UP, WIIMOTE_SWING_DOWN,
|
||||
WIIMOTE_SWING_LEFT, WIIMOTE_SWING_RIGHT, WIIMOTE_SWING_FORWARD, WIIMOTE_SWING_BACKWARD,
|
||||
WIIMOTE_TILT_FORWARD, WIIMOTE_TILT_BACKWARD, WIIMOTE_TILT_LEFT, WIIMOTE_TILT_RIGHT,
|
||||
WIIMOTE_TILT_MODIFIER, WIIMOTE_SHAKE_X, WIIMOTE_SHAKE_Y, WIIMOTE_SHAKE_Z,
|
||||
// Nunchuk
|
||||
NUNCHUK_BUTTON_C,
|
||||
NUNCHUK_BUTTON_Z,
|
||||
NUNCHUK_STICK_UP,
|
||||
NUNCHUK_STICK_DOWN,
|
||||
NUNCHUK_STICK_LEFT,
|
||||
NUNCHUK_STICK_RIGHT,
|
||||
NUNCHUK_SWING_UP,
|
||||
NUNCHUK_SWING_DOWN,
|
||||
NUNCHUK_SWING_LEFT,
|
||||
NUNCHUK_SWING_RIGHT,
|
||||
NUNCHUK_SWING_FORWARD,
|
||||
NUNCHUK_SWING_BACKWARD,
|
||||
NUNCHUK_TILT_FORWARD,
|
||||
NUNCHUK_TILT_BACKWARD,
|
||||
NUNCHUK_TILT_LEFT,
|
||||
NUNCHUK_TILT_RIGHT,
|
||||
NUNCHUK_TILT_MODIFIER,
|
||||
NUNCHUK_SHAKE_X,
|
||||
NUNCHUK_SHAKE_Y,
|
||||
NUNCHUK_SHAKE_Z,
|
||||
NUNCHUK_BUTTON_C, NUNCHUK_BUTTON_Z, NUNCHUK_STICK_UP, NUNCHUK_STICK_DOWN, NUNCHUK_STICK_LEFT,
|
||||
NUNCHUK_STICK_RIGHT, NUNCHUK_SWING_UP, NUNCHUK_SWING_DOWN, NUNCHUK_SWING_LEFT,
|
||||
NUNCHUK_SWING_RIGHT, NUNCHUK_SWING_FORWARD, NUNCHUK_SWING_BACKWARD, NUNCHUK_TILT_FORWARD,
|
||||
NUNCHUK_TILT_BACKWARD, NUNCHUK_TILT_LEFT, NUNCHUK_TILT_RIGHT, NUNCHUK_TILT_MODIFIER,
|
||||
NUNCHUK_SHAKE_X, NUNCHUK_SHAKE_Y, NUNCHUK_SHAKE_Z,
|
||||
// Classic
|
||||
CLASSIC_BUTTON_A,
|
||||
CLASSIC_BUTTON_B,
|
||||
CLASSIC_BUTTON_X,
|
||||
CLASSIC_BUTTON_Y,
|
||||
CLASSIC_BUTTON_MINUS,
|
||||
CLASSIC_BUTTON_PLUS,
|
||||
CLASSIC_BUTTON_HOME,
|
||||
CLASSIC_BUTTON_ZL,
|
||||
CLASSIC_BUTTON_ZR,
|
||||
CLASSIC_DPAD_UP,
|
||||
CLASSIC_DPAD_DOWN,
|
||||
CLASSIC_DPAD_LEFT,
|
||||
CLASSIC_DPAD_RIGHT,
|
||||
CLASSIC_STICK_LEFT_UP,
|
||||
CLASSIC_STICK_LEFT_DOWN,
|
||||
CLASSIC_STICK_LEFT_LEFT,
|
||||
CLASSIC_STICK_LEFT_RIGHT,
|
||||
CLASSIC_STICK_RIGHT_UP,
|
||||
CLASSIC_STICK_RIGHT_DOWN,
|
||||
CLASSIC_STICK_RIGHT_LEFT,
|
||||
CLASSIC_STICK_RIGHT_RIGHT,
|
||||
CLASSIC_TRIGGER_L,
|
||||
CLASSIC_TRIGGER_R,
|
||||
CLASSIC_BUTTON_A, CLASSIC_BUTTON_B, CLASSIC_BUTTON_X, CLASSIC_BUTTON_Y, CLASSIC_BUTTON_MINUS,
|
||||
CLASSIC_BUTTON_PLUS, CLASSIC_BUTTON_HOME, CLASSIC_BUTTON_ZL, CLASSIC_BUTTON_ZR, CLASSIC_DPAD_UP,
|
||||
CLASSIC_DPAD_DOWN, CLASSIC_DPAD_LEFT, CLASSIC_DPAD_RIGHT, CLASSIC_STICK_LEFT_UP,
|
||||
CLASSIC_STICK_LEFT_DOWN, CLASSIC_STICK_LEFT_LEFT, CLASSIC_STICK_LEFT_RIGHT,
|
||||
CLASSIC_STICK_RIGHT_UP, CLASSIC_STICK_RIGHT_DOWN, CLASSIC_STICK_RIGHT_LEFT,
|
||||
CLASSIC_STICK_RIGHT_RIGHT, CLASSIC_TRIGGER_L, CLASSIC_TRIGGER_R,
|
||||
// Guitar
|
||||
GUITAR_BUTTON_MINUS,
|
||||
GUITAR_BUTTON_PLUS,
|
||||
GUITAR_FRET_GREEN,
|
||||
GUITAR_FRET_RED,
|
||||
GUITAR_FRET_YELLOW,
|
||||
GUITAR_FRET_BLUE,
|
||||
GUITAR_FRET_ORANGE,
|
||||
GUITAR_STRUM_UP,
|
||||
GUITAR_STRUM_DOWN,
|
||||
GUITAR_STICK_UP,
|
||||
GUITAR_STICK_DOWN,
|
||||
GUITAR_STICK_LEFT,
|
||||
GUITAR_STICK_RIGHT,
|
||||
GUITAR_WHAMMY_BAR,
|
||||
GUITAR_BUTTON_MINUS, GUITAR_BUTTON_PLUS, GUITAR_FRET_GREEN, GUITAR_FRET_RED, GUITAR_FRET_YELLOW,
|
||||
GUITAR_FRET_BLUE, GUITAR_FRET_ORANGE, GUITAR_STRUM_UP, GUITAR_STRUM_DOWN, GUITAR_STICK_UP,
|
||||
GUITAR_STICK_DOWN, GUITAR_STICK_LEFT, GUITAR_STICK_RIGHT, GUITAR_WHAMMY_BAR,
|
||||
// Drums
|
||||
DRUMS_BUTTON_MINUS,
|
||||
DRUMS_BUTTON_PLUS,
|
||||
DRUMS_PAD_RED,
|
||||
DRUMS_PAD_YELLOW,
|
||||
DRUMS_PAD_BLUE,
|
||||
DRUMS_PAD_GREEN,
|
||||
DRUMS_PAD_ORANGE,
|
||||
DRUMS_PAD_BASS,
|
||||
DRUMS_STICK_UP,
|
||||
DRUMS_STICK_DOWN,
|
||||
DRUMS_STICK_LEFT,
|
||||
DRUMS_STICK_RIGHT,
|
||||
DRUMS_BUTTON_MINUS, DRUMS_BUTTON_PLUS, DRUMS_PAD_RED, DRUMS_PAD_YELLOW, DRUMS_PAD_BLUE,
|
||||
DRUMS_PAD_GREEN, DRUMS_PAD_ORANGE, DRUMS_PAD_BASS, DRUMS_STICK_UP, DRUMS_STICK_DOWN,
|
||||
DRUMS_STICK_LEFT, DRUMS_STICK_RIGHT,
|
||||
// Turntable
|
||||
TURNTABLE_BUTTON_GREEN_LEFT,
|
||||
TURNTABLE_BUTTON_RED_LEFT,
|
||||
TURNTABLE_BUTTON_BLUE_LEFT,
|
||||
TURNTABLE_BUTTON_GREEN_RIGHT,
|
||||
TURNTABLE_BUTTON_RED_RIGHT,
|
||||
TURNTABLE_BUTTON_BLUE_RIGHT,
|
||||
TURNTABLE_BUTTON_MINUS,
|
||||
TURNTABLE_BUTTON_PLUS,
|
||||
TURNTABLE_BUTTON_HOME,
|
||||
TURNTABLE_BUTTON_EUPHORIA,
|
||||
TURNTABLE_TABLE_LEFT_LEFT,
|
||||
TURNTABLE_TABLE_LEFT_RIGHT,
|
||||
TURNTABLE_TABLE_RIGHT_LEFT,
|
||||
TURNTABLE_TABLE_RIGHT_RIGHT,
|
||||
TURNTABLE_STICK_UP,
|
||||
TURNTABLE_STICK_DOWN,
|
||||
TURNTABLE_STICK_LEFT,
|
||||
TURNTABLE_STICK_RIGHT,
|
||||
TURNTABLE_EFFECT_DIAL,
|
||||
TURNTABLE_CROSSFADE_LEFT,
|
||||
TURNTABLE_BUTTON_GREEN_LEFT, TURNTABLE_BUTTON_RED_LEFT, TURNTABLE_BUTTON_BLUE_LEFT,
|
||||
TURNTABLE_BUTTON_GREEN_RIGHT, TURNTABLE_BUTTON_RED_RIGHT, TURNTABLE_BUTTON_BLUE_RIGHT,
|
||||
TURNTABLE_BUTTON_MINUS, TURNTABLE_BUTTON_PLUS, TURNTABLE_BUTTON_HOME, TURNTABLE_BUTTON_EUPHORIA,
|
||||
TURNTABLE_TABLE_LEFT_LEFT, TURNTABLE_TABLE_LEFT_RIGHT, TURNTABLE_TABLE_RIGHT_LEFT,
|
||||
TURNTABLE_TABLE_RIGHT_RIGHT, TURNTABLE_STICK_UP, TURNTABLE_STICK_DOWN, TURNTABLE_STICK_LEFT,
|
||||
TURNTABLE_STICK_RIGHT, TURNTABLE_EFFECT_DIAL, TURNTABLE_CROSSFADE_LEFT,
|
||||
TURNTABLE_CROSSFADE_RIGHT,
|
||||
};
|
||||
|
||||
|
@ -359,9 +139,12 @@ namespace ButtonManager
|
|||
// Wiimote
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_A, BIND_BUTTON, WIIMOTE_BUTTON_A, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_B, BIND_BUTTON, WIIMOTE_BUTTON_B, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_MINUS, BIND_BUTTON, WIIMOTE_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_PLUS, BIND_BUTTON, WIIMOTE_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_HOME, BIND_BUTTON, WIIMOTE_BUTTON_HOME, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_BUTTON_MINUS, BIND_BUTTON, WIIMOTE_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_BUTTON_PLUS, BIND_BUTTON, WIIMOTE_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_BUTTON_HOME, BIND_BUTTON, WIIMOTE_BUTTON_HOME, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_1, BIND_BUTTON, WIIMOTE_BUTTON_1, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_BUTTON_2, BIND_BUTTON, WIIMOTE_BUTTON_2, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_UP, BIND_BUTTON, WIIMOTE_UP, 1.0f));
|
||||
|
@ -369,7 +152,8 @@ namespace ButtonManager
|
|||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_LEFT, BIND_BUTTON, WIIMOTE_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_RIGHT, BIND_BUTTON, WIIMOTE_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_IR_HIDE, BIND_BUTTON, WIIMOTE_IR_HIDE, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_TILT_MODIFIER, BIND_BUTTON, WIIMOTE_TILT_MODIFIER, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_TILT_MODIFIER, BIND_BUTTON, WIIMOTE_TILT_MODIFIER, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SHAKE_X, BIND_BUTTON, WIIMOTE_SHAKE_X, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SHAKE_Y, BIND_BUTTON, WIIMOTE_SHAKE_Y, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SHAKE_Z, BIND_BUTTON, WIIMOTE_SHAKE_Z, 1.0f));
|
||||
|
@ -379,22 +163,29 @@ namespace ButtonManager
|
|||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_IR_LEFT, BIND_AXIS, WIIMOTE_IR_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_IR_RIGHT, BIND_AXIS, WIIMOTE_IR_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_IR_FORWARD, BIND_AXIS, WIIMOTE_IR_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_IR_BACKWARD, BIND_AXIS, WIIMOTE_IR_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_IR_BACKWARD, BIND_AXIS, WIIMOTE_IR_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SWING_UP, BIND_AXIS, WIIMOTE_SWING_UP, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SWING_DOWN, BIND_AXIS, WIIMOTE_SWING_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SWING_LEFT, BIND_AXIS, WIIMOTE_SWING_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SWING_RIGHT, BIND_AXIS, WIIMOTE_SWING_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SWING_FORWARD, BIND_AXIS, WIIMOTE_SWING_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_SWING_BACKWARD, BIND_AXIS, WIIMOTE_SWING_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_TILT_FORWARD, BIND_AXIS, WIIMOTE_TILT_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_TILT_BACKWARD, BIND_AXIS, WIIMOTE_TILT_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_SWING_RIGHT, BIND_AXIS, WIIMOTE_SWING_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_SWING_FORWARD, BIND_AXIS, WIIMOTE_SWING_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_SWING_BACKWARD, BIND_AXIS, WIIMOTE_SWING_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_TILT_FORWARD, BIND_AXIS, WIIMOTE_TILT_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, WIIMOTE_TILT_BACKWARD, BIND_AXIS, WIIMOTE_TILT_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_TILT_LEFT, BIND_AXIS, WIIMOTE_TILT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, WIIMOTE_TILT_RIGHT, BIND_AXIS, WIIMOTE_TILT_RIGHT, 1.0f));
|
||||
|
||||
// Wii: Nunchuk
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_BUTTON_C, BIND_BUTTON, NUNCHUK_BUTTON_C, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_BUTTON_Z, BIND_BUTTON, NUNCHUK_BUTTON_Z, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_TILT_MODIFIER, BIND_BUTTON, NUNCHUK_TILT_MODIFIER, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_TILT_MODIFIER, BIND_BUTTON, NUNCHUK_TILT_MODIFIER, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SHAKE_X, BIND_BUTTON, NUNCHUK_SHAKE_X, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SHAKE_Y, BIND_BUTTON, NUNCHUK_SHAKE_Y, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SHAKE_Z, BIND_BUTTON, NUNCHUK_SHAKE_Z, 1.0f));
|
||||
|
@ -402,52 +193,74 @@ namespace ButtonManager
|
|||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SWING_UP, BIND_AXIS, NUNCHUK_SWING_UP, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SWING_DOWN, BIND_AXIS, NUNCHUK_SWING_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SWING_LEFT, BIND_AXIS, NUNCHUK_SWING_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SWING_RIGHT, BIND_AXIS, NUNCHUK_SWING_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SWING_FORWARD, BIND_AXIS, NUNCHUK_SWING_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_SWING_BACKWARD, BIND_BUTTON, NUNCHUK_SWING_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_TILT_FORWARD, BIND_AXIS, NUNCHUK_TILT_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_TILT_BACKWARD, BIND_AXIS, NUNCHUK_TILT_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_SWING_RIGHT, BIND_AXIS, NUNCHUK_SWING_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_SWING_FORWARD, BIND_AXIS, NUNCHUK_SWING_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_SWING_BACKWARD, BIND_BUTTON, NUNCHUK_SWING_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_TILT_FORWARD, BIND_AXIS, NUNCHUK_TILT_FORWARD, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_TILT_BACKWARD, BIND_AXIS, NUNCHUK_TILT_BACKWARD, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_TILT_LEFT, BIND_AXIS, NUNCHUK_TILT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_TILT_RIGHT, BIND_AXIS, NUNCHUK_TILT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_STICK_UP, BIND_AXIS, NUNCHUK_STICK_UP, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_STICK_DOWN, BIND_AXIS, NUNCHUK_STICK_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_STICK_LEFT, BIND_AXIS, NUNCHUK_STICK_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, NUNCHUK_STICK_RIGHT, BIND_AXIS, NUNCHUK_STICK_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, NUNCHUK_STICK_RIGHT, BIND_AXIS, NUNCHUK_STICK_RIGHT, 1.0f));
|
||||
|
||||
// Wii: Classic
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_A, BIND_BUTTON, CLASSIC_BUTTON_A, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_B, BIND_BUTTON, CLASSIC_BUTTON_B, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_X, BIND_BUTTON, CLASSIC_BUTTON_X, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_Y, BIND_BUTTON, CLASSIC_BUTTON_Y, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_MINUS, BIND_BUTTON, CLASSIC_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_PLUS, BIND_BUTTON, CLASSIC_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_HOME, BIND_BUTTON, CLASSIC_BUTTON_HOME, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_BUTTON_MINUS, BIND_BUTTON, CLASSIC_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_BUTTON_PLUS, BIND_BUTTON, CLASSIC_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_BUTTON_HOME, BIND_BUTTON, CLASSIC_BUTTON_HOME, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_ZL, BIND_BUTTON, CLASSIC_BUTTON_ZL, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_BUTTON_ZR, BIND_BUTTON, CLASSIC_BUTTON_ZR, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_DPAD_UP, BIND_BUTTON, CLASSIC_DPAD_UP, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_DPAD_DOWN, BIND_BUTTON, CLASSIC_DPAD_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_DPAD_LEFT, BIND_BUTTON, CLASSIC_DPAD_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_DPAD_RIGHT, BIND_BUTTON, CLASSIC_DPAD_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_DPAD_RIGHT, BIND_BUTTON, CLASSIC_DPAD_RIGHT, 1.0f));
|
||||
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_LEFT_UP, BIND_AXIS, CLASSIC_STICK_LEFT_UP, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_LEFT_DOWN, BIND_AXIS, CLASSIC_STICK_LEFT_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_LEFT_LEFT, BIND_AXIS, CLASSIC_STICK_LEFT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_LEFT_RIGHT, BIND_AXIS, CLASSIC_STICK_LEFT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_RIGHT_UP, BIND_AXIS, CLASSIC_STICK_RIGHT_UP, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_RIGHT_DOWN, BIND_AXIS, CLASSIC_STICK_RIGHT_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_RIGHT_LEFT, BIND_AXIS, CLASSIC_STICK_RIGHT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_STICK_RIGHT_RIGHT, BIND_AXIS, CLASSIC_STICK_RIGHT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_LEFT_UP, BIND_AXIS, CLASSIC_STICK_LEFT_UP, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_LEFT_DOWN, BIND_AXIS, CLASSIC_STICK_LEFT_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_LEFT_LEFT, BIND_AXIS, CLASSIC_STICK_LEFT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_LEFT_RIGHT, BIND_AXIS, CLASSIC_STICK_LEFT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_RIGHT_UP, BIND_AXIS, CLASSIC_STICK_RIGHT_UP, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_RIGHT_DOWN, BIND_AXIS, CLASSIC_STICK_RIGHT_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_RIGHT_LEFT, BIND_AXIS, CLASSIC_STICK_RIGHT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, CLASSIC_STICK_RIGHT_RIGHT, BIND_AXIS, CLASSIC_STICK_RIGHT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_TRIGGER_L, BIND_AXIS, CLASSIC_TRIGGER_L, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, CLASSIC_TRIGGER_R, BIND_AXIS, CLASSIC_TRIGGER_R, 1.0f));
|
||||
|
||||
// Wii: Guitar
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_BUTTON_MINUS, BIND_BUTTON, GUITAR_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_BUTTON_PLUS, BIND_BUTTON, GUITAR_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, GUITAR_BUTTON_MINUS, BIND_BUTTON, GUITAR_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, GUITAR_BUTTON_PLUS, BIND_BUTTON, GUITAR_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_FRET_GREEN, BIND_BUTTON, GUITAR_FRET_GREEN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_FRET_RED, BIND_BUTTON, GUITAR_FRET_RED, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_FRET_YELLOW, BIND_BUTTON, GUITAR_FRET_YELLOW, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, GUITAR_FRET_YELLOW, BIND_BUTTON, GUITAR_FRET_YELLOW, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_FRET_BLUE, BIND_BUTTON, GUITAR_FRET_BLUE, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_FRET_ORANGE, BIND_BUTTON, GUITAR_FRET_ORANGE, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, GUITAR_FRET_ORANGE, BIND_BUTTON, GUITAR_FRET_ORANGE, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_STRUM_UP, BIND_BUTTON, GUITAR_STRUM_UP, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, GUITAR_STRUM_DOWN, BIND_BUTTON, GUITAR_STRUM_DOWN, 1.0f));
|
||||
|
||||
|
@ -458,7 +271,8 @@ namespace ButtonManager
|
|||
AddBind(touchScreenKey, new sBind(a, GUITAR_WHAMMY_BAR, BIND_AXIS, GUITAR_WHAMMY_BAR, 1.0f));
|
||||
|
||||
// Wii: Drums
|
||||
AddBind(touchScreenKey, new sBind(a, DRUMS_BUTTON_MINUS, BIND_BUTTON, DRUMS_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, DRUMS_BUTTON_MINUS, BIND_BUTTON, DRUMS_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, DRUMS_BUTTON_PLUS, BIND_BUTTON, DRUMS_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, DRUMS_PAD_RED, BIND_BUTTON, DRUMS_PAD_RED, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, DRUMS_PAD_YELLOW, BIND_BUTTON, DRUMS_PAD_YELLOW, 1.0f));
|
||||
|
@ -473,28 +287,48 @@ namespace ButtonManager
|
|||
AddBind(touchScreenKey, new sBind(a, DRUMS_STICK_RIGHT, BIND_AXIS, DRUMS_STICK_RIGHT, 1.0f));
|
||||
|
||||
// Wii: Turntable
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_GREEN_LEFT, BIND_BUTTON, TURNTABLE_BUTTON_GREEN_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_RED_LEFT, BIND_BUTTON, TURNTABLE_BUTTON_RED_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_BLUE_LEFT, BIND_BUTTON, TURNTABLE_BUTTON_BLUE_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_GREEN_RIGHT, BIND_BUTTON, TURNTABLE_BUTTON_GREEN_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_RED_RIGHT, BIND_BUTTON, TURNTABLE_BUTTON_RED_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_BLUE_RIGHT, BIND_BUTTON, TURNTABLE_BUTTON_BLUE_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_MINUS, BIND_BUTTON, TURNTABLE_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_PLUS, BIND_BUTTON, TURNTABLE_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_HOME, BIND_BUTTON, TURNTABLE_BUTTON_HOME, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_EUPHORIA, BIND_BUTTON, TURNTABLE_BUTTON_EUPHORIA, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_GREEN_LEFT, BIND_BUTTON,
|
||||
TURNTABLE_BUTTON_GREEN_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_BUTTON_RED_LEFT, BIND_BUTTON, TURNTABLE_BUTTON_RED_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_BLUE_LEFT, BIND_BUTTON,
|
||||
TURNTABLE_BUTTON_BLUE_LEFT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_GREEN_RIGHT, BIND_BUTTON,
|
||||
TURNTABLE_BUTTON_GREEN_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_RED_RIGHT, BIND_BUTTON,
|
||||
TURNTABLE_BUTTON_RED_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_BUTTON_BLUE_RIGHT, BIND_BUTTON,
|
||||
TURNTABLE_BUTTON_BLUE_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_BUTTON_MINUS, BIND_BUTTON, TURNTABLE_BUTTON_MINUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_BUTTON_PLUS, BIND_BUTTON, TURNTABLE_BUTTON_PLUS, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_BUTTON_HOME, BIND_BUTTON, TURNTABLE_BUTTON_HOME, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_BUTTON_EUPHORIA, BIND_BUTTON, TURNTABLE_BUTTON_EUPHORIA, 1.0f));
|
||||
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_TABLE_LEFT_LEFT, BIND_AXIS, TURNTABLE_TABLE_LEFT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_TABLE_LEFT_RIGHT, BIND_AXIS, TURNTABLE_TABLE_LEFT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_TABLE_RIGHT_LEFT, BIND_AXIS, TURNTABLE_TABLE_RIGHT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_TABLE_RIGHT_RIGHT, BIND_AXIS, TURNTABLE_TABLE_RIGHT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_TABLE_LEFT_LEFT, BIND_AXIS, TURNTABLE_TABLE_LEFT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_TABLE_LEFT_RIGHT, BIND_AXIS, TURNTABLE_TABLE_LEFT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_TABLE_RIGHT_LEFT, BIND_AXIS, TURNTABLE_TABLE_RIGHT_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_TABLE_RIGHT_RIGHT, BIND_AXIS,
|
||||
TURNTABLE_TABLE_RIGHT_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_STICK_UP, BIND_AXIS, TURNTABLE_STICK_UP, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_STICK_DOWN, BIND_AXIS, TURNTABLE_STICK_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_STICK_LEFT, BIND_AXIS, TURNTABLE_STICK_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_STICK_RIGHT, BIND_AXIS, TURNTABLE_STICK_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_EFFECT_DIAL, BIND_AXIS, TURNTABLE_EFFECT_DIAL, 1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_CROSSFADE_LEFT, BIND_AXIS, TURNTABLE_CROSSFADE_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey, new sBind(a, TURNTABLE_CROSSFADE_RIGHT, BIND_AXIS, TURNTABLE_CROSSFADE_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_STICK_DOWN, BIND_AXIS, TURNTABLE_STICK_DOWN, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_STICK_LEFT, BIND_AXIS, TURNTABLE_STICK_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_STICK_RIGHT, BIND_AXIS, TURNTABLE_STICK_RIGHT, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_EFFECT_DIAL, BIND_AXIS, TURNTABLE_EFFECT_DIAL, 1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_CROSSFADE_LEFT, BIND_AXIS, TURNTABLE_CROSSFADE_LEFT, -1.0f));
|
||||
AddBind(touchScreenKey,
|
||||
new sBind(a, TURNTABLE_CROSSFADE_RIGHT, BIND_AXIS, TURNTABLE_CROSSFADE_RIGHT, 1.0f));
|
||||
}
|
||||
// Init our controller bindings
|
||||
IniFile ini;
|
||||
|
@ -527,10 +361,10 @@ namespace ButtonManager
|
|||
sscanf(value.c_str(), "Device '%127[^\']'-Button %d", dev, &bindnum);
|
||||
}
|
||||
if (hasbind)
|
||||
AddBind(std::string(dev), new sBind(padID, configTypes[a], type, bindnum, modifier == '-' ? -1.0f : 1.0f));
|
||||
AddBind(std::string(dev),
|
||||
new sBind(padID, configTypes[a], type, bindnum, modifier == '-' ? -1.0f : 1.0f));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
bool GetButtonPressed(int padID, ButtonType button)
|
||||
{
|
||||
|
|
|
@ -191,22 +191,22 @@ namespace ButtonManager
|
|||
{
|
||||
private:
|
||||
ButtonState m_state;
|
||||
|
||||
public:
|
||||
Button() : m_state(BUTTON_RELEASED) {}
|
||||
void SetState(ButtonState state) { m_state = state; }
|
||||
bool Pressed() { return m_state == BUTTON_PRESSED; }
|
||||
|
||||
~Button() {}
|
||||
};
|
||||
class Axis
|
||||
{
|
||||
private:
|
||||
float m_value;
|
||||
|
||||
public:
|
||||
Axis() : m_value(0.0f) {}
|
||||
void SetValue(float value) { m_value = value; }
|
||||
float AxisValue() { return m_value; }
|
||||
|
||||
~Axis() {}
|
||||
};
|
||||
|
||||
|
@ -219,10 +219,10 @@ namespace ButtonManager
|
|||
const float _neg;
|
||||
sBind(int padID, ButtonType buttontype, BindType bindtype, int bind, float neg)
|
||||
: _padID(padID), _buttontype(buttontype), _bindtype(bindtype), _bind(bind), _neg(neg)
|
||||
{}
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class InputDevice
|
||||
{
|
||||
private:
|
||||
|
@ -232,9 +232,9 @@ namespace ButtonManager
|
|||
|
||||
// Key is padID and ButtonType
|
||||
std::map<std::pair<int, ButtonType>, sBind*> _inputbinds;
|
||||
|
||||
public:
|
||||
InputDevice(std::string dev)
|
||||
: _dev(dev) {}
|
||||
InputDevice(std::string dev) : _dev(dev) {}
|
||||
~InputDevice()
|
||||
{
|
||||
for (const auto& bind : _inputbinds)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <android/log.h>
|
||||
#include <android/native_window_jni.h>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
@ -9,15 +12,12 @@
|
|||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <android/log.h>
|
||||
#include <android/native_window_jni.h>
|
||||
#include <EGL/egl.h>
|
||||
|
||||
#include "ButtonManager.h"
|
||||
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/GL/GLInterfaceBase.h"
|
||||
|
@ -26,12 +26,12 @@
|
|||
#include "Core/BootManager.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/State.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/HW/WiimoteReal/WiimoteReal.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
#include "Core/PowerPC/Profiler.h"
|
||||
#include "Core/State.h"
|
||||
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeCreator.h"
|
||||
|
@ -63,8 +63,12 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
|||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
void Host_NotifyMapLoaded() {}
|
||||
void Host_RefreshDSPDebuggerWindow() {}
|
||||
void Host_NotifyMapLoaded()
|
||||
{
|
||||
}
|
||||
void Host_RefreshDSPDebuggerWindow()
|
||||
{
|
||||
}
|
||||
|
||||
// The Core only supports using a single Host thread.
|
||||
// If multiple threads want to call host functions then they need to queue
|
||||
|
@ -96,15 +100,21 @@ void Host_UpdateTitle(const std::string& title)
|
|||
__android_log_write(ANDROID_LOG_INFO, DOLPHIN_TAG, title.c_str());
|
||||
}
|
||||
|
||||
void Host_UpdateDisasmDialog(){}
|
||||
void Host_UpdateDisasmDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void Host_UpdateMainFrame()
|
||||
{
|
||||
}
|
||||
|
||||
void Host_RequestRenderWindowSize(int width, int height) {}
|
||||
void Host_RequestRenderWindowSize(int width, int height)
|
||||
{
|
||||
}
|
||||
|
||||
void Host_RequestFullscreen(bool enable_fullscreen) {}
|
||||
void Host_RequestFullscreen(bool enable_fullscreen)
|
||||
{
|
||||
}
|
||||
|
||||
void Host_SetStartupDebuggingParameters()
|
||||
{
|
||||
|
@ -125,11 +135,17 @@ bool Host_RendererIsFullscreen()
|
|||
return false;
|
||||
}
|
||||
|
||||
void Host_ConnectWiimote(int wm_idx, bool connect) {}
|
||||
void Host_ConnectWiimote(int wm_idx, bool connect)
|
||||
{
|
||||
}
|
||||
|
||||
void Host_SetWiiMoteConnectionState(int _State) {}
|
||||
void Host_SetWiiMoteConnectionState(int _State)
|
||||
{
|
||||
}
|
||||
|
||||
void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {}
|
||||
void Host_ShowVideoConfig(void*, const std::string&, const std::string&)
|
||||
{
|
||||
}
|
||||
|
||||
static bool MsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*/)
|
||||
{
|
||||
|
@ -151,14 +167,18 @@ static bool MsgAlert(const char* caption, const char* text, bool yes_no, int /*S
|
|||
#define DVD_BANNER_WIDTH 96
|
||||
#define DVD_BANNER_HEIGHT 32
|
||||
|
||||
static inline u32 Average32(u32 a, u32 b) {
|
||||
static inline u32 Average32(u32 a, u32 b)
|
||||
{
|
||||
return ((a >> 1) & 0x7f7f7f7f) + ((b >> 1) & 0x7f7f7f7f);
|
||||
}
|
||||
|
||||
static inline u32 GetPixel(u32 *buffer, unsigned int x, unsigned int y) {
|
||||
static inline u32 GetPixel(u32* buffer, unsigned int x, unsigned int y)
|
||||
{
|
||||
// thanks to unsignedness, these also check for <0 automatically.
|
||||
if (x > 191) return 0;
|
||||
if (y > 63) return 0;
|
||||
if (x > 191)
|
||||
return 0;
|
||||
if (y > 63)
|
||||
return 0;
|
||||
return buffer[y * 192 + x];
|
||||
}
|
||||
|
||||
|
@ -242,11 +262,13 @@ static int GetPlatform(std::string filename)
|
|||
|
||||
static std::string GetTitle(std::string filename)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Title for file: %s", filename.c_str());
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Title for file: %s",
|
||||
filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
if (pVolume != nullptr) {
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
std::map<DiscIO::IVolume::ELanguage, std::string> titles = pVolume->GetNames(true);
|
||||
|
||||
/*
|
||||
|
@ -266,7 +288,6 @@ static std::string GetTitle(std::string filename)
|
|||
return it->second;
|
||||
//}
|
||||
|
||||
|
||||
// If English isn't available either, just pick something
|
||||
if (!titles.empty())
|
||||
return titles.cbegin()->second;
|
||||
|
@ -282,7 +303,8 @@ static std::string GetTitle(std::string filename)
|
|||
|
||||
static std::string GetDescription(std::string filename)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Description for file: %s", filename.c_str());
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Description for file: %s",
|
||||
filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
|
@ -330,7 +352,8 @@ static std::string GetGameId(std::string filename)
|
|||
|
||||
static std::string GetCompany(std::string filename)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Company for file: %s", filename.c_str());
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Company for file: %s",
|
||||
filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
if (volume == nullptr)
|
||||
|
@ -367,53 +390,98 @@ static std::string GetJString(JNIEnv *env, jstring jstr)
|
|||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Button, jint Action);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Axis, jfloat Value);
|
||||
JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBanner(JNIEnv *env, jobject obj, jstring jFile);JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetTitle(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDescription(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameId(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCountry(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCompany(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetFilesize(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(JNIEnv *env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv *env, jobject obj, jint api);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jDefault);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jValue);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetFilename(JNIEnv *env, jobject obj, jstring jFile);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv *env, jobject obj, jint slot);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv *env, jobject obj, jint slot);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFolders(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(JNIEnv *env, jobject obj, jstring jDirectory);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv *env, jobject obj, jboolean enable);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClassesAndMethods(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv* env,
|
||||
jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv* env,
|
||||
jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv* env,
|
||||
jobject obj);
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Button, jint Action);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Axis, jfloat Value);
|
||||
JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBanner(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFile);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetTitle(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDescription(
|
||||
JNIEnv* env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameId(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename);
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCountry(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCompany(
|
||||
JNIEnv* env, jobject obj, jstring jFilename);
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetFilesize(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename);
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename);
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env, jobject obj);
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv* env,
|
||||
jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv* env,
|
||||
jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv* env,
|
||||
jobject obj,
|
||||
jint api);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig(
|
||||
JNIEnv* env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jDefault);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(
|
||||
JNIEnv* env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jValue);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetFilename(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFile);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv* env,
|
||||
jobject obj,
|
||||
jint slot);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv* env,
|
||||
jobject obj,
|
||||
jint slot);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFolders(JNIEnv* env,
|
||||
jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(
|
||||
JNIEnv* env, jobject obj, jstring jDirectory);
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv* env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv* env,
|
||||
jobject obj,
|
||||
jboolean enable);
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv* env, jobject obj);
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClassesAndMethods(JNIEnv* env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv* env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChanged(JNIEnv *env, jobject obj, jobject _surf);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestroyed(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChanged(JNIEnv* env,
|
||||
jobject obj,
|
||||
jobject _surf);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestroyed(JNIEnv* env,
|
||||
jobject obj);
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SaveScreenShot("thumb");
|
||||
|
@ -421,16 +489,20 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulatio
|
|||
Core::Stop();
|
||||
updateMainFrameEvent.Set(); // Kick the waiting event
|
||||
}
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Button, jint Action)
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Button, jint Action)
|
||||
{
|
||||
return ButtonManager::GamepadEvent(GetJString(env, jDevice), Button, Action);
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Axis, jfloat Value)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Axis, jfloat Value)
|
||||
{
|
||||
ButtonManager::GamepadAxisEvent(GetJString(env, jDevice), Axis, Value);
|
||||
}
|
||||
|
||||
JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBanner(JNIEnv *env, jobject obj, jstring jFile)
|
||||
JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBanner(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFile)
|
||||
{
|
||||
std::string file = GetJString(env, jFile);
|
||||
u32 uBanner[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT];
|
||||
|
@ -443,77 +515,96 @@ JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBann
|
|||
return Banner;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetTitle(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetTitle(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
std::string name = GetTitle(filename);
|
||||
return env->NewStringUTF(name.c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDescription(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDescription(
|
||||
JNIEnv* env, jobject obj, jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
std::string description = GetDescription(filename);
|
||||
return env->NewStringUTF(description.c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameId(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameId(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
std::string id = GetGameId(filename);
|
||||
return env->NewStringUTF(id.c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCompany(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCompany(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
std::string company = GetCompany(filename);
|
||||
return env->NewStringUTF(company.c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCountry(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCountry(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
int country = GetCountry(filename);
|
||||
return country;
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetFilesize(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetFilesize(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
u64 size = GetFileSize(filename);
|
||||
return size;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(JNIEnv *env, jobject obj, jstring jFilename)
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFilename)
|
||||
{
|
||||
std::string filename = GetJString(env, jFilename);
|
||||
int platform = GetPlatform(filename);
|
||||
return platform;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
return env->NewStringUTF(scm_rev_str.c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
return cpu_info.bASIMD;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SaveScreenShot();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv *env, jobject obj, jint api)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv* env,
|
||||
jobject obj,
|
||||
jint api)
|
||||
{
|
||||
eglBindAPI(api);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jDefault)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig(
|
||||
JNIEnv* env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jDefault)
|
||||
{
|
||||
IniFile ini;
|
||||
std::string file = GetJString(env, jFile);
|
||||
|
@ -528,7 +619,8 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig
|
|||
|
||||
return env->NewStringUTF(value.c_str());
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jValue)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(
|
||||
JNIEnv* env, jobject obj, jstring jFile, jstring jSection, jstring jKey, jstring jValue)
|
||||
{
|
||||
IniFile ini;
|
||||
std::string file = GetJString(env, jFile);
|
||||
|
@ -542,29 +634,38 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(JN
|
|||
ini.Save(File::GetUserPath(D_CONFIG_IDX) + std::string(file));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetFilename(JNIEnv *env, jobject obj, jstring jFile)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetFilename(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFile)
|
||||
{
|
||||
g_filename = GetJString(env, jFile);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv *env, jobject obj, jint slot)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv* env,
|
||||
jobject obj,
|
||||
jint slot)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
State::Save(slot);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv *env, jobject obj, jint slot)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv* env,
|
||||
jobject obj,
|
||||
jint slot)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
State::Load(slot);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFolders(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFolders(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
File::CreateFullPath(File::GetUserPath(D_CONFIG_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP WII_WC24CONF_DIR DIR_SEP "mbox" DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP "shared2" DIR_SEP "succession" DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP WII_WC24CONF_DIR DIR_SEP
|
||||
"mbox" DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP "shared2" DIR_SEP
|
||||
"succession" DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP "shared2" DIR_SEP "ec" DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP WII_SYSCONF_DIR DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_CACHE_IDX));
|
||||
|
@ -580,7 +681,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFo
|
|||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + JAP_DIR DIR_SEP);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(JNIEnv *env, jobject obj, jstring jDirectory)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(
|
||||
JNIEnv* env, jobject obj, jstring jDirectory)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
std::string directory = GetJString(env, jDirectory);
|
||||
|
@ -588,12 +690,15 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirec
|
|||
UICommon::SetUserDirectory(directory);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
return env->NewStringUTF(File::GetUserPath(D_USER_IDX).c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv *env, jobject obj, jboolean enable)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv* env,
|
||||
jobject obj,
|
||||
jboolean enable)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
|
@ -602,7 +707,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling
|
|||
Core::SetState(Core::CORE_RUN);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt";
|
||||
|
@ -610,7 +716,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfile
|
|||
JitInterface::WriteProfileResults(filename);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClassesAndMethods(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClassesAndMethods(JNIEnv* env, jobject obj)
|
||||
{
|
||||
// This class reference is only valid for the lifetime of this method.
|
||||
jclass localClass = env->FindClass("org/dolphinemu/dolphinemu/NativeLibrary");
|
||||
|
@ -622,13 +729,17 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClasses
|
|||
// So we don't leak a reference to NativeLibrary.class.
|
||||
// env->DeleteGlobalRef(g_jni_class);
|
||||
|
||||
// Method signature taken from javap -s Source/Android/app/build/intermediates/classes/arm/debug/org/dolphinemu/dolphinemu/NativeLibrary.class
|
||||
g_jni_method_alert = env->GetStaticMethodID(g_jni_class, "displayAlertMsg", "(Ljava/lang/String;)V");
|
||||
// Method signature taken from javap -s
|
||||
// Source/Android/app/build/intermediates/classes/arm/debug/org/dolphinemu/dolphinemu/NativeLibrary.class
|
||||
g_jni_method_alert =
|
||||
env->GetStaticMethodID(g_jni_class, "displayAlertMsg", "(Ljava/lang/String;)V");
|
||||
g_jni_method_end = env->GetStaticMethodID(g_jni_class, "endEmulationActivity", "()V");
|
||||
}
|
||||
|
||||
// Surface Handling
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChanged(JNIEnv *env, jobject obj, jobject _surf)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChanged(JNIEnv* env,
|
||||
jobject obj,
|
||||
jobject _surf)
|
||||
{
|
||||
surf = ANativeWindow_fromSurface(env, _surf);
|
||||
if (surf == nullptr)
|
||||
|
@ -644,7 +755,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChang
|
|||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestroyed(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestroyed(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
if (surf)
|
||||
{
|
||||
|
@ -661,7 +773,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestr
|
|||
Renderer::s_ChangedSurface.Wait();
|
||||
}
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_RefreshWiimotes(JNIEnv *env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_RefreshWiimotes(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
WiimoteReal::Refresh();
|
||||
|
@ -719,7 +832,6 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *
|
|||
env->CallStaticVoidMethod(g_jni_class, g_jni_method_end);
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "AudioCommon/AOSoundStream.h"
|
||||
#include "AudioCommon/Mixer.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
#if defined(HAVE_AO) && HAVE_AO
|
||||
|
||||
|
|
|
@ -38,10 +38,6 @@ public:
|
|||
void Stop() override;
|
||||
void Update() override;
|
||||
|
||||
static bool isValid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool isValid() { return true; }
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
|
||||
#include "AudioCommon/AlsaSoundStream.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/Thread.h"
|
||||
|
||||
AlsaSound::AlsaSound()
|
||||
: m_thread_status(ALSAThreadStatus::STOPPED)
|
||||
, handle(nullptr)
|
||||
, frames_to_deliver(FRAME_COUNT_MIN)
|
||||
: m_thread_status(ALSAThreadStatus::STOPPED), handle(nullptr),
|
||||
frames_to_deliver(FRAME_COUNT_MIN)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -79,7 +78,6 @@ void AlsaSound::SoundLoop()
|
|||
m_thread_status.store(ALSAThreadStatus::STOPPED);
|
||||
}
|
||||
|
||||
|
||||
void AlsaSound::Clear(bool muted)
|
||||
{
|
||||
m_muted = muted;
|
||||
|
@ -188,7 +186,9 @@ bool AlsaSound::AlsaInit()
|
|||
// it is probably a bad idea to try to send more than one buffer of data
|
||||
if ((unsigned int)frames_to_deliver > buffer_size)
|
||||
frames_to_deliver = buffer_size;
|
||||
NOTICE_LOG(AUDIO, "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d samples per fragments.\n", buffer_size, periods, frames_to_deliver);
|
||||
NOTICE_LOG(AUDIO, "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d "
|
||||
"samples per fragments.\n",
|
||||
buffer_size, periods, frames_to_deliver);
|
||||
|
||||
snd_pcm_sw_params_alloca(&swparams);
|
||||
|
||||
|
@ -232,4 +232,3 @@ void AlsaSound::AlsaShutdown()
|
|||
handle = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,11 +28,7 @@ public:
|
|||
void Update() override;
|
||||
void Clear(bool) override;
|
||||
|
||||
static bool isValid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool isValid() { return true; }
|
||||
private:
|
||||
// maximum number of frames the buffer can hold
|
||||
static constexpr size_t BUFFER_SIZE_MAX = 8192;
|
||||
|
|
|
@ -2,22 +2,21 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
#include "AudioCommon/AlsaSoundStream.h"
|
||||
#include "AudioCommon/AOSoundStream.h"
|
||||
#include "AudioCommon/AudioCommon.h"
|
||||
#include "AudioCommon/AOSoundStream.h"
|
||||
#include "AudioCommon/AlsaSoundStream.h"
|
||||
#include "AudioCommon/CoreAudioSoundStream.h"
|
||||
#include "AudioCommon/Mixer.h"
|
||||
#include "AudioCommon/NullSoundStream.h"
|
||||
#include "AudioCommon/OpenALStream.h"
|
||||
#include "AudioCommon/OpenSLESStream.h"
|
||||
#include "AudioCommon/PulseAudioStream.h"
|
||||
#include "AudioCommon/XAudio2_7Stream.h"
|
||||
#include "AudioCommon/XAudio2Stream.h"
|
||||
#include "AudioCommon/XAudio2_7Stream.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Movie.h"
|
||||
|
||||
|
@ -58,8 +57,8 @@ namespace AudioCommon
|
|||
|
||||
if (!g_sound_stream && NullSound::isValid())
|
||||
{
|
||||
WARN_LOG(AUDIO, "Could not initialize backend %s, using %s instead.",
|
||||
backend.c_str(), BACKEND_NULLSOUND);
|
||||
WARN_LOG(AUDIO, "Could not initialize backend %s, using %s instead.", backend.c_str(),
|
||||
BACKEND_NULLSOUND);
|
||||
g_sound_stream = new NullSound();
|
||||
}
|
||||
|
||||
|
@ -68,8 +67,8 @@ namespace AudioCommon
|
|||
UpdateSoundStream();
|
||||
if (!g_sound_stream->Start())
|
||||
{
|
||||
ERROR_LOG(AUDIO, "Could not start backend %s, using %s instead",
|
||||
backend.c_str(), BACKEND_NULLSOUND);
|
||||
ERROR_LOG(AUDIO, "Could not start backend %s, using %s instead", backend.c_str(),
|
||||
BACKEND_NULLSOUND);
|
||||
delete g_sound_stream;
|
||||
g_sound_stream = new NullSound();
|
||||
g_sound_stream->Start();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "AudioCommon/SoundStream.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
|
||||
class CMixer;
|
||||
|
||||
extern SoundStream* g_sound_stream;
|
||||
|
|
|
@ -7,15 +7,13 @@
|
|||
#include "AudioCommon/CoreAudioSoundStream.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
OSStatus CoreAudioSound::callback(void *inRefCon,
|
||||
AudioUnitRenderActionFlags *ioActionFlags,
|
||||
OSStatus CoreAudioSound::callback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags,
|
||||
const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber,
|
||||
UInt32 inNumberFrames, AudioBufferList* ioData)
|
||||
{
|
||||
for (UInt32 i = 0; i < ioData->mNumberBuffers; i++)
|
||||
((CoreAudioSound *)inRefCon)->m_mixer->
|
||||
Mix((short *)ioData->mBuffers[i].mData,
|
||||
ioData->mBuffers[i].mDataByteSize / 4);
|
||||
((CoreAudioSound*)inRefCon)
|
||||
->m_mixer->Mix((short*)ioData->mBuffers[i].mData, ioData->mBuffers[i].mDataByteSize / 4);
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
@ -47,12 +45,9 @@ bool CoreAudioSound::Start()
|
|||
return false;
|
||||
}
|
||||
|
||||
FillOutASBDForLPCM(format, m_mixer->GetSampleRate(),
|
||||
2, 16, 16, false, false, false);
|
||||
err = AudioUnitSetProperty(audioUnit,
|
||||
kAudioUnitProperty_StreamFormat,
|
||||
kAudioUnitScope_Input, 0, &format,
|
||||
sizeof(AudioStreamBasicDescription));
|
||||
FillOutASBDForLPCM(format, m_mixer->GetSampleRate(), 2, 16, 16, false, false, false);
|
||||
err = AudioUnitSetProperty(audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0,
|
||||
&format, sizeof(AudioStreamBasicDescription));
|
||||
if (err != noErr)
|
||||
{
|
||||
ERROR_LOG(AUDIO, "error setting audio format");
|
||||
|
@ -61,19 +56,15 @@ bool CoreAudioSound::Start()
|
|||
|
||||
callback_struct.inputProc = callback;
|
||||
callback_struct.inputProcRefCon = this;
|
||||
err = AudioUnitSetProperty(audioUnit,
|
||||
kAudioUnitProperty_SetRenderCallback,
|
||||
kAudioUnitScope_Input, 0, &callback_struct,
|
||||
sizeof callback_struct);
|
||||
err = AudioUnitSetProperty(audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
|
||||
0, &callback_struct, sizeof callback_struct);
|
||||
if (err != noErr)
|
||||
{
|
||||
ERROR_LOG(AUDIO, "error setting audio callback");
|
||||
return false;
|
||||
}
|
||||
|
||||
err = AudioUnitSetParameter(audioUnit,
|
||||
kHALOutputParam_Volume,
|
||||
kAudioUnitScope_Output, 0,
|
||||
err = AudioUnitSetParameter(audioUnit, kHALOutputParam_Volume, kAudioUnitScope_Output, 0,
|
||||
m_volume / 100., 0);
|
||||
if (err != noErr)
|
||||
ERROR_LOG(AUDIO, "error setting volume");
|
||||
|
@ -100,9 +91,7 @@ void CoreAudioSound::SetVolume(int volume)
|
|||
OSStatus err;
|
||||
m_volume = volume;
|
||||
|
||||
err = AudioUnitSetParameter(audioUnit,
|
||||
kHALOutputParam_Volume,
|
||||
kAudioUnitScope_Output, 0,
|
||||
err = AudioUnitSetParameter(audioUnit, kHALOutputParam_Volume, kAudioUnitScope_Output, 0,
|
||||
volume / 100., 0);
|
||||
if (err != noErr)
|
||||
ERROR_LOG(AUDIO, "error setting volume");
|
||||
|
|
|
@ -20,19 +20,13 @@ public:
|
|||
void Stop() override;
|
||||
void Update() override;
|
||||
|
||||
static bool isValid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool isValid() { return true; }
|
||||
private:
|
||||
AudioUnit audioUnit;
|
||||
int m_volume;
|
||||
|
||||
static OSStatus callback(void *inRefCon,
|
||||
AudioUnitRenderActionFlags *ioActionFlags,
|
||||
const AudioTimeStamp *inTimeStamp,
|
||||
UInt32 inBusNumber, UInt32 inNumberFrames,
|
||||
AudioBufferList *ioData);
|
||||
static OSStatus callback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags,
|
||||
const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber,
|
||||
UInt32 inNumberFrames, AudioBufferList* ioData);
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -68,7 +68,8 @@ static T FIRFilter(const T *buf, int pos, int len, int count, const float *coeff
|
|||
if (pos >= count)
|
||||
{
|
||||
pos -= count;
|
||||
count1 = count; count2 = 0;
|
||||
count1 = count;
|
||||
count2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -80,7 +81,8 @@ static T FIRFilter(const T *buf, int pos, int len, int count, const float *coeff
|
|||
// high part of window
|
||||
const T* ptr = &buf[pos];
|
||||
|
||||
float r1 = DotProduct(count1, ptr, coefficients); coefficients += count1;
|
||||
float r1 = DotProduct(count1, ptr, coefficients);
|
||||
coefficients += count1;
|
||||
float r2 = DotProduct(count2, buf, coefficients);
|
||||
return T(r1 + r2);
|
||||
}
|
||||
|
@ -167,7 +169,6 @@ static float* DesignFIR(unsigned int *n, float* fc, float opt)
|
|||
g += 2 * w[end - i - 1]; // Total gain in filter
|
||||
}
|
||||
|
||||
|
||||
// Normalize gain
|
||||
g = 1 / g;
|
||||
for (u32 i = 0; i < *n; i++)
|
||||
|
@ -219,26 +220,24 @@ static float* CalculateCoefficients125HzLowpass(int rate)
|
|||
|
||||
static float PassiveLock(float x)
|
||||
{
|
||||
static const float MATAGCLOCK = 0.2f; /* AGC range (around 1) where the matrix behaves passively */
|
||||
static const float MATAGCLOCK =
|
||||
0.2f; /* AGC range (around 1) where the matrix behaves passively */
|
||||
const float x1 = x - 1;
|
||||
const float ax1s = fabs(x - 1) * (1.0f / MATAGCLOCK);
|
||||
return x1 - x1 / (1 + ax1s * ax1s) + 1;
|
||||
}
|
||||
|
||||
static void MatrixDecode(const float *in, const int k, const int il,
|
||||
const int ir, bool decode_rear,
|
||||
const int _dlbuflen,
|
||||
float _l_fwr, float _r_fwr,
|
||||
float _lpr_fwr, float _lmr_fwr,
|
||||
float *_adapt_l_gain, float *_adapt_r_gain,
|
||||
float *_adapt_lpr_gain, float *_adapt_lmr_gain,
|
||||
float *_lf, float *_rf, float *_lr,
|
||||
float *_rr, float *_cf)
|
||||
static void MatrixDecode(const float* in, const int k, const int il, const int ir, bool decode_rear,
|
||||
const int _dlbuflen, float _l_fwr, float _r_fwr, float _lpr_fwr,
|
||||
float _lmr_fwr, float* _adapt_l_gain, float* _adapt_r_gain,
|
||||
float* _adapt_lpr_gain, float* _adapt_lmr_gain, float* _lf, float* _rf,
|
||||
float* _lr, float* _rr, float* _cf)
|
||||
{
|
||||
static const float M9_03DB = 0.3535533906f;
|
||||
static const float MATAGCTRIG = 8.0f; /* (Fuzzy) AGC trigger */
|
||||
static const float MATAGCDECAY = 1.0f; /* AGC baseline decay rate (1/samp.) */
|
||||
static const float MATCOMPGAIN = 0.37f; /* Cross talk compensation gain, 0.50 - 0.55 is full cancellation. */
|
||||
static const float MATCOMPGAIN =
|
||||
0.37f; /* Cross talk compensation gain, 0.50 - 0.55 is full cancellation. */
|
||||
|
||||
const int kr = (k + olddelay) % _dlbuflen;
|
||||
float l_gain = (_l_fwr + _r_fwr) / (1 + _l_fwr + _l_fwr);
|
||||
|
@ -357,12 +356,9 @@ void DPL2Decode(float *samples, int numsamples, float *out)
|
|||
/* Matrix encoded 2 channel sources */
|
||||
fwrbuf_l[k] = in[0];
|
||||
fwrbuf_r[k] = in[1];
|
||||
MatrixDecode(in, k, 0, 1, true, dlbuflen,
|
||||
l_fwr, r_fwr,
|
||||
lpr_fwr, lmr_fwr,
|
||||
&adapt_l_gain, &adapt_r_gain,
|
||||
&adapt_lpr_gain, &adapt_lmr_gain,
|
||||
&lf[0], &rf[0], &lr[0], &rr[0], &cf[0]);
|
||||
MatrixDecode(in, k, 0, 1, true, dlbuflen, l_fwr, r_fwr, lpr_fwr, lmr_fwr, &adapt_l_gain,
|
||||
&adapt_r_gain, &adapt_lpr_gain, &adapt_lmr_gain, &lf[0], &rf[0], &lr[0], &rr[0],
|
||||
&cf[0]);
|
||||
|
||||
out[cur + 0] = lf[k];
|
||||
out[cur + 1] = rf[k];
|
||||
|
|
|
@ -8,16 +8,15 @@
|
|||
#include "AudioCommon/Mixer.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MathUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MathUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
#if _M_SSE >= 0x301 && !(defined __GNUC__ && !defined __SSSE3__)
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
|
||||
CMixer::CMixer(unsigned int BackendSampleRate)
|
||||
: m_sampleRate(BackendSampleRate)
|
||||
CMixer::CMixer(unsigned int BackendSampleRate) : m_sampleRate(BackendSampleRate)
|
||||
{
|
||||
INFO_LOG(AUDIO_INTERFACE, "Mixer is initialized");
|
||||
}
|
||||
|
@ -27,7 +26,8 @@ CMixer::~CMixer()
|
|||
}
|
||||
|
||||
// Executed from sound stream thread
|
||||
unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples, bool consider_framelimit)
|
||||
unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples,
|
||||
bool consider_framelimit)
|
||||
{
|
||||
unsigned int currentSample = 0;
|
||||
|
||||
|
@ -47,8 +47,10 @@ unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples, boo
|
|||
float numLeft = (float)(((indexW - indexR) & INDEX_MASK) / 2);
|
||||
m_numLeftI = (numLeft + m_numLeftI * (CONTROL_AVG - 1)) / CONTROL_AVG;
|
||||
float offset = (m_numLeftI - low_waterwark) * CONTROL_FACTOR;
|
||||
if (offset > MAX_FREQ_SHIFT) offset = MAX_FREQ_SHIFT;
|
||||
if (offset < -MAX_FREQ_SHIFT) offset = -MAX_FREQ_SHIFT;
|
||||
if (offset > MAX_FREQ_SHIFT)
|
||||
offset = MAX_FREQ_SHIFT;
|
||||
if (offset < -MAX_FREQ_SHIFT)
|
||||
offset = -MAX_FREQ_SHIFT;
|
||||
|
||||
// render numleft sample pairs to samples[]
|
||||
// advance indexR with sample position
|
||||
|
@ -167,7 +169,8 @@ void CMixer::PushStreamingSamples(const short *samples, unsigned int num_samples
|
|||
m_wave_writer_dtk.AddStereoSamplesBE(samples, num_samples);
|
||||
}
|
||||
|
||||
void CMixer::PushWiimoteSpeakerSamples(const short *samples, unsigned int num_samples, unsigned int sample_rate)
|
||||
void CMixer::PushWiimoteSpeakerSamples(const short* samples, unsigned int num_samples,
|
||||
unsigned int sample_rate)
|
||||
{
|
||||
short samples_stereo[MAX_SAMPLES * 2];
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ public:
|
|||
// Called from main thread
|
||||
void PushSamples(const short* samples, unsigned int num_samples);
|
||||
void PushStreamingSamples(const short* samples, unsigned int num_samples);
|
||||
void PushWiimoteSpeakerSamples(const short* samples, unsigned int num_samples, unsigned int sample_rate);
|
||||
void PushWiimoteSpeakerSamples(const short* samples, unsigned int num_samples,
|
||||
unsigned int sample_rate);
|
||||
unsigned int GetSampleRate() const { return m_sampleRate; }
|
||||
|
||||
void SetDMAInputSampleRate(unsigned int rate);
|
||||
void SetStreamInputSampleRate(unsigned int rate);
|
||||
void SetStreamingVolume(unsigned int lvolume, unsigned int rvolume);
|
||||
|
@ -38,7 +38,6 @@ public:
|
|||
|
||||
float GetCurrentSpeed() const { return m_speed.load(); }
|
||||
void UpdateSpeed(float val) { m_speed.store(val); }
|
||||
|
||||
private:
|
||||
static constexpr u32 MAX_SAMPLES = 1024 * 4; // 128 ms
|
||||
static constexpr u32 INDEX_MASK = MAX_SAMPLES * 2 - 1;
|
||||
|
@ -50,14 +49,14 @@ private:
|
|||
{
|
||||
public:
|
||||
MixerFifo(CMixer* mixer, unsigned sample_rate)
|
||||
: m_mixer(mixer)
|
||||
, m_input_sample_rate(sample_rate)
|
||||
: m_mixer(mixer), m_input_sample_rate(sample_rate)
|
||||
{
|
||||
}
|
||||
void PushSamples(const short* samples, unsigned int num_samples);
|
||||
unsigned int Mix(short* samples, unsigned int numSamples, bool consider_framelimit = true);
|
||||
void SetInputSampleRate(unsigned int rate);
|
||||
void SetVolume(unsigned int lvolume, unsigned int rvolume);
|
||||
|
||||
private:
|
||||
CMixer* m_mixer;
|
||||
unsigned m_input_sample_rate;
|
||||
|
|
|
@ -25,9 +25,12 @@ void NullSound::Update()
|
|||
// num_samples_to_render in this update - depends on SystemTimers::AUDIO_DMA_PERIOD.
|
||||
constexpr u32 stereo_16_bit_size = 4;
|
||||
constexpr u32 dma_length = 32;
|
||||
const u64 audio_dma_period = SystemTimers::GetTicksPerSecond() / (AudioInterface::GetAIDSampleRate() * stereo_16_bit_size / dma_length);
|
||||
const u64 audio_dma_period =
|
||||
SystemTimers::GetTicksPerSecond() /
|
||||
(AudioInterface::GetAIDSampleRate() * stereo_16_bit_size / dma_length);
|
||||
const u64 ais_samples_per_second = 48000 * stereo_16_bit_size;
|
||||
const u64 num_samples_to_render = (audio_dma_period * ais_samples_per_second) / SystemTimers::GetTicksPerSecond();
|
||||
const u64 num_samples_to_render =
|
||||
(audio_dma_period * ais_samples_per_second) / SystemTimers::GetTicksPerSecond();
|
||||
|
||||
m_mixer->Mix(m_realtime_buffer.data(), (unsigned int)num_samples_to_render);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ public:
|
|||
void Update() override;
|
||||
|
||||
static bool isValid() { return true; }
|
||||
|
||||
private:
|
||||
static constexpr size_t BUFFER_SIZE = 48000 * 4 / 32;
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#include <cstring>
|
||||
#include <thread>
|
||||
|
||||
#include "AudioCommon/aldlist.h"
|
||||
#include "AudioCommon/DPL2Decoder.h"
|
||||
#include "AudioCommon/OpenALStream.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "AudioCommon/aldlist.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
#if defined HAVE_OPENAL && HAVE_OPENAL
|
||||
|
@ -149,7 +149,8 @@ void OpenALStream::SoundLoop()
|
|||
memset(uiBuffers, 0, numBuffers * sizeof(ALuint));
|
||||
uiSource = 0;
|
||||
|
||||
// Checks if a X-Fi is being used. If it is, disable FLOAT32 support as this sound card has no support for it even though it reports it does.
|
||||
// Checks if a X-Fi is being used. If it is, disable FLOAT32 support as this sound card has no
|
||||
// support for it even though it reports it does.
|
||||
if (strstr(alGetString(AL_RENDERER), "X-Fi"))
|
||||
float32_capable = false;
|
||||
|
||||
|
@ -171,13 +172,16 @@ void OpenALStream::SoundLoop()
|
|||
if (surround_capable)
|
||||
{
|
||||
if (float32_capable)
|
||||
alBufferData(uiBuffers[i], AL_FORMAT_51CHN32, sampleBuffer, 4 * FRAME_SURROUND_FLOAT, ulFrequency);
|
||||
alBufferData(uiBuffers[i], AL_FORMAT_51CHN32, sampleBuffer, 4 * FRAME_SURROUND_FLOAT,
|
||||
ulFrequency);
|
||||
else
|
||||
alBufferData(uiBuffers[i], AL_FORMAT_51CHN16, sampleBuffer, 4 * FRAME_SURROUND_SHORT, ulFrequency);
|
||||
alBufferData(uiBuffers[i], AL_FORMAT_51CHN16, sampleBuffer, 4 * FRAME_SURROUND_SHORT,
|
||||
ulFrequency);
|
||||
}
|
||||
else
|
||||
{
|
||||
alBufferData(uiBuffers[i], AL_FORMAT_STEREO16, realtimeBuffer, 4 * FRAME_STEREO_SHORT, ulFrequency);
|
||||
alBufferData(uiBuffers[i], AL_FORMAT_STEREO16, realtimeBuffer, 4 * FRAME_STEREO_SHORT,
|
||||
ulFrequency);
|
||||
}
|
||||
}
|
||||
alSourceQueueBuffers(uiSource, numBuffers, uiBuffers);
|
||||
|
@ -209,11 +213,14 @@ void OpenALStream::SoundLoop()
|
|||
const u32 stereo_16_bit_size = 4;
|
||||
const u32 dma_length = 32;
|
||||
const u64 ais_samples_per_second = 48000 * stereo_16_bit_size;
|
||||
u64 audio_dma_period = SystemTimers::GetTicksPerSecond() / (AudioInterface::GetAIDSampleRate() * stereo_16_bit_size / dma_length);
|
||||
u64 num_samples_to_render = (audio_dma_period * ais_samples_per_second) / SystemTimers::GetTicksPerSecond();
|
||||
u64 audio_dma_period = SystemTimers::GetTicksPerSecond() /
|
||||
(AudioInterface::GetAIDSampleRate() * stereo_16_bit_size / dma_length);
|
||||
u64 num_samples_to_render =
|
||||
(audio_dma_period * ais_samples_per_second) / SystemTimers::GetTicksPerSecond();
|
||||
|
||||
unsigned int numSamples = (unsigned int)num_samples_to_render;
|
||||
unsigned int minSamples = surround_capable ? 240 : 0; // DPL2 accepts 240 samples minimum (FWRDURATION)
|
||||
unsigned int minSamples =
|
||||
surround_capable ? 240 : 0; // DPL2 accepts 240 samples minimum (FWRDURATION)
|
||||
|
||||
numSamples = (numSamples > OAL_MAX_SAMPLES) ? OAL_MAX_SAMPLES : numSamples;
|
||||
numSamples = m_mixer->Mix(realtimeBuffer, numSamples, false);
|
||||
|
@ -256,7 +263,8 @@ void OpenALStream::SoundLoop()
|
|||
if (nSamples <= minSamples)
|
||||
continue;
|
||||
|
||||
// Remove the Buffer from the Queue. (uiBuffer contains the Buffer ID for the unqueued Buffer)
|
||||
// Remove the Buffer from the Queue. (uiBuffer contains the Buffer ID for the unqueued
|
||||
// Buffer)
|
||||
if (iBuffersFilled == 0)
|
||||
{
|
||||
alSourceUnqueueBuffers(uiSource, iBuffersProcessed, uiBufferTemp);
|
||||
|
@ -283,7 +291,8 @@ void OpenALStream::SoundLoop()
|
|||
|
||||
if (float32_capable)
|
||||
{
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_51CHN32, dpl2, nSamples * FRAME_SURROUND_FLOAT, ulFrequency);
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_51CHN32, dpl2,
|
||||
nSamples * FRAME_SURROUND_FLOAT, ulFrequency);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -291,14 +300,16 @@ void OpenALStream::SoundLoop()
|
|||
for (u32 i = 0; i < nSamples * SURROUND_CHANNELS; ++i)
|
||||
surround_short[i] = (short)((float)dpl2[i] * (1 << 15));
|
||||
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_51CHN16, surround_short, nSamples * FRAME_SURROUND_SHORT, ulFrequency);
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_51CHN16, surround_short,
|
||||
nSamples * FRAME_SURROUND_SHORT, ulFrequency);
|
||||
}
|
||||
|
||||
ALenum err = alGetError();
|
||||
if (err == AL_INVALID_ENUM)
|
||||
{
|
||||
// 5.1 is not supported by the host, fallback to stereo
|
||||
WARN_LOG(AUDIO, "Unable to set 5.1 surround mode. Updating OpenAL Soft might fix this issue.");
|
||||
WARN_LOG(AUDIO,
|
||||
"Unable to set 5.1 surround mode. Updating OpenAL Soft might fix this issue.");
|
||||
surround_capable = false;
|
||||
}
|
||||
else if (err != 0)
|
||||
|
@ -311,7 +322,8 @@ void OpenALStream::SoundLoop()
|
|||
{
|
||||
if (float32_capable)
|
||||
{
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_STEREO_FLOAT32, sampleBuffer, nSamples * FRAME_STEREO_FLOAT, ulFrequency);
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_STEREO_FLOAT32, sampleBuffer,
|
||||
nSamples * FRAME_STEREO_FLOAT, ulFrequency);
|
||||
ALenum err = alGetError();
|
||||
if (err == AL_INVALID_ENUM)
|
||||
{
|
||||
|
@ -330,7 +342,8 @@ void OpenALStream::SoundLoop()
|
|||
for (u32 i = 0; i < nSamples * STEREO_CHANNELS; ++i)
|
||||
stereo[i] = (short)((float)sampleBuffer[i] * (1 << 15));
|
||||
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_STEREO16, stereo, nSamples * FRAME_STEREO_SHORT, ulFrequency);
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_STEREO16, stereo,
|
||||
nSamples * FRAME_STEREO_SHORT, ulFrequency);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -372,4 +385,3 @@ void OpenALStream::SoundLoop()
|
|||
}
|
||||
|
||||
#endif // HAVE_OPENAL
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#define BOOL SoundTouch_BOOL
|
||||
#endif
|
||||
|
||||
#include <soundtouch/SoundTouch.h>
|
||||
#include <soundtouch/STTypes.h>
|
||||
#include <soundtouch/SoundTouch.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#undef BOOL
|
||||
|
@ -57,10 +57,7 @@ class OpenALStream final : public SoundStream
|
|||
{
|
||||
#if defined HAVE_OPENAL && HAVE_OPENAL
|
||||
public:
|
||||
OpenALStream() : uiSource(0)
|
||||
{
|
||||
}
|
||||
|
||||
OpenALStream() : uiSource(0) {}
|
||||
bool Start() override;
|
||||
void SoundLoop() override;
|
||||
void SetVolume(int volume) override;
|
||||
|
@ -69,7 +66,6 @@ public:
|
|||
void Update() override;
|
||||
|
||||
static bool isValid() { return true; }
|
||||
|
||||
private:
|
||||
std::thread thread;
|
||||
std::atomic<bool> m_run_thread;
|
||||
|
|
|
@ -39,7 +39,8 @@ static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context)
|
|||
|
||||
// Render to the fresh buffer
|
||||
g_mixer->Mix(reinterpret_cast<short*>(buffer[curBuffer]), BUFFER_SIZE_IN_SAMPLES);
|
||||
SLresult result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, buffer[curBuffer], sizeof(buffer[0]));
|
||||
SLresult result =
|
||||
(*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, buffer[curBuffer], sizeof(buffer[0]));
|
||||
curBuffer ^= 1; // Switch buffer
|
||||
|
||||
// Comment from sample code:
|
||||
|
@ -64,15 +65,13 @@ bool OpenSLESStream::Start()
|
|||
assert(SL_RESULT_SUCCESS == result);
|
||||
|
||||
SLDataLocator_AndroidSimpleBufferQueue loc_bufq = {SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 2};
|
||||
SLDataFormat_PCM format_pcm = {
|
||||
SL_DATAFORMAT_PCM,
|
||||
SLDataFormat_PCM format_pcm = {SL_DATAFORMAT_PCM,
|
||||
2,
|
||||
m_mixer->GetSampleRate() * 1000,
|
||||
SL_PCMSAMPLEFORMAT_FIXED_16,
|
||||
SL_PCMSAMPLEFORMAT_FIXED_16,
|
||||
SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT,
|
||||
SL_BYTEORDER_LITTLEENDIAN
|
||||
};
|
||||
SL_BYTEORDER_LITTLEENDIAN};
|
||||
|
||||
SLDataSource audioSrc = {&loc_bufq, &format_pcm};
|
||||
|
||||
|
@ -83,15 +82,17 @@ bool OpenSLESStream::Start()
|
|||
// create audio player
|
||||
const SLInterfaceID ids[2] = {SL_IID_BUFFERQUEUE, SL_IID_VOLUME};
|
||||
const SLboolean req[2] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
|
||||
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &bqPlayerObject, &audioSrc, &audioSnk, 2, ids, req);
|
||||
result =
|
||||
(*engineEngine)
|
||||
->CreateAudioPlayer(engineEngine, &bqPlayerObject, &audioSrc, &audioSnk, 2, ids, req);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
|
||||
result = (*bqPlayerObject)->Realize(bqPlayerObject, SL_BOOLEAN_FALSE);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_PLAY, &bqPlayerPlay);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_BUFFERQUEUE,
|
||||
&bqPlayerBufferQueue);
|
||||
result =
|
||||
(*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_BUFFERQUEUE, &bqPlayerBufferQueue);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
result = (*bqPlayerBufferQueue)->RegisterCallback(bqPlayerBufferQueue, bqPlayerCallback, nullptr);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
|
|
|
@ -16,7 +16,6 @@ public:
|
|||
bool Start() override;
|
||||
void Stop() override;
|
||||
static bool isValid() { return true; }
|
||||
|
||||
private:
|
||||
std::thread thread;
|
||||
Common::Event soundSyncEvent;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include "AudioCommon/DPL2Decoder.h"
|
||||
#include "AudioCommon/PulseAudioStream.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
namespace
|
||||
|
@ -16,9 +16,7 @@ namespace
|
|||
const size_t BUFFER_SAMPLES = 512; // ~10 ms - needs to be at least 240 for surround
|
||||
}
|
||||
|
||||
PulseAudio::PulseAudio()
|
||||
: m_thread()
|
||||
, m_run_thread()
|
||||
PulseAudio::PulseAudio() : m_thread(), m_run_thread()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -72,7 +70,8 @@ bool PulseAudio::PulseInit()
|
|||
m_pa_connected = 0;
|
||||
|
||||
// create pulseaudio main loop and context
|
||||
// also register the async state callback which is called when the connection to the pa server has changed
|
||||
// also register the async state callback which is called when the connection to the pa server has
|
||||
// changed
|
||||
m_pa_ml = pa_mainloop_new();
|
||||
m_pa_mlapi = pa_mainloop_get_api(m_pa_ml);
|
||||
m_pa_ctx = pa_context_new(m_pa_mlapi, "dolphin-emu");
|
||||
|
@ -126,8 +125,11 @@ bool PulseAudio::PulseInit()
|
|||
m_pa_ba.maxlength = -1; // max buffer, so also max latency
|
||||
m_pa_ba.minreq = -1; // don't read every byte, try to group them _a bit_
|
||||
m_pa_ba.prebuf = -1; // start as early as possible
|
||||
m_pa_ba.tlength = BUFFER_SAMPLES * m_channels * m_bytespersample; // designed latency, only change this flag for low latency output
|
||||
pa_stream_flags flags = pa_stream_flags(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE);
|
||||
m_pa_ba.tlength =
|
||||
BUFFER_SAMPLES * m_channels *
|
||||
m_bytespersample; // designed latency, only change this flag for low latency output
|
||||
pa_stream_flags flags = pa_stream_flags(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY |
|
||||
PA_STREAM_AUTO_TIMING_UPDATE);
|
||||
m_pa_error = pa_stream_connect_playback(m_pa_s, nullptr, &m_pa_ba, flags, nullptr, nullptr);
|
||||
if (m_pa_error < 0)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,6 @@ public:
|
|||
void Update() override;
|
||||
|
||||
static bool isValid() { return true; }
|
||||
|
||||
void StateCallback(pa_context* c);
|
||||
void WriteCallback(pa_stream* s, size_t length);
|
||||
void UnderflowCallback(pa_stream* s);
|
||||
|
|
|
@ -22,7 +22,6 @@ protected:
|
|||
public:
|
||||
SoundStream() : m_mixer(new CMixer(48000)), m_logAudio(false), m_muted(false) {}
|
||||
virtual ~SoundStream() {}
|
||||
|
||||
static bool isValid() { return false; }
|
||||
CMixer* GetMixer() const { return m_mixer.get(); }
|
||||
virtual bool Start() { return false; }
|
||||
|
@ -32,7 +31,6 @@ public:
|
|||
virtual void Update() {}
|
||||
virtual void Clear(bool mute) { m_muted = mute; }
|
||||
bool IsMuted() const { return m_muted; }
|
||||
|
||||
void StartLogAudio(const std::string& filename)
|
||||
{
|
||||
if (!m_logAudio)
|
||||
|
|
|
@ -25,14 +25,17 @@ bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRa
|
|||
// Check if the file is already open
|
||||
if (file)
|
||||
{
|
||||
PanicAlertT("The file %s was already open, the file header will not be written.", filename.c_str());
|
||||
PanicAlertT("The file %s was already open, the file header will not be written.",
|
||||
filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
file.Open(filename, "wb");
|
||||
if (!file)
|
||||
{
|
||||
PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename.c_str());
|
||||
PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened "
|
||||
"by another program.",
|
||||
filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,11 +30,9 @@ public:
|
|||
void Stop();
|
||||
|
||||
void SetSkipSilence(bool skip) { skip_silence = skip; }
|
||||
|
||||
void AddStereoSamples(const short* sample_data, u32 count);
|
||||
void AddStereoSamplesBE(const short* sample_data, u32 count); // big endian
|
||||
u32 GetAudioSize() const { return audio_size; }
|
||||
|
||||
private:
|
||||
static constexpr size_t BUFFER_SIZE = 32 * 1024;
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "AudioCommon/XAudio2Stream.h"
|
||||
#include <xaudio2.h>
|
||||
#include "AudioCommon/AudioCommon.h"
|
||||
#include "AudioCommon/XAudio2Stream.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
#ifndef XAUDIO2_DLL
|
||||
#error You are building this module against the wrong version of DirectX. You probably need to remove DXSDK_DIR from your include path.
|
||||
|
@ -37,7 +37,6 @@ public:
|
|||
STDMETHOD_(void, OnBufferStart)(void*) {}
|
||||
STDMETHOD_(void, OnLoopEnd)(void*) {}
|
||||
STDMETHOD_(void, OnStreamEnd)() {}
|
||||
|
||||
STDMETHOD_(void, OnBufferEnd)(void* context);
|
||||
};
|
||||
|
||||
|
@ -58,10 +57,10 @@ void StreamingVoiceContext::SubmitBuffer(PBYTE buf_data)
|
|||
m_source_voice->SubmitSourceBuffer(&buf);
|
||||
}
|
||||
|
||||
StreamingVoiceContext::StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, Common::Event& pSyncEvent)
|
||||
: m_mixer(pMixer)
|
||||
, m_sound_sync_event(pSyncEvent)
|
||||
, xaudio_buffer(new BYTE[NUM_BUFFERS * BUFFER_SIZE_BYTES]())
|
||||
StreamingVoiceContext::StreamingVoiceContext(IXAudio2* pXAudio2, CMixer* pMixer,
|
||||
Common::Event& pSyncEvent)
|
||||
: m_mixer(pMixer), m_sound_sync_event(pSyncEvent),
|
||||
xaudio_buffer(new BYTE[NUM_BUFFERS * BUFFER_SIZE_BYTES]())
|
||||
{
|
||||
WAVEFORMATEXTENSIBLE wfx = {};
|
||||
|
||||
|
@ -78,7 +77,8 @@ StreamingVoiceContext::StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer,
|
|||
|
||||
// create source voice
|
||||
HRESULT hr;
|
||||
if (FAILED(hr = pXAudio2->CreateSourceVoice(&m_source_voice, &wfx.Format, XAUDIO2_VOICE_NOSRC, 1.0f, this)))
|
||||
if (FAILED(hr = pXAudio2->CreateSourceVoice(&m_source_voice, &wfx.Format, XAUDIO2_VOICE_NOSRC,
|
||||
1.0f, this)))
|
||||
{
|
||||
PanicAlert("XAudio2 CreateSourceVoice failed: %#X", hr);
|
||||
return;
|
||||
|
@ -158,9 +158,8 @@ bool XAudio2::InitLibrary()
|
|||
}
|
||||
|
||||
XAudio2::XAudio2()
|
||||
: m_mastering_voice(nullptr)
|
||||
, m_volume(1.0f)
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
: m_mastering_voice(nullptr), m_volume(1.0f),
|
||||
m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -197,8 +196,8 @@ bool XAudio2::Start()
|
|||
// Volume
|
||||
m_mastering_voice->SetVolume(m_volume);
|
||||
|
||||
m_voice_context = std::unique_ptr<StreamingVoiceContext>
|
||||
(new StreamingVoiceContext(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event));
|
||||
m_voice_context = std::unique_ptr<StreamingVoiceContext>(
|
||||
new StreamingVoiceContext(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "AudioCommon/AudioCommon.h"
|
||||
#include "AudioCommon/XAudio2_7Stream.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
struct StreamingVoiceContext2_7 : public IXAudio2VoiceCallback
|
||||
{
|
||||
|
@ -37,7 +37,6 @@ public:
|
|||
STDMETHOD_(void, OnBufferStart)(void*) {}
|
||||
STDMETHOD_(void, OnLoopEnd)(void*) {}
|
||||
STDMETHOD_(void, OnStreamEnd)() {}
|
||||
|
||||
STDMETHOD_(void, OnBufferEnd)(void* context);
|
||||
};
|
||||
|
||||
|
@ -58,10 +57,10 @@ void StreamingVoiceContext2_7::SubmitBuffer(PBYTE buf_data)
|
|||
m_source_voice->SubmitSourceBuffer(&buf);
|
||||
}
|
||||
|
||||
StreamingVoiceContext2_7::StreamingVoiceContext2_7(IXAudio2 *pXAudio2, CMixer *pMixer, Common::Event& pSyncEvent)
|
||||
: m_mixer(pMixer)
|
||||
, m_sound_sync_event(pSyncEvent)
|
||||
, xaudio_buffer(new BYTE[NUM_BUFFERS * BUFFER_SIZE_BYTES]())
|
||||
StreamingVoiceContext2_7::StreamingVoiceContext2_7(IXAudio2* pXAudio2, CMixer* pMixer,
|
||||
Common::Event& pSyncEvent)
|
||||
: m_mixer(pMixer), m_sound_sync_event(pSyncEvent),
|
||||
xaudio_buffer(new BYTE[NUM_BUFFERS * BUFFER_SIZE_BYTES]())
|
||||
{
|
||||
WAVEFORMATEXTENSIBLE wfx = {};
|
||||
|
||||
|
@ -78,7 +77,8 @@ StreamingVoiceContext2_7::StreamingVoiceContext2_7(IXAudio2 *pXAudio2, CMixer *p
|
|||
|
||||
// create source voice
|
||||
HRESULT hr;
|
||||
if (FAILED(hr = pXAudio2->CreateSourceVoice(&m_source_voice, &wfx.Format, XAUDIO2_VOICE_NOSRC, 1.0f, this)))
|
||||
if (FAILED(hr = pXAudio2->CreateSourceVoice(&m_source_voice, &wfx.Format, XAUDIO2_VOICE_NOSRC,
|
||||
1.0f, this)))
|
||||
{
|
||||
PanicAlert("XAudio2_7 CreateSourceVoice failed: %#X", hr);
|
||||
return;
|
||||
|
@ -146,9 +146,8 @@ bool XAudio2_7::InitLibrary()
|
|||
}
|
||||
|
||||
XAudio2_7::XAudio2_7()
|
||||
: m_mastering_voice(nullptr)
|
||||
, m_volume(1.0f)
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
: m_mastering_voice(nullptr), m_volume(1.0f),
|
||||
m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -185,8 +184,8 @@ bool XAudio2_7::Start()
|
|||
// Volume
|
||||
m_mastering_voice->SetVolume(m_volume);
|
||||
|
||||
m_voice_context = std::unique_ptr<StreamingVoiceContext2_7>
|
||||
(new StreamingVoiceContext2_7(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event));
|
||||
m_voice_context = std::unique_ptr<StreamingVoiceContext2_7>(
|
||||
new StreamingVoiceContext2_7(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -6,23 +6,35 @@
|
|||
* Copyright (c) 2006, Creative Labs Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
* provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and
|
||||
* the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Creative Labs Inc. nor the names of its contributors may be used to endorse or
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of
|
||||
* conditions
|
||||
* and the following disclaimer in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of Creative Labs Inc. nor the names of its contributors may be used to
|
||||
* endorse or
|
||||
* promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||
* IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
@ -42,7 +54,6 @@
|
|||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Init call
|
||||
*/
|
||||
|
@ -50,20 +61,24 @@ ALDeviceList::ALDeviceList()
|
|||
{
|
||||
ALDEVICEINFO ALDeviceInfo;
|
||||
|
||||
// DeviceInfo vector stores, for each enumerated device, it's device name, selection status, spec version #, and extension support
|
||||
// DeviceInfo vector stores, for each enumerated device, it's device name, selection status, spec
|
||||
// version #, and extension support
|
||||
vDeviceInfo.clear();
|
||||
vDeviceInfo.reserve(10);
|
||||
|
||||
defaultDeviceIndex = 0;
|
||||
|
||||
// grab function pointers for 1.0-API functions, and if successful proceed to enumerate all devices
|
||||
// grab function pointers for 1.0-API functions, and if successful proceed to enumerate all
|
||||
// devices
|
||||
// if (LoadOAL10Library(nullptr, &ALFunction) == TRUE) {
|
||||
if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT"))
|
||||
{
|
||||
const char* devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
|
||||
const char* defaultDeviceName = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
// go through device list (each device terminated with a single nullptr, list terminated with double nullptr)
|
||||
for (s32 index = 0; devices != nullptr && strlen(devices) > 0; index++, devices += strlen(devices) + 1)
|
||||
// go through device list (each device terminated with a single nullptr, list terminated with
|
||||
// double nullptr)
|
||||
for (s32 index = 0; devices != nullptr && strlen(devices) > 0;
|
||||
index++, devices += strlen(devices) + 1)
|
||||
{
|
||||
if (strcmp(defaultDeviceName, devices) == 0)
|
||||
{
|
||||
|
@ -176,7 +191,8 @@ char * ALDeviceList::GetDeviceName(s32 index)
|
|||
}
|
||||
|
||||
/*
|
||||
* Returns the major and minor version numbers for a device at a specified index in the complete list
|
||||
* Returns the major and minor version numbers for a device at a specified index in the complete
|
||||
* list
|
||||
*/
|
||||
void ALDeviceList::GetDeviceVersion(s32 index, s32* major, s32* minor)
|
||||
{
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <curl/curl.h>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Analytics.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -43,12 +43,10 @@ void AppendVarInt(std::string* out, u64 v)
|
|||
v >>= 7;
|
||||
current_byte |= (!!v) << 7;
|
||||
out->push_back(current_byte);
|
||||
}
|
||||
while (v);
|
||||
} while (v);
|
||||
}
|
||||
|
||||
void AppendBytes(std::string* out, const u8* bytes, u32 length,
|
||||
bool encode_length = true)
|
||||
void AppendBytes(std::string* out, const u8* bytes, u32 length, bool encode_length = true)
|
||||
{
|
||||
if (encode_length)
|
||||
{
|
||||
|
@ -75,55 +73,47 @@ AnalyticsReportBuilder::AnalyticsReportBuilder()
|
|||
m_report.push_back(WIRE_FORMAT_VERSION);
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
const std::string& v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, const std::string& v)
|
||||
{
|
||||
AppendType(report, TypeId::STRING);
|
||||
AppendBytes(report, reinterpret_cast<const u8*>(v.data()), static_cast<u32>(v.size()));
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
const char* v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, const char* v)
|
||||
{
|
||||
AppendSerializedValue(report, std::string(v));
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
bool v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, bool v)
|
||||
{
|
||||
AppendType(report, TypeId::BOOL);
|
||||
AppendBool(report, v);
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
u64 v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, u64 v)
|
||||
{
|
||||
AppendType(report, TypeId::UINT);
|
||||
AppendVarInt(report, v);
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
s64 v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, s64 v)
|
||||
{
|
||||
AppendType(report, TypeId::SINT);
|
||||
AppendBool(report, v >= 0);
|
||||
AppendVarInt(report, static_cast<u64>(std::abs(v)));
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
u32 v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, u32 v)
|
||||
{
|
||||
AppendSerializedValue(report, static_cast<u64>(v));
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
s32 v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, s32 v)
|
||||
{
|
||||
AppendSerializedValue(report, static_cast<s64>(v));
|
||||
}
|
||||
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report,
|
||||
float v)
|
||||
void AnalyticsReportBuilder::AppendSerializedValue(std::string* report, float v)
|
||||
{
|
||||
AppendType(report, TypeId::FLOAT);
|
||||
AppendBytes(report, reinterpret_cast<u8*>(&v), sizeof(v), false);
|
||||
|
@ -189,8 +179,8 @@ void AnalyticsReporter::ThreadProc()
|
|||
|
||||
void StdoutAnalyticsBackend::Send(std::string report)
|
||||
{
|
||||
printf("Analytics report sent:\n%s", HexDump(
|
||||
reinterpret_cast<const u8*>(report.data()), report.size()).c_str());
|
||||
printf("Analytics report sent:\n%s",
|
||||
HexDump(reinterpret_cast<const u8*>(report.data()), report.size()).c_str());
|
||||
}
|
||||
|
||||
HttpAnalyticsBackend::HttpAnalyticsBackend(const std::string& endpoint)
|
||||
|
|
|
@ -41,14 +41,12 @@ typedef void CURL;
|
|||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
// Generic interface for an analytics reporting backends. The main
|
||||
// implementation used in Dolphin can be found in Core/Analytics.h.
|
||||
class AnalyticsReportingBackend
|
||||
{
|
||||
public:
|
||||
virtual ~AnalyticsReportingBackend() {}
|
||||
|
||||
// Called from the AnalyticsReporter backend thread.
|
||||
virtual void Send(std::string report) = 0;
|
||||
};
|
||||
|
@ -60,11 +58,7 @@ public:
|
|||
AnalyticsReportBuilder();
|
||||
~AnalyticsReportBuilder() = default;
|
||||
|
||||
AnalyticsReportBuilder(const AnalyticsReportBuilder& other)
|
||||
{
|
||||
*this = other;
|
||||
}
|
||||
|
||||
AnalyticsReportBuilder(const AnalyticsReportBuilder& other) { *this = other; }
|
||||
AnalyticsReportBuilder(AnalyticsReportBuilder&& other)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(other.m_lock);
|
||||
|
@ -147,16 +141,13 @@ public:
|
|||
// being sent. DO NOT use this builder to send a report. Only use it to add
|
||||
// new fields that should be globally available.
|
||||
AnalyticsReportBuilder& BaseBuilder() { return m_base_builder; }
|
||||
|
||||
// Gets a cloned builder that can be used to send a report.
|
||||
AnalyticsReportBuilder Builder() const { return m_base_builder; }
|
||||
|
||||
// Enqueues a report for sending. Consumes the report builder.
|
||||
void Send(AnalyticsReportBuilder&& report);
|
||||
|
||||
// For convenience.
|
||||
void Send(AnalyticsReportBuilder& report) { Send(std::move(report)); }
|
||||
|
||||
protected:
|
||||
void ThreadProc();
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -14,7 +14,6 @@
|
|||
|
||||
namespace Arm64Gen
|
||||
{
|
||||
|
||||
// X30 serves a dual purpose as a link register
|
||||
// Encoded as <u3:type><u5:reg>
|
||||
// Types:
|
||||
|
@ -26,54 +25,200 @@ namespace Arm64Gen
|
|||
enum ARM64Reg
|
||||
{
|
||||
// 32bit registers
|
||||
W0 = 0, W1, W2, W3, W4, W5, W6,
|
||||
W7, W8, W9, W10, W11, W12, W13, W14,
|
||||
W15, W16, W17, W18, W19, W20, W21, W22,
|
||||
W23, W24, W25, W26, W27, W28, W29, W30,
|
||||
W0 = 0,
|
||||
W1,
|
||||
W2,
|
||||
W3,
|
||||
W4,
|
||||
W5,
|
||||
W6,
|
||||
W7,
|
||||
W8,
|
||||
W9,
|
||||
W10,
|
||||
W11,
|
||||
W12,
|
||||
W13,
|
||||
W14,
|
||||
W15,
|
||||
W16,
|
||||
W17,
|
||||
W18,
|
||||
W19,
|
||||
W20,
|
||||
W21,
|
||||
W22,
|
||||
W23,
|
||||
W24,
|
||||
W25,
|
||||
W26,
|
||||
W27,
|
||||
W28,
|
||||
W29,
|
||||
W30,
|
||||
|
||||
WSP, // 32bit stack pointer
|
||||
|
||||
// 64bit registers
|
||||
X0 = 0x20, X1, X2, X3, X4, X5, X6,
|
||||
X7, X8, X9, X10, X11, X12, X13, X14,
|
||||
X15, X16, X17, X18, X19, X20, X21, X22,
|
||||
X23, X24, X25, X26, X27, X28, X29, X30,
|
||||
X0 = 0x20,
|
||||
X1,
|
||||
X2,
|
||||
X3,
|
||||
X4,
|
||||
X5,
|
||||
X6,
|
||||
X7,
|
||||
X8,
|
||||
X9,
|
||||
X10,
|
||||
X11,
|
||||
X12,
|
||||
X13,
|
||||
X14,
|
||||
X15,
|
||||
X16,
|
||||
X17,
|
||||
X18,
|
||||
X19,
|
||||
X20,
|
||||
X21,
|
||||
X22,
|
||||
X23,
|
||||
X24,
|
||||
X25,
|
||||
X26,
|
||||
X27,
|
||||
X28,
|
||||
X29,
|
||||
X30,
|
||||
|
||||
SP, // 64bit stack pointer
|
||||
|
||||
// VFP single precision registers
|
||||
S0 = 0x40, S1, S2, S3, S4, S5, S6,
|
||||
S7, S8, S9, S10, S11, S12, S13,
|
||||
S14, S15, S16, S17, S18, S19, S20,
|
||||
S21, S22, S23, S24, S25, S26, S27,
|
||||
S28, S29, S30, S31,
|
||||
S0 = 0x40,
|
||||
S1,
|
||||
S2,
|
||||
S3,
|
||||
S4,
|
||||
S5,
|
||||
S6,
|
||||
S7,
|
||||
S8,
|
||||
S9,
|
||||
S10,
|
||||
S11,
|
||||
S12,
|
||||
S13,
|
||||
S14,
|
||||
S15,
|
||||
S16,
|
||||
S17,
|
||||
S18,
|
||||
S19,
|
||||
S20,
|
||||
S21,
|
||||
S22,
|
||||
S23,
|
||||
S24,
|
||||
S25,
|
||||
S26,
|
||||
S27,
|
||||
S28,
|
||||
S29,
|
||||
S30,
|
||||
S31,
|
||||
|
||||
// VFP Double Precision registers
|
||||
D0 = 0x80, D1, D2, D3, D4, D5, D6, D7,
|
||||
D8, D9, D10, D11, D12, D13, D14, D15,
|
||||
D16, D17, D18, D19, D20, D21, D22, D23,
|
||||
D24, D25, D26, D27, D28, D29, D30, D31,
|
||||
D0 = 0x80,
|
||||
D1,
|
||||
D2,
|
||||
D3,
|
||||
D4,
|
||||
D5,
|
||||
D6,
|
||||
D7,
|
||||
D8,
|
||||
D9,
|
||||
D10,
|
||||
D11,
|
||||
D12,
|
||||
D13,
|
||||
D14,
|
||||
D15,
|
||||
D16,
|
||||
D17,
|
||||
D18,
|
||||
D19,
|
||||
D20,
|
||||
D21,
|
||||
D22,
|
||||
D23,
|
||||
D24,
|
||||
D25,
|
||||
D26,
|
||||
D27,
|
||||
D28,
|
||||
D29,
|
||||
D30,
|
||||
D31,
|
||||
|
||||
// ASIMD Quad-Word registers
|
||||
Q0 = 0xC0, Q1, Q2, Q3, Q4, Q5, Q6, Q7,
|
||||
Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15,
|
||||
Q16, Q17, Q18, Q19, Q20, Q21, Q22, Q23,
|
||||
Q24, Q25, Q26, Q27, Q28, Q29, Q30, Q31,
|
||||
Q0 = 0xC0,
|
||||
Q1,
|
||||
Q2,
|
||||
Q3,
|
||||
Q4,
|
||||
Q5,
|
||||
Q6,
|
||||
Q7,
|
||||
Q8,
|
||||
Q9,
|
||||
Q10,
|
||||
Q11,
|
||||
Q12,
|
||||
Q13,
|
||||
Q14,
|
||||
Q15,
|
||||
Q16,
|
||||
Q17,
|
||||
Q18,
|
||||
Q19,
|
||||
Q20,
|
||||
Q21,
|
||||
Q22,
|
||||
Q23,
|
||||
Q24,
|
||||
Q25,
|
||||
Q26,
|
||||
Q27,
|
||||
Q28,
|
||||
Q29,
|
||||
Q30,
|
||||
Q31,
|
||||
|
||||
// For PRFM(prefetch memory) encoding
|
||||
// This is encoded in the Rt register
|
||||
// Data preload
|
||||
PLDL1KEEP = 0, PLDL1STRM,
|
||||
PLDL2KEEP, PLDL2STRM,
|
||||
PLDL3KEEP, PLDL3STRM,
|
||||
PLDL1KEEP = 0,
|
||||
PLDL1STRM,
|
||||
PLDL2KEEP,
|
||||
PLDL2STRM,
|
||||
PLDL3KEEP,
|
||||
PLDL3STRM,
|
||||
// Instruction preload
|
||||
PLIL1KEEP = 8, PLIL1STRM,
|
||||
PLIL2KEEP, PLIL2STRM,
|
||||
PLIL3KEEP, PLIL3STRM,
|
||||
PLIL1KEEP = 8,
|
||||
PLIL1STRM,
|
||||
PLIL2KEEP,
|
||||
PLIL2STRM,
|
||||
PLIL3KEEP,
|
||||
PLIL3STRM,
|
||||
// Prepare for store
|
||||
PLTL1KEEP = 16, PLTL1STRM,
|
||||
PLTL2KEEP, PLTL2STRM,
|
||||
PLTL3KEEP, PLTL3STRM,
|
||||
PLTL1KEEP = 16,
|
||||
PLTL1STRM,
|
||||
PLTL2KEEP,
|
||||
PLTL2STRM,
|
||||
PLTL3KEEP,
|
||||
PLTL3STRM,
|
||||
|
||||
WZR = WSP,
|
||||
ZR = SP,
|
||||
|
@ -81,22 +226,59 @@ enum ARM64Reg
|
|||
INVALID_REG = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
constexpr bool Is64Bit(ARM64Reg reg) { return (reg & 0x20) != 0; }
|
||||
constexpr bool IsSingle(ARM64Reg reg) { return (reg & 0xC0) == 0x40; }
|
||||
constexpr bool IsDouble(ARM64Reg reg) { return (reg & 0xC0) == 0x80; }
|
||||
constexpr bool IsScalar(ARM64Reg reg) { return IsSingle(reg) || IsDouble(reg); }
|
||||
constexpr bool IsQuad(ARM64Reg reg) { return (reg & 0xC0) == 0xC0; }
|
||||
constexpr bool IsVector(ARM64Reg reg) { return (reg & 0xC0) != 0; }
|
||||
constexpr bool IsGPR(ARM64Reg reg) { return static_cast<int>(reg) < 0x40; }
|
||||
constexpr bool Is64Bit(ARM64Reg reg)
|
||||
{
|
||||
return (reg & 0x20) != 0;
|
||||
}
|
||||
constexpr bool IsSingle(ARM64Reg reg)
|
||||
{
|
||||
return (reg & 0xC0) == 0x40;
|
||||
}
|
||||
constexpr bool IsDouble(ARM64Reg reg)
|
||||
{
|
||||
return (reg & 0xC0) == 0x80;
|
||||
}
|
||||
constexpr bool IsScalar(ARM64Reg reg)
|
||||
{
|
||||
return IsSingle(reg) || IsDouble(reg);
|
||||
}
|
||||
constexpr bool IsQuad(ARM64Reg reg)
|
||||
{
|
||||
return (reg & 0xC0) == 0xC0;
|
||||
}
|
||||
constexpr bool IsVector(ARM64Reg reg)
|
||||
{
|
||||
return (reg & 0xC0) != 0;
|
||||
}
|
||||
constexpr bool IsGPR(ARM64Reg reg)
|
||||
{
|
||||
return static_cast<int>(reg) < 0x40;
|
||||
}
|
||||
|
||||
constexpr ARM64Reg DecodeReg(ARM64Reg reg) { return static_cast<ARM64Reg>(reg & 0x1F); }
|
||||
constexpr ARM64Reg EncodeRegTo64(ARM64Reg reg) { return static_cast<ARM64Reg>(reg | 0x20); }
|
||||
constexpr ARM64Reg EncodeRegToSingle(ARM64Reg reg) { return static_cast<ARM64Reg>(DecodeReg(reg) + S0); }
|
||||
constexpr ARM64Reg EncodeRegToDouble(ARM64Reg reg) { return static_cast<ARM64Reg>((reg & ~0xC0) | 0x80); }
|
||||
constexpr ARM64Reg EncodeRegToQuad(ARM64Reg reg) { return static_cast<ARM64Reg>(reg | 0xC0); }
|
||||
constexpr ARM64Reg DecodeReg(ARM64Reg reg)
|
||||
{
|
||||
return static_cast<ARM64Reg>(reg & 0x1F);
|
||||
}
|
||||
constexpr ARM64Reg EncodeRegTo64(ARM64Reg reg)
|
||||
{
|
||||
return static_cast<ARM64Reg>(reg | 0x20);
|
||||
}
|
||||
constexpr ARM64Reg EncodeRegToSingle(ARM64Reg reg)
|
||||
{
|
||||
return static_cast<ARM64Reg>(DecodeReg(reg) + S0);
|
||||
}
|
||||
constexpr ARM64Reg EncodeRegToDouble(ARM64Reg reg)
|
||||
{
|
||||
return static_cast<ARM64Reg>((reg & ~0xC0) | 0x80);
|
||||
}
|
||||
constexpr ARM64Reg EncodeRegToQuad(ARM64Reg reg)
|
||||
{
|
||||
return static_cast<ARM64Reg>(reg | 0xC0);
|
||||
}
|
||||
|
||||
// For AND/TST/ORR/EOR etc
|
||||
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned int* imm_s, unsigned int* imm_r);
|
||||
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned int* imm_s,
|
||||
unsigned int* imm_r);
|
||||
// For ADD/SUB
|
||||
bool IsImmArithmetic(uint64_t input, u32* val, bool* shift);
|
||||
|
||||
|
@ -136,7 +318,8 @@ enum ShiftAmount
|
|||
SHIFT_48 = 3,
|
||||
};
|
||||
|
||||
enum RoundingMode {
|
||||
enum RoundingMode
|
||||
{
|
||||
ROUND_A, // round to nearest, ties to away
|
||||
ROUND_M, // round towards -inf
|
||||
ROUND_N, // round to nearest, ties to even
|
||||
|
@ -293,25 +476,17 @@ public:
|
|||
m_shift = 0;
|
||||
}
|
||||
}
|
||||
TypeSpecifier GetType() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
ARM64Reg GetReg() const
|
||||
{
|
||||
return m_destReg;
|
||||
}
|
||||
TypeSpecifier GetType() const { return m_type; }
|
||||
ARM64Reg GetReg() const { return m_destReg; }
|
||||
u32 GetData() const
|
||||
{
|
||||
switch (m_type)
|
||||
{
|
||||
case TYPE_EXTENDEDREG:
|
||||
return (m_extend << 13) |
|
||||
(m_shift << 10);
|
||||
return (m_extend << 13) | (m_shift << 10);
|
||||
break;
|
||||
case TYPE_SHIFTEDREG:
|
||||
return (m_shifttype << 22) |
|
||||
(m_shift << 10);
|
||||
return (m_shifttype << 22) | (m_shift << 10);
|
||||
break;
|
||||
default:
|
||||
_dbg_assert_msg_(DYNA_REC, false, "Invalid type in GetData");
|
||||
|
@ -335,7 +510,8 @@ private:
|
|||
void EncodeUnconditionalBranchInst(u32 opc, u32 op2, u32 op3, u32 op4, ARM64Reg Rn);
|
||||
void EncodeExceptionInst(u32 instenc, u32 imm);
|
||||
void EncodeSystemInst(u32 op0, u32 op1, u32 CRn, u32 CRm, u32 op2, ARM64Reg Rt);
|
||||
void EncodeArithmeticInst(u32 instenc, bool flags, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm, ArithOption Option);
|
||||
void EncodeArithmeticInst(u32 instenc, bool flags, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm,
|
||||
ArithOption Option);
|
||||
void EncodeArithmeticCarryInst(u32 op, bool flags, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EncodeCondCompareImmInst(u32 op, ARM64Reg Rn, u32 imm, u32 nzcv, CCFlags cond);
|
||||
void EncodeCondCompareRegInst(u32 op, ARM64Reg Rn, ARM64Reg Rm, u32 nzcv, CCFlags cond);
|
||||
|
@ -354,7 +530,8 @@ private:
|
|||
void EncodeLoadStoreRegisterOffset(u32 size, u32 opc, ARM64Reg Rt, ARM64Reg Rn, ArithOption Rm);
|
||||
void EncodeAddSubImmInst(u32 op, bool flags, u32 shift, u32 imm, ARM64Reg Rn, ARM64Reg Rd);
|
||||
void EncodeLogicalImmInst(u32 op, ARM64Reg Rd, ARM64Reg Rn, u32 immr, u32 imms, int n);
|
||||
void EncodeLoadStorePair(u32 op, u32 load, IndexType type, ARM64Reg Rt, ARM64Reg Rt2, ARM64Reg Rn, s32 imm);
|
||||
void EncodeLoadStorePair(u32 op, u32 load, IndexType type, ARM64Reg Rt, ARM64Reg Rt2, ARM64Reg Rn,
|
||||
s32 imm);
|
||||
void EncodeAddressInst(u32 op, ARM64Reg Rd, s32 imm);
|
||||
void EncodeLoadStoreUnscaled(u32 size, u32 op, ARM64Reg Rt, ARM64Reg Rn, s32 imm);
|
||||
|
||||
|
@ -362,20 +539,14 @@ protected:
|
|||
void Write32(u32 value);
|
||||
|
||||
public:
|
||||
ARM64XEmitter()
|
||||
: m_code(nullptr), m_lastCacheFlushEnd(nullptr)
|
||||
ARM64XEmitter() : m_code(nullptr), m_lastCacheFlushEnd(nullptr) {}
|
||||
ARM64XEmitter(u8* code_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
ARM64XEmitter(u8* code_ptr) {
|
||||
m_code = code_ptr;
|
||||
m_lastCacheFlushEnd = code_ptr;
|
||||
}
|
||||
|
||||
virtual ~ARM64XEmitter()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~ARM64XEmitter() {}
|
||||
void SetCodePtr(u8* ptr);
|
||||
void SetCodePtrUnsafe(u8* ptr);
|
||||
void ReserveCodeSpace(u32 bytes);
|
||||
|
@ -480,11 +651,7 @@ public:
|
|||
ARM64Reg zr = Is64Bit(Rd) ? ZR : WZR;
|
||||
CSINC(Rd, zr, zr, (CCFlags)((u32)cond ^ 1));
|
||||
}
|
||||
void NEG(ARM64Reg Rd, ARM64Reg Rs)
|
||||
{
|
||||
SUB(Rd, Is64Bit(Rd) ? ZR : WZR, Rs);
|
||||
}
|
||||
|
||||
void NEG(ARM64Reg Rd, ARM64Reg Rs) { SUB(Rd, Is64Bit(Rd) ? ZR : WZR, Rs); }
|
||||
// Data-Processing 1 source
|
||||
void RBIT(ARM64Reg Rd, ARM64Reg Rn);
|
||||
void REV16(ARM64Reg Rd, ARM64Reg Rn);
|
||||
|
@ -542,7 +709,6 @@ public:
|
|||
void EON(ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm) { EON(Rd, Rn, Rm, ArithOption(Rd, ST_LSL, 0)); }
|
||||
void ANDS(ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm) { ANDS(Rd, Rn, Rm, ArithOption(Rd, ST_LSL, 0)); }
|
||||
void BICS(ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm) { BICS(Rd, Rn, Rm, ArithOption(Rd, ST_LSL, 0)); }
|
||||
|
||||
// Convenience wrappers around ORR. These match the official convenience syntax.
|
||||
void MOV(ARM64Reg Rd, ARM64Reg Rm, ArithOption Shift);
|
||||
void MOV(ARM64Reg Rd, ARM64Reg Rm);
|
||||
|
@ -560,11 +726,7 @@ public:
|
|||
void EOR(ARM64Reg Rd, ARM64Reg Rn, u32 immr, u32 imms, bool invert = false);
|
||||
void ORR(ARM64Reg Rd, ARM64Reg Rn, u32 immr, u32 imms, bool invert = false);
|
||||
void TST(ARM64Reg Rn, u32 immr, u32 imms, bool invert = false);
|
||||
void TST(ARM64Reg Rn, ARM64Reg Rm)
|
||||
{
|
||||
ANDS(Is64Bit(Rn) ? ZR : WZR, Rn, Rm);
|
||||
}
|
||||
|
||||
void TST(ARM64Reg Rn, ARM64Reg Rm) { ANDS(Is64Bit(Rn) ? ZR : WZR, Rn, Rm); }
|
||||
// Add/subtract (immediate)
|
||||
void ADD(ARM64Reg Rd, ARM64Reg Rn, u32 imm, bool shift = false);
|
||||
void ADDS(ARM64Reg Rd, ARM64Reg Rn, u32 imm, bool shift = false);
|
||||
|
@ -594,11 +756,7 @@ public:
|
|||
void UXTB(ARM64Reg Rd, ARM64Reg Rn);
|
||||
void UXTH(ARM64Reg Rd, ARM64Reg Rn);
|
||||
|
||||
void UBFX(ARM64Reg Rd, ARM64Reg Rn, int lsb, int width)
|
||||
{
|
||||
UBFM(Rd, Rn, lsb, lsb + width - 1);
|
||||
}
|
||||
|
||||
void UBFX(ARM64Reg Rd, ARM64Reg Rn, int lsb, int width) { UBFM(Rd, Rn, lsb, lsb + width - 1); }
|
||||
// Load Register (Literal)
|
||||
void LDR(ARM64Reg Rt, u32 imm);
|
||||
void LDRSW(ARM64Reg Rt, u32 imm);
|
||||
|
@ -684,10 +842,14 @@ public:
|
|||
MOVI2R(Rd, (uintptr_t)ptr);
|
||||
}
|
||||
|
||||
// Wrapper around AND x, y, imm etc. If you are sure the imm will work, no need to pass a scratch register.
|
||||
// Wrapper around AND x, y, imm etc. If you are sure the imm will work, no need to pass a scratch
|
||||
// register.
|
||||
void ANDI2R(ARM64Reg Rd, ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG);
|
||||
void ANDSI2R(ARM64Reg Rd, ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG);
|
||||
void TSTI2R(ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG) { ANDSI2R(Is64Bit(Rn) ? ZR : WZR, Rn, imm, scratch); }
|
||||
void TSTI2R(ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG)
|
||||
{
|
||||
ANDSI2R(Is64Bit(Rn) ? ZR : WZR, Rn, imm, scratch);
|
||||
}
|
||||
void ORRI2R(ARM64Reg Rd, ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG);
|
||||
void EORI2R(ARM64Reg Rd, ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG);
|
||||
void CMPI2R(ARM64Reg Rn, u64 imm, ARM64Reg scratch = INVALID_REG);
|
||||
|
@ -732,7 +894,8 @@ public:
|
|||
|
||||
// Plain function call
|
||||
void QuickCallFunction(ARM64Reg scratchreg, const void* func);
|
||||
template <typename T> void QuickCallFunction(ARM64Reg scratchreg, T func)
|
||||
template <typename T>
|
||||
void QuickCallFunction(ARM64Reg scratchreg, T func)
|
||||
{
|
||||
QuickCallFunction(scratchreg, (const void*)func);
|
||||
}
|
||||
|
@ -742,7 +905,6 @@ class ARM64FloatEmitter
|
|||
{
|
||||
public:
|
||||
ARM64FloatEmitter(ARM64XEmitter* emit) : m_emit(emit) {}
|
||||
|
||||
void LDR(u8 size, IndexType type, ARM64Reg Rt, ARM64Reg Rn, s32 imm);
|
||||
void STR(u8 size, IndexType type, ARM64Reg Rt, ARM64Reg Rn, s32 imm);
|
||||
|
||||
|
@ -823,10 +985,7 @@ public:
|
|||
void FSUB(u8 size, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void NOT(ARM64Reg Rd, ARM64Reg Rn);
|
||||
void ORR(ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void MOV(ARM64Reg Rd, ARM64Reg Rn)
|
||||
{
|
||||
ORR(Rd, Rn, Rn);
|
||||
}
|
||||
void MOV(ARM64Reg Rd, ARM64Reg Rn) { ORR(Rd, Rn, Rn); }
|
||||
void REV16(u8 size, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void REV32(u8 size, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void REV64(u8 size, ARM64Reg Rd, ARM64Reg Rn);
|
||||
|
@ -852,7 +1011,8 @@ public:
|
|||
void FCVT(u8 size_to, u8 size_from, ARM64Reg Rd, ARM64Reg Rn);
|
||||
|
||||
// Scalar convert float to int, in a lot of variants.
|
||||
// Note that the scalar version of this operation has two encodings, one that goes to an integer register
|
||||
// Note that the scalar version of this operation has two encodings, one that goes to an integer
|
||||
// register
|
||||
// and one that outputs to a scalar fp register.
|
||||
void FCVTS(ARM64Reg Rd, ARM64Reg Rn, RoundingMode round);
|
||||
void FCVTU(ARM64Reg Rd, ARM64Reg Rn, RoundingMode round);
|
||||
|
@ -920,18 +1080,21 @@ public:
|
|||
private:
|
||||
ARM64XEmitter* m_emit;
|
||||
inline void Write32(u32 value) { m_emit->Write32(value); }
|
||||
|
||||
// Emitting functions
|
||||
void EmitLoadStoreImmediate(u8 size, u32 opc, IndexType type, ARM64Reg Rt, ARM64Reg Rn, s32 imm);
|
||||
void EmitScalar2Source(bool M, bool S, u32 type, u32 opcode, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitScalar2Source(bool M, bool S, u32 type, u32 opcode, ARM64Reg Rd, ARM64Reg Rn,
|
||||
ARM64Reg Rm);
|
||||
void EmitThreeSame(bool U, u32 size, u32 opcode, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitCopy(bool Q, u32 op, u32 imm5, u32 imm4, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void Emit2RegMisc(bool Q, bool U, u32 size, u32 opcode, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitLoadStoreSingleStructure(bool L, bool R, u32 opcode, bool S, u32 size, ARM64Reg Rt, ARM64Reg Rn);
|
||||
void EmitLoadStoreSingleStructure(bool L, bool R, u32 opcode, bool S, u32 size, ARM64Reg Rt, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitLoadStoreSingleStructure(bool L, bool R, u32 opcode, bool S, u32 size, ARM64Reg Rt,
|
||||
ARM64Reg Rn);
|
||||
void EmitLoadStoreSingleStructure(bool L, bool R, u32 opcode, bool S, u32 size, ARM64Reg Rt,
|
||||
ARM64Reg Rn, ARM64Reg Rm);
|
||||
void Emit1Source(bool M, bool S, u32 type, u32 opcode, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitConversion(bool sf, bool S, u32 type, u32 rmode, u32 opcode, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitConversion2(bool sf, bool S, bool direction, u32 type, u32 rmode, u32 opcode, int scale, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitConversion2(bool sf, bool S, bool direction, u32 type, u32 rmode, u32 opcode, int scale,
|
||||
ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitCompare(bool M, bool S, u32 op, u32 opcode2, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitCondSelect(bool M, bool S, CCFlags cond, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitPermute(u32 size, u32 op, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
|
@ -939,13 +1102,17 @@ private:
|
|||
void EmitShiftImm(bool Q, bool U, u32 immh, u32 immb, u32 opcode, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitScalarShiftImm(bool U, u32 immh, u32 immb, u32 opcode, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitLoadStoreMultipleStructure(u32 size, bool L, u32 opcode, ARM64Reg Rt, ARM64Reg Rn);
|
||||
void EmitLoadStoreMultipleStructurePost(u32 size, bool L, u32 opcode, ARM64Reg Rt, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitLoadStoreMultipleStructurePost(u32 size, bool L, u32 opcode, ARM64Reg Rt, ARM64Reg Rn,
|
||||
ARM64Reg Rm);
|
||||
void EmitScalar1Source(bool M, bool S, u32 type, u32 opcode, ARM64Reg Rd, ARM64Reg Rn);
|
||||
void EmitVectorxElement(bool U, u32 size, bool L, u32 opcode, bool H, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm);
|
||||
void EmitVectorxElement(bool U, u32 size, bool L, u32 opcode, bool H, ARM64Reg Rd, ARM64Reg Rn,
|
||||
ARM64Reg Rm);
|
||||
void EmitLoadStoreUnscaled(u32 size, u32 op, ARM64Reg Rt, ARM64Reg Rn, s32 imm);
|
||||
void EmitConvertScalarToInt(ARM64Reg Rd, ARM64Reg Rn, RoundingMode round, bool sign);
|
||||
void EmitScalar3Source(bool isDouble, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm, ARM64Reg Ra, int opcode);
|
||||
void EncodeLoadStorePair(u32 size, bool load, IndexType type, ARM64Reg Rt, ARM64Reg Rt2, ARM64Reg Rn, s32 imm);
|
||||
void EmitScalar3Source(bool isDouble, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm, ARM64Reg Ra,
|
||||
int opcode);
|
||||
void EncodeLoadStorePair(u32 size, bool load, IndexType type, ARM64Reg Rt, ARM64Reg Rt2,
|
||||
ARM64Reg Rn, s32 imm);
|
||||
void EncodeLoadStoreRegisterOffset(u32 size, bool load, ARM64Reg Rt, ARM64Reg Rn, ArithOption Rm);
|
||||
void EncodeModImm(bool Q, u8 op, u8 cmode, u8 o2, ARM64Reg Rd, u8 abcdefgh);
|
||||
|
||||
|
@ -963,7 +1130,8 @@ private:
|
|||
{
|
||||
u32* ptr = (u32*)region;
|
||||
u32* maxptr = (u32*)(region + region_size);
|
||||
// If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything
|
||||
// If our memory isn't a multiple of u32 then this won't write the last remaining bytes with
|
||||
// anything
|
||||
// Less than optimal, but there would be nothing we could do but throw a runtime warning anyway.
|
||||
// AArch64: 0xD4200000 = BRK 0
|
||||
while (ptr < maxptr)
|
||||
|
@ -971,4 +1139,3 @@ private:
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <asm/hwcap.h>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
#include <asm/hwcap.h>
|
||||
#include <sys/auxv.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
const char procfile[] = "/proc/cpuinfo";
|
||||
|
@ -78,11 +78,16 @@ std::string CPUInfo::Summarize()
|
|||
else
|
||||
sum = StringFromFormat("%s, %i cores", cpu_string, num_cores);
|
||||
|
||||
if (bAES) sum += ", AES";
|
||||
if (bCRC32) sum += ", CRC32";
|
||||
if (bSHA1) sum += ", SHA1";
|
||||
if (bSHA2) sum += ", SHA2";
|
||||
if (CPU64bit) sum += ", 64-bit";
|
||||
if (bAES)
|
||||
sum += ", AES";
|
||||
if (bCRC32)
|
||||
sum += ", CRC32";
|
||||
if (bSHA1)
|
||||
sum += ", SHA1";
|
||||
if (bSHA2)
|
||||
sum += ", SHA2";
|
||||
if (CPU64bit)
|
||||
sum += ", 64-bit";
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
|
|
@ -25,4 +25,3 @@ enum CCFlags
|
|||
CC_LO = CC_CC, // Alias of CC_CC Unsigned lower
|
||||
};
|
||||
const u32 NO_COND = 0xE0000000;
|
||||
|
||||
|
|
|
@ -6,31 +6,35 @@
|
|||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||
if (!(_a_)) {\
|
||||
if (!(_a_)) \
|
||||
{ \
|
||||
if (!PanicYesNo(_fmt_, __VA_ARGS__)) \
|
||||
Crash(); \
|
||||
}
|
||||
|
||||
#define _dbg_assert_msg_(_t_, _a_, _msg_, ...) \
|
||||
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) {\
|
||||
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) \
|
||||
{ \
|
||||
ERROR_LOG(_t_, _msg_, __VA_ARGS__); \
|
||||
if (!PanicYesNo(_msg_, __VA_ARGS__)) \
|
||||
Crash(); \
|
||||
}
|
||||
#else
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||
if (!(_a_)) {\
|
||||
if (!(_a_)) \
|
||||
{ \
|
||||
if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) \
|
||||
Crash(); \
|
||||
}
|
||||
|
||||
#define _dbg_assert_msg_(_t_, _a_, _msg_, ...) \
|
||||
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) {\
|
||||
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) \
|
||||
{ \
|
||||
ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \
|
||||
if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \
|
||||
Crash(); \
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
inline void AtomicAdd(volatile u32& target, u32 value)
|
||||
{
|
||||
__sync_add_and_fetch(&target, value);
|
||||
|
@ -84,5 +83,4 @@ inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
|
|||
{
|
||||
return __atomic_exchange_n(&loc, newval, __ATOMIC_ACQ_REL);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
inline void AtomicAdd(volatile u32& target, u32 value)
|
||||
{
|
||||
_InterlockedExchangeAdd((volatile LONG*)&target, (LONG)value);
|
||||
|
@ -89,5 +88,4 @@ inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
|
|||
{
|
||||
return (T*)_InterlockedExchangePointer_acq((void* volatile*)&loc, (void*)newval);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
// Copyright 2014 Tony Wasserka
|
||||
// All rights reserved.
|
||||
//
|
||||
|
@ -30,7 +29,6 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <limits>
|
||||
|
@ -154,18 +152,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
__forceinline operator T() const
|
||||
{
|
||||
return Value();
|
||||
}
|
||||
|
||||
__forceinline operator T() const { return Value(); }
|
||||
private:
|
||||
// StorageType is T for non-enum types and the underlying type of T if
|
||||
// T is an enumeration. Note that T is wrapped within an enable_if in the
|
||||
// former case to workaround compile errors which arise when using
|
||||
// std::underlying_type<T>::type directly.
|
||||
typedef typename std::conditional<std::is_enum<T>::value,
|
||||
std::underlying_type<T>,
|
||||
typedef typename std::conditional<std::is_enum<T>::value, std::underlying_type<T>,
|
||||
std::enable_if<true, T>>::type::type StorageType;
|
||||
|
||||
// Unsigned version of StorageType
|
||||
|
|
|
@ -49,20 +49,43 @@ static inline int LeastSignificantSetBit(u64 val)
|
|||
return (int)index;
|
||||
}
|
||||
#else
|
||||
static inline int CountSetBits(u8 val) { return __builtin_popcount(val); }
|
||||
static inline int CountSetBits(u16 val) { return __builtin_popcount(val); }
|
||||
static inline int CountSetBits(u32 val) { return __builtin_popcount(val); }
|
||||
static inline int CountSetBits(u64 val) { return __builtin_popcountll(val); }
|
||||
static inline int LeastSignificantSetBit(u8 val) { return __builtin_ctz(val); }
|
||||
static inline int LeastSignificantSetBit(u16 val) { return __builtin_ctz(val); }
|
||||
static inline int LeastSignificantSetBit(u32 val) { return __builtin_ctz(val); }
|
||||
static inline int LeastSignificantSetBit(u64 val) { return __builtin_ctzll(val); }
|
||||
static inline int CountSetBits(u8 val)
|
||||
{
|
||||
return __builtin_popcount(val);
|
||||
}
|
||||
static inline int CountSetBits(u16 val)
|
||||
{
|
||||
return __builtin_popcount(val);
|
||||
}
|
||||
static inline int CountSetBits(u32 val)
|
||||
{
|
||||
return __builtin_popcount(val);
|
||||
}
|
||||
static inline int CountSetBits(u64 val)
|
||||
{
|
||||
return __builtin_popcountll(val);
|
||||
}
|
||||
static inline int LeastSignificantSetBit(u8 val)
|
||||
{
|
||||
return __builtin_ctz(val);
|
||||
}
|
||||
static inline int LeastSignificantSetBit(u16 val)
|
||||
{
|
||||
return __builtin_ctz(val);
|
||||
}
|
||||
static inline int LeastSignificantSetBit(u32 val)
|
||||
{
|
||||
return __builtin_ctz(val);
|
||||
}
|
||||
static inline int LeastSignificantSetBit(u64 val)
|
||||
{
|
||||
return __builtin_ctzll(val);
|
||||
}
|
||||
#endif
|
||||
|
||||
// namespace avoids conflict with OS X Carbon; don't use BitSet<T> directly
|
||||
namespace BS
|
||||
{
|
||||
|
||||
// Similar to std::bitset, this is a class which encapsulates a bitset, i.e.
|
||||
// using the set bits of an integer to represent a set of integers. Like that
|
||||
// class, it acts like an array of bools:
|
||||
|
@ -87,6 +110,7 @@ template <typename IntTy>
|
|||
class BitSet
|
||||
{
|
||||
static_assert(!std::is_signed<IntTy>::value, "BitSet should not be used with signed types");
|
||||
|
||||
public:
|
||||
// A reference to a particular bit, returned from operator[].
|
||||
class Ref
|
||||
|
@ -100,6 +124,7 @@ public:
|
|||
m_bs->m_val = (m_bs->m_val & ~m_mask) | (set ? m_mask : 0);
|
||||
return set;
|
||||
}
|
||||
|
||||
private:
|
||||
BitSet* m_bs;
|
||||
IntTy m_mask;
|
||||
|
@ -111,7 +136,11 @@ public:
|
|||
public:
|
||||
Iterator(const Iterator& other) : m_val(other.m_val), m_bit(other.m_bit) {}
|
||||
Iterator(IntTy val, int bit) : m_val(val), m_bit(bit) {}
|
||||
Iterator& operator=(Iterator other) { new (this) Iterator(other); return *this; }
|
||||
Iterator& operator=(Iterator other)
|
||||
{
|
||||
new (this) Iterator(other);
|
||||
return *this;
|
||||
}
|
||||
int operator*() { return m_bit; }
|
||||
Iterator& operator++()
|
||||
{
|
||||
|
@ -168,19 +197,19 @@ public:
|
|||
BitSet& operator&=(BitSet other) { return *this = *this & other; }
|
||||
BitSet& operator^=(BitSet other) { return *this = *this ^ other; }
|
||||
explicit operator bool() const { return m_val != 0; }
|
||||
|
||||
// Warning: Even though on modern CPUs this is a single fast instruction,
|
||||
// Dolphin's official builds do not currently assume POPCNT support on x86,
|
||||
// so slower explicit bit twiddling is generated. Still should generally
|
||||
// be faster than a loop.
|
||||
unsigned int Count() const { return CountSetBits(m_val); }
|
||||
|
||||
Iterator begin() const { Iterator it(m_val, 0); return ++it; }
|
||||
Iterator begin() const
|
||||
{
|
||||
Iterator it(m_val, 0);
|
||||
return ++it;
|
||||
}
|
||||
Iterator end() const { return Iterator(m_val, -1); }
|
||||
|
||||
IntTy m_val;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
typedef BS::BitSet<u8> BitSet8;
|
||||
|
|
|
@ -13,24 +13,17 @@
|
|||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
// This class provides a synchronized loop.
|
||||
// It's a thread-safe way to trigger a new iteration without busy loops.
|
||||
// It's optimized for high-usage iterations which usually are already running while it's triggered often.
|
||||
// Be careful when using Wait() and Wakeup() at the same time. Wait() may block forever while Wakeup() is called regularly.
|
||||
// It's optimized for high-usage iterations which usually are already running while it's triggered
|
||||
// often.
|
||||
// Be careful when using Wait() and Wakeup() at the same time. Wait() may block forever while
|
||||
// Wakeup() is called regularly.
|
||||
class BlockingLoop
|
||||
{
|
||||
public:
|
||||
BlockingLoop()
|
||||
{
|
||||
m_stopped.Set();
|
||||
}
|
||||
|
||||
~BlockingLoop()
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
BlockingLoop() { m_stopped.Set(); }
|
||||
~BlockingLoop() { Stop(); }
|
||||
// Triggers to rerun the payload of the Run() function at least once again.
|
||||
// This function will never block and is designed to finish as fast as possible.
|
||||
void Wakeup()
|
||||
|
@ -75,7 +68,8 @@ public:
|
|||
|
||||
// Half start the worker.
|
||||
// So this object is in a running state and Wait() will block until the worker calls Run().
|
||||
// This may be called from any thread and is supposed to be called at least once before Wait() is used.
|
||||
// This may be called from any thread and is supposed to be called at least once before Wait() is
|
||||
// used.
|
||||
void Prepare()
|
||||
{
|
||||
// There is a race condition if the other threads call this function while
|
||||
|
@ -84,16 +78,19 @@ public:
|
|||
|
||||
if (!m_stopped.TestAndClear())
|
||||
return;
|
||||
m_running_state.store(STATE_LAST_EXECUTION); // so the payload will only be executed once without any Wakeup call
|
||||
m_running_state.store(
|
||||
STATE_LAST_EXECUTION); // so the payload will only be executed once without any Wakeup call
|
||||
m_shutdown.Clear();
|
||||
m_may_sleep.Set();
|
||||
}
|
||||
|
||||
// Main loop of this object.
|
||||
// The payload callback is called at least as often as it's needed to match the Wakeup() requirements.
|
||||
// The payload callback is called at least as often as it's needed to match the Wakeup()
|
||||
// requirements.
|
||||
// The optional timeout parameter is a timeout for how periodically the payload should be called.
|
||||
// Use timeout = 0 to run without a timeout at all.
|
||||
template<class F> void Run(F payload, int64_t timeout = 0)
|
||||
template <class F>
|
||||
void Run(F payload, int64_t timeout = 0)
|
||||
{
|
||||
// Asserts that Prepare is called at least once before we enter the loop.
|
||||
// But a good implementation should call this before already.
|
||||
|
@ -106,14 +103,17 @@ public:
|
|||
switch (m_running_state.load())
|
||||
{
|
||||
case STATE_NEED_EXECUTION:
|
||||
// We won't get notified while we are in the STATE_NEED_EXECUTION state, so maybe Wakeup was called.
|
||||
// So we have to assume on finishing the STATE_NEED_EXECUTION state, that there may be some remaining tasks.
|
||||
// We won't get notified while we are in the STATE_NEED_EXECUTION state, so maybe Wakeup was
|
||||
// called.
|
||||
// So we have to assume on finishing the STATE_NEED_EXECUTION state, that there may be some
|
||||
// remaining tasks.
|
||||
// To process this tasks, we call the payload again within the STATE_LAST_EXECUTION state.
|
||||
m_running_state--;
|
||||
break;
|
||||
|
||||
case STATE_LAST_EXECUTION:
|
||||
// If we're still in the STATE_LAST_EXECUTION state, then Wakeup wasn't called within the last
|
||||
// If we're still in the STATE_LAST_EXECUTION state, then Wakeup wasn't called within the
|
||||
// last
|
||||
// execution of the payload. This means we should be ready now.
|
||||
// But bad luck, Wakeup may have been called right now. So break and rerun the payload
|
||||
// if the state was touched.
|
||||
|
@ -126,7 +126,8 @@ public:
|
|||
m_done_event.Set();
|
||||
|
||||
case STATE_DONE:
|
||||
// We're done now. So time to check if we want to sleep or if we want to stay in a busy loop.
|
||||
// We're done now. So time to check if we want to sleep or if we want to stay in a busy
|
||||
// loop.
|
||||
if (m_may_sleep.TestAndClear())
|
||||
{
|
||||
// Try to set the sleeping state.
|
||||
|
@ -178,23 +179,11 @@ public:
|
|||
Wait();
|
||||
}
|
||||
|
||||
bool IsRunning() const
|
||||
{
|
||||
return !m_stopped.IsSet() && !m_shutdown.IsSet();
|
||||
}
|
||||
|
||||
bool IsDone() const
|
||||
{
|
||||
return m_stopped.IsSet() || m_running_state.load() <= STATE_DONE;
|
||||
}
|
||||
|
||||
bool IsRunning() const { return !m_stopped.IsSet() && !m_shutdown.IsSet(); }
|
||||
bool IsDone() const { return m_stopped.IsSet() || m_running_state.load() <= STATE_DONE; }
|
||||
// This function should be triggered regularly over time so
|
||||
// that we will fall back from the busy loop to sleeping.
|
||||
void AllowSleep()
|
||||
{
|
||||
m_may_sleep.Set();
|
||||
}
|
||||
|
||||
void AllowSleep() { m_may_sleep.Set(); }
|
||||
private:
|
||||
std::mutex m_wait_lock;
|
||||
std::mutex m_prepare_lock;
|
||||
|
@ -205,7 +194,8 @@ private:
|
|||
Event m_new_work_event;
|
||||
Event m_done_event;
|
||||
|
||||
enum RUNNING_TYPE {
|
||||
enum RUNNING_TYPE
|
||||
{
|
||||
STATE_SLEEPING = 0,
|
||||
STATE_DONE = 1,
|
||||
STATE_LAST_EXECUTION = 2,
|
||||
|
@ -213,7 +203,7 @@ private:
|
|||
};
|
||||
std::atomic<int> m_running_state; // must be of type RUNNING_TYPE
|
||||
|
||||
Flag m_may_sleep; // If this is set, we fall back from the busy loop to an event based synchronization.
|
||||
Flag m_may_sleep; // If this is set, we fall back from the busy loop to an event based
|
||||
// synchronization.
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -133,9 +133,9 @@ MemChecks::TMemChecksStr MemChecks::GetStrings() const
|
|||
{
|
||||
std::stringstream mc;
|
||||
mc << std::hex << bp.StartAddress;
|
||||
mc << " " << (bp.bRange ? bp.EndAddress : bp.StartAddress) << " " <<
|
||||
(bp.bRange ? "n" : "") << (bp.OnRead ? "r" : "") <<
|
||||
(bp.OnWrite ? "w" : "") << (bp.Log ? "l" : "") << (bp.Break ? "p" : "");
|
||||
mc << " " << (bp.bRange ? bp.EndAddress : bp.StartAddress) << " " << (bp.bRange ? "n" : "")
|
||||
<< (bp.OnRead ? "r" : "") << (bp.OnWrite ? "w" : "") << (bp.Log ? "l" : "")
|
||||
<< (bp.Break ? "p" : "");
|
||||
mcs.push_back(mc.str());
|
||||
}
|
||||
|
||||
|
@ -207,17 +207,16 @@ TMemCheck* MemChecks::GetMemCheck(u32 address)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool TMemCheck::Action(DebugInterface* debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc)
|
||||
bool TMemCheck::Action(DebugInterface* debug_interface, u32 iValue, u32 addr, bool write, int size,
|
||||
u32 pc)
|
||||
{
|
||||
if ((write && OnWrite) || (!write && OnRead))
|
||||
{
|
||||
if (Log)
|
||||
{
|
||||
INFO_LOG(MEMMAP, "CHK %08x (%s) %s%i %0*x at %08x (%s)",
|
||||
pc, debug_interface->GetDescription(pc).c_str(),
|
||||
write ? "Write" : "Read", size*8, size*2, iValue, addr,
|
||||
debug_interface->GetDescription(addr).c_str()
|
||||
);
|
||||
INFO_LOG(MEMMAP, "CHK %08x (%s) %s%i %0*x at %08x (%s)", pc,
|
||||
debug_interface->GetDescription(pc).c_str(), write ? "Write" : "Read", size * 8,
|
||||
size * 2, iValue, addr, debug_interface->GetDescription(addr).c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -225,7 +224,6 @@ bool TMemCheck::Action(DebugInterface* debug_interface, u32 iValue, u32 addr, bo
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Watches::IsAddressWatch(u32 _iAddress) const
|
||||
{
|
||||
for (const TWatch& bp : m_Watches)
|
||||
|
|
|
@ -41,8 +41,7 @@ struct TMemCheck
|
|||
u32 numHits;
|
||||
|
||||
// returns whether to break
|
||||
bool Action(DebugInterface* dbg_interface, u32 _iValue, u32 addr,
|
||||
bool write, int size, u32 pc);
|
||||
bool Action(DebugInterface* dbg_interface, u32 _iValue, u32 addr, bool write, int size, u32 pc);
|
||||
};
|
||||
|
||||
struct TWatch
|
||||
|
@ -60,7 +59,6 @@ public:
|
|||
typedef std::vector<std::string> TBreakPointsStr;
|
||||
|
||||
const TBreakPoints& GetBreakPoints() { return m_BreakPoints; }
|
||||
|
||||
TBreakPointsStr GetStrings() const;
|
||||
void AddFromStrings(const TBreakPointsStr& bps);
|
||||
|
||||
|
@ -81,7 +79,6 @@ private:
|
|||
TBreakPoints m_BreakPoints;
|
||||
};
|
||||
|
||||
|
||||
// Memory breakpoints
|
||||
class MemChecks
|
||||
{
|
||||
|
@ -92,7 +89,6 @@ public:
|
|||
TMemChecks m_MemChecks;
|
||||
|
||||
const TMemChecks& GetMemChecks() { return m_MemChecks; }
|
||||
|
||||
TMemChecksStr GetStrings() const;
|
||||
void AddFromStrings(const TMemChecksStr& mcs);
|
||||
|
||||
|
@ -103,7 +99,6 @@ public:
|
|||
void Remove(u32 _Address);
|
||||
|
||||
void Clear() { m_MemChecks.clear(); }
|
||||
|
||||
bool HasAny() const { return !m_MemChecks.empty(); }
|
||||
};
|
||||
|
||||
|
@ -114,7 +109,6 @@ public:
|
|||
typedef std::vector<std::string> TWatchesStr;
|
||||
|
||||
const TWatches& GetWatches() { return m_Watches; }
|
||||
|
||||
TWatchesStr GetStrings() const;
|
||||
void AddFromStrings(const TWatchesStr& bps);
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#include <paths.h>
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#endif // WIN32
|
||||
|
||||
|
@ -61,7 +61,9 @@ std::vector<std::string> cdio_get_devices()
|
|||
}
|
||||
|
||||
// advance to next drive
|
||||
while (*drive++) {}
|
||||
while (*drive++)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
return drives;
|
||||
|
@ -85,11 +87,9 @@ std::vector<std::string> cdio_get_devices()
|
|||
if (classes_to_match == nullptr)
|
||||
return drives;
|
||||
|
||||
CFDictionarySetValue(classes_to_match,
|
||||
CFSTR(kIOMediaEjectableKey), kCFBooleanTrue);
|
||||
CFDictionarySetValue(classes_to_match, CFSTR(kIOMediaEjectableKey), kCFBooleanTrue);
|
||||
|
||||
kern_result = IOServiceGetMatchingServices(master_port,
|
||||
classes_to_match, &media_iterator);
|
||||
kern_result = IOServiceGetMatchingServices(master_port, classes_to_match, &media_iterator);
|
||||
if (kern_result != KERN_SUCCESS)
|
||||
return drives;
|
||||
|
||||
|
@ -101,9 +101,7 @@ std::vector<std::string> cdio_get_devices()
|
|||
do
|
||||
{
|
||||
str_bsd_path =
|
||||
IORegistryEntryCreateCFProperty(next_media,
|
||||
CFSTR(kIOBSDNameKey), kCFAllocatorDefault,
|
||||
0);
|
||||
IORegistryEntryCreateCFProperty(next_media, CFSTR(kIOBSDNameKey), kCFAllocatorDefault, 0);
|
||||
if (str_bsd_path == nullptr)
|
||||
{
|
||||
IOObjectRelease(next_media);
|
||||
|
@ -139,20 +137,15 @@ static struct
|
|||
const char* format;
|
||||
unsigned int num_min;
|
||||
unsigned int num_max;
|
||||
} checklist[] =
|
||||
{
|
||||
} checklist[] = {
|
||||
#ifdef __linux__
|
||||
{ "/dev/cdrom", 0, 0 },
|
||||
{ "/dev/dvd", 0, 0 },
|
||||
{ "/dev/hd%c", 'a', 'z' },
|
||||
{ "/dev/scd%d", 0, 27 },
|
||||
{ "/dev/sr%d", 0, 27 },
|
||||
{"/dev/cdrom", 0, 0}, {"/dev/dvd", 0, 0}, {"/dev/hd%c", 'a', 'z'},
|
||||
{"/dev/scd%d", 0, 27}, {"/dev/sr%d", 0, 27},
|
||||
#else
|
||||
{"/dev/acd%d", 0, 27},
|
||||
{"/dev/cd%d", 0, 27},
|
||||
#endif
|
||||
{ nullptr, 0, 0 }
|
||||
};
|
||||
{nullptr, 0, 0}};
|
||||
|
||||
// Returns true if a device is a block or char device and not a symbolic link
|
||||
static bool is_device(const std::string& source_name)
|
||||
|
@ -161,8 +154,7 @@ static bool is_device(const std::string& source_name)
|
|||
if (0 != lstat(source_name.c_str(), &buf))
|
||||
return false;
|
||||
|
||||
return ((S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)) &&
|
||||
!S_ISLNK(buf.st_mode));
|
||||
return ((S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)) && !S_ISLNK(buf.st_mode));
|
||||
}
|
||||
|
||||
// Check a device to see if it is a DVD/CD-ROM drive
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
// Detect the CPU, so we'll know which optimizations to use
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -37,8 +37,11 @@
|
|||
#define __has_feature(x) (0)
|
||||
#endif
|
||||
|
||||
#if (__has_feature(is_trivially_copyable) && (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || (defined(__GNUC__) && __GNUC__ >= 5)
|
||||
#define IsTriviallyCopyable(T) std::is_trivially_copyable<typename std::remove_volatile<T>::type>::value
|
||||
#if (__has_feature(is_trivially_copyable) && \
|
||||
(defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || \
|
||||
(defined(__GNUC__) && __GNUC__ >= 5)
|
||||
#define IsTriviallyCopyable(T) \
|
||||
std::is_trivially_copyable<typename std::remove_volatile<T>::type>::value
|
||||
#elif __GNUC__
|
||||
#define IsTriviallyCopyable(T) std::has_trivial_copy_constructor<T>::value
|
||||
#elif _MSC_VER
|
||||
|
@ -48,7 +51,6 @@
|
|||
#error No version of is_trivially_copyable
|
||||
#endif
|
||||
|
||||
|
||||
template <class T>
|
||||
struct LinkedListItem : public T
|
||||
{
|
||||
|
@ -72,10 +74,8 @@ public:
|
|||
|
||||
public:
|
||||
PointerWrap(u8** ptr_, Mode mode_) : ptr(ptr_), mode(mode_) {}
|
||||
|
||||
void SetMode(Mode mode_) { mode = mode_; }
|
||||
Mode GetMode() const { return mode; }
|
||||
|
||||
template <typename K, class V>
|
||||
void Do(std::map<K, V>& x)
|
||||
{
|
||||
|
@ -218,7 +218,6 @@ public:
|
|||
DoVoid((void*)&x, sizeof(x));
|
||||
}
|
||||
|
||||
|
||||
void Do(bool& x)
|
||||
{
|
||||
// bool's size can vary depending on platform, which can
|
||||
|
@ -235,7 +234,8 @@ public:
|
|||
template <typename T>
|
||||
void DoPointer(T*& x, T* const base)
|
||||
{
|
||||
// pointers can be more than 2^31 apart, but you're using this function wrong if you need that much range
|
||||
// pointers can be more than 2^31 apart, but you're using this function wrong if you need that
|
||||
// much range
|
||||
ptrdiff_t offset = x - base;
|
||||
Do(offset);
|
||||
if (mode == MODE_READ)
|
||||
|
@ -245,7 +245,8 @@ public:
|
|||
}
|
||||
|
||||
// Let's pretend std::list doesn't exist!
|
||||
template <class T, LinkedListItem<T>* (*TNew)(), void (*TFree)(LinkedListItem<T>*), void (*TDo)(PointerWrap&, T*)>
|
||||
template <class T, LinkedListItem<T>* (*TNew)(), void (*TFree)(LinkedListItem<T>*),
|
||||
void (*TDo)(PointerWrap&, T*)>
|
||||
void DoLinkedList(LinkedListItem<T>*& list_start, LinkedListItem<T>** list_end = 0)
|
||||
{
|
||||
LinkedListItem<T>* list_cur = list_start;
|
||||
|
@ -311,7 +312,8 @@ public:
|
|||
|
||||
if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber)
|
||||
{
|
||||
PanicAlertT("Error: After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). Aborting savestate load...",
|
||||
PanicAlertT("Error: After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). Aborting "
|
||||
"savestate load...",
|
||||
prevName.c_str(), cookie, cookie, arbitraryNumber, arbitraryNumber);
|
||||
mode = PointerWrap::MODE_MEASURE;
|
||||
}
|
||||
|
@ -329,8 +331,7 @@ private:
|
|||
Do(elem);
|
||||
}
|
||||
|
||||
__forceinline
|
||||
void DoVoid(void* data, u32 size)
|
||||
__forceinline void DoVoid(void* data, u32 size)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
|
@ -347,8 +348,8 @@ private:
|
|||
|
||||
case MODE_VERIFY:
|
||||
_dbg_assert_msg_(COMMON, !memcmp(data, *ptr, size),
|
||||
"Savestate verification failure: buf %p != %p (size %u).\n",
|
||||
data, *ptr, size);
|
||||
"Savestate verification failure: buf %p != %p (size %u).\n", data, *ptr,
|
||||
size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -397,8 +398,8 @@ public:
|
|||
// Check revision
|
||||
if (header.Revision != _Revision)
|
||||
{
|
||||
ERROR_LOG(COMMON, "ChunkReader: Wrong file revision, got %d expected %d",
|
||||
header.Revision, _Revision);
|
||||
ERROR_LOG(COMMON, "ChunkReader: Wrong file revision, got %d expected %d", header.Revision,
|
||||
_Revision);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -406,8 +407,7 @@ public:
|
|||
const u32 sz = (u32)(fileSize - headerSize);
|
||||
if (header.ExpectedSize != sz)
|
||||
{
|
||||
ERROR_LOG(COMMON, "ChunkReader: Bad file size, got %d expected %d",
|
||||
sz, header.ExpectedSize);
|
||||
ERROR_LOG(COMMON, "ChunkReader: Bad file size, got %d expected %d", sz, header.ExpectedSize);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,11 +13,13 @@
|
|||
// having to prefix them with gen-> or something similar.
|
||||
// Example implementation:
|
||||
// class JIT : public CodeBlock<ARMXEmitter> {}
|
||||
template<class T> class CodeBlock : public T, NonCopyable
|
||||
template <class T>
|
||||
class CodeBlock : public T, NonCopyable
|
||||
{
|
||||
private:
|
||||
// A privately used function to set the executable RAM space to something invalid.
|
||||
// For debugging usefulness it should be used to set the RAM to a host specific breakpoint instruction
|
||||
// For debugging usefulness it should be used to set the RAM to a host specific breakpoint
|
||||
// instruction
|
||||
virtual void PoisonMemory() = 0;
|
||||
|
||||
protected:
|
||||
|
@ -31,12 +33,16 @@ protected:
|
|||
|
||||
public:
|
||||
CodeBlock()
|
||||
: region(nullptr), region_size(0), parent_region_size(0),
|
||||
m_has_child(false), m_is_child(false), m_child(nullptr)
|
||||
: region(nullptr), region_size(0), parent_region_size(0), m_has_child(false),
|
||||
m_is_child(false), m_child(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~CodeBlock() { if (region) FreeCodeSpace(); }
|
||||
virtual ~CodeBlock()
|
||||
{
|
||||
if (region)
|
||||
FreeCodeSpace();
|
||||
}
|
||||
|
||||
// Call this before you generate any code.
|
||||
void AllocCodeSpace(int size, bool need_low = true)
|
||||
|
@ -68,23 +74,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool IsInSpace(u8* ptr) const
|
||||
{
|
||||
return (ptr >= region) && (ptr < (region + region_size));
|
||||
}
|
||||
|
||||
bool IsInSpace(u8* ptr) const { return (ptr >= region) && (ptr < (region + region_size)); }
|
||||
// Cannot currently be undone. Will write protect the entire code region.
|
||||
// Start over if you need to change the code (call FreeCodeSpace(), AllocCodeSpace()).
|
||||
void WriteProtect()
|
||||
{
|
||||
WriteProtectMemory(region, region_size, true);
|
||||
}
|
||||
|
||||
void ResetCodePtr()
|
||||
{
|
||||
T::SetCodePtr(region);
|
||||
}
|
||||
|
||||
void WriteProtect() { WriteProtectMemory(region, region_size, true); }
|
||||
void ResetCodePtr() { T::SetCodePtr(region); }
|
||||
size_t GetSpaceLeft() const
|
||||
{
|
||||
return (m_has_child ? parent_region_size : region_size) - (T::GetCodePtr() - region);
|
||||
|
|
|
@ -7,22 +7,14 @@
|
|||
|
||||
namespace ColorUtil
|
||||
{
|
||||
static const int s_lut5to8[] = {0x00, 0x08, 0x10, 0x18, 0x20, 0x29, 0x31, 0x39, 0x41, 0x4A, 0x52,
|
||||
0x5A, 0x62, 0x6A, 0x73, 0x7B, 0x83, 0x8B, 0x94, 0x9C, 0xA4, 0xAC,
|
||||
0xB4, 0xBD, 0xC5, 0xCD, 0xD5, 0xDE, 0xE6, 0xEE, 0xF6, 0xFF};
|
||||
|
||||
static const int s_lut5to8[] = {
|
||||
0x00,0x08,0x10,0x18,0x20,0x29,0x31,0x39,
|
||||
0x41,0x4A,0x52,0x5A,0x62,0x6A,0x73,0x7B,
|
||||
0x83,0x8B,0x94,0x9C,0xA4,0xAC,0xB4,0xBD,
|
||||
0xC5,0xCD,0xD5,0xDE,0xE6,0xEE,0xF6,0xFF
|
||||
};
|
||||
static const int s_lut4to8[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
|
||||
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF};
|
||||
|
||||
static const int s_lut4to8[] = {
|
||||
0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,
|
||||
0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF
|
||||
};
|
||||
|
||||
static const int s_lut3to8[] = {
|
||||
0x00,0x24,0x48,0x6D,0x91,0xB6,0xDA,0xFF
|
||||
};
|
||||
static const int s_lut3to8[] = {0x00, 0x24, 0x48, 0x6D, 0x91, 0xB6, 0xDA, 0xFF};
|
||||
|
||||
static u32 Decode5A3(u16 val)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
namespace ColorUtil
|
||||
{
|
||||
|
||||
void decode5A3image(u32* dst, u16* src, int width, int height);
|
||||
void decodeCI8image(u32* dst, u8* src, u16* pal, int width, int height);
|
||||
|
||||
|
|
|
@ -47,11 +47,18 @@ extern const std::string scm_distributor_str;
|
|||
#if defined(_DEBUG)
|
||||
#include <crtdbg.h>
|
||||
#undef CHECK_HEAP_INTEGRITY
|
||||
#define CHECK_HEAP_INTEGRITY() {if (!_CrtCheckMemory()) PanicAlert("memory corruption detected. see log.");}
|
||||
#define CHECK_HEAP_INTEGRITY() \
|
||||
{ \
|
||||
if (!_CrtCheckMemory()) \
|
||||
PanicAlert("memory corruption detected. see log."); \
|
||||
}
|
||||
// If you want to see how much a pain in the ass singletons are, for example:
|
||||
// {614} normal block at 0x030C5310, 188 bytes long.
|
||||
// Data: <Master Log > 4D 61 73 74 65 72 20 4C 6F 67 00 00 00 00 00 00
|
||||
struct CrtDebugBreak { CrtDebugBreak(int spot) { _CrtSetBreakAlloc(spot); } };
|
||||
struct CrtDebugBreak
|
||||
{
|
||||
CrtDebugBreak(int spot) { _CrtSetBreakAlloc(spot); }
|
||||
};
|
||||
// CrtDebugBreak breakAt(614);
|
||||
#endif // end DEBUG/FAST
|
||||
|
||||
|
|
|
@ -36,7 +36,10 @@ constexpr size_t ArraySize(T (&arr)[N])
|
|||
#endif
|
||||
|
||||
// go to debugger mode
|
||||
#define Crash() { __builtin_trap(); }
|
||||
#define Crash() \
|
||||
{ \
|
||||
__builtin_trap(); \
|
||||
}
|
||||
|
||||
// GCC 4.8 defines all the rotate functions now
|
||||
// Small issue with GCC's lrotl/lrotr intrinsics is they are still 32bit while we require 64bit
|
||||
|
@ -44,14 +47,16 @@ constexpr size_t ArraySize(T (&arr)[N])
|
|||
inline u32 _rotl(u32 x, int shift)
|
||||
{
|
||||
shift &= 31;
|
||||
if (!shift) return x;
|
||||
if (!shift)
|
||||
return x;
|
||||
return (x << shift) | (x >> (32 - shift));
|
||||
}
|
||||
|
||||
inline u32 _rotr(u32 x, int shift)
|
||||
{
|
||||
shift &= 31;
|
||||
if (!shift) return x;
|
||||
if (!shift)
|
||||
return x;
|
||||
return (x >> shift) | (x << (32 - shift));
|
||||
}
|
||||
#endif
|
||||
|
@ -83,11 +88,13 @@ inline u64 _rotr64(u64 x, unsigned int shift)
|
|||
#define fstat64 _fstat64
|
||||
#define fileno _fileno
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
__declspec(dllimport) void __stdcall DebugBreak(void);
|
||||
}
|
||||
#define Crash() {DebugBreak();}
|
||||
#define Crash() \
|
||||
{ \
|
||||
DebugBreak(); \
|
||||
}
|
||||
#endif // WIN32 ndef
|
||||
|
||||
// Generic function to get last error message.
|
||||
|
@ -98,8 +105,14 @@ std::string GetLastErrorMsg();
|
|||
|
||||
namespace Common
|
||||
{
|
||||
inline u8 swap8(u8 _data) {return _data;}
|
||||
inline u32 swap24(const u8* _data) {return (_data[0] << 16) | (_data[1] << 8) | _data[2];}
|
||||
inline u8 swap8(u8 _data)
|
||||
{
|
||||
return _data;
|
||||
}
|
||||
inline u32 swap24(const u8* _data)
|
||||
{
|
||||
return (_data[0] << 16) | (_data[1] << 8) | _data[2];
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
#undef swap16
|
||||
|
@ -108,43 +121,95 @@ inline u32 swap24(const u8* _data) {return (_data[0] << 16) | (_data[1] << 8) |
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
inline u16 swap16(u16 _data) {return _byteswap_ushort(_data);}
|
||||
inline u32 swap32(u32 _data) {return _byteswap_ulong (_data);}
|
||||
inline u64 swap64(u64 _data) {return _byteswap_uint64(_data);}
|
||||
inline u16 swap16(u16 _data)
|
||||
{
|
||||
return _byteswap_ushort(_data);
|
||||
}
|
||||
inline u32 swap32(u32 _data)
|
||||
{
|
||||
return _byteswap_ulong(_data);
|
||||
}
|
||||
inline u64 swap64(u64 _data)
|
||||
{
|
||||
return _byteswap_uint64(_data);
|
||||
}
|
||||
#elif __linux__ && !(ANDROID && _M_ARM_64)
|
||||
// Android NDK r10c has broken builtin byte swap routines
|
||||
// Disabled for now.
|
||||
inline u16 swap16(u16 _data) {return bswap_16(_data);}
|
||||
inline u32 swap32(u32 _data) {return bswap_32(_data);}
|
||||
inline u64 swap64(u64 _data) {return bswap_64(_data);}
|
||||
inline u16 swap16(u16 _data)
|
||||
{
|
||||
return bswap_16(_data);
|
||||
}
|
||||
inline u32 swap32(u32 _data)
|
||||
{
|
||||
return bswap_32(_data);
|
||||
}
|
||||
inline u64 swap64(u64 _data)
|
||||
{
|
||||
return bswap_64(_data);
|
||||
}
|
||||
#elif __APPLE__
|
||||
inline __attribute__((always_inline)) u16 swap16(u16 _data)
|
||||
{return OSSwapInt16(_data);}
|
||||
{
|
||||
return OSSwapInt16(_data);
|
||||
}
|
||||
inline __attribute__((always_inline)) u32 swap32(u32 _data)
|
||||
{return OSSwapInt32(_data);}
|
||||
{
|
||||
return OSSwapInt32(_data);
|
||||
}
|
||||
inline __attribute__((always_inline)) u64 swap64(u64 _data)
|
||||
{return OSSwapInt64(_data);}
|
||||
{
|
||||
return OSSwapInt64(_data);
|
||||
}
|
||||
#elif __FreeBSD__
|
||||
inline u16 swap16(u16 _data) {return bswap16(_data);}
|
||||
inline u32 swap32(u32 _data) {return bswap32(_data);}
|
||||
inline u64 swap64(u64 _data) {return bswap64(_data);}
|
||||
inline u16 swap16(u16 _data)
|
||||
{
|
||||
return bswap16(_data);
|
||||
}
|
||||
inline u32 swap32(u32 _data)
|
||||
{
|
||||
return bswap32(_data);
|
||||
}
|
||||
inline u64 swap64(u64 _data)
|
||||
{
|
||||
return bswap64(_data);
|
||||
}
|
||||
#else
|
||||
// Slow generic implementation.
|
||||
inline u16 swap16(u16 data) {return (data >> 8) | (data << 8);}
|
||||
inline u32 swap32(u32 data) {return (swap16(data) << 16) | swap16(data >> 16);}
|
||||
inline u64 swap64(u64 data) {return ((u64)swap32(data) << 32) | swap32(data >> 32);}
|
||||
inline u16 swap16(u16 data)
|
||||
{
|
||||
return (data >> 8) | (data << 8);
|
||||
}
|
||||
inline u32 swap32(u32 data)
|
||||
{
|
||||
return (swap16(data) << 16) | swap16(data >> 16);
|
||||
}
|
||||
inline u64 swap64(u64 data)
|
||||
{
|
||||
return ((u64)swap32(data) << 32) | swap32(data >> 32);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline u16 swap16(const u8* _pData) {return swap16(*(const u16*)_pData);}
|
||||
inline u32 swap32(const u8* _pData) {return swap32(*(const u32*)_pData);}
|
||||
inline u64 swap64(const u8* _pData) {return swap64(*(const u64*)_pData);}
|
||||
inline u16 swap16(const u8* _pData)
|
||||
{
|
||||
return swap16(*(const u16*)_pData);
|
||||
}
|
||||
inline u32 swap32(const u8* _pData)
|
||||
{
|
||||
return swap32(*(const u32*)_pData);
|
||||
}
|
||||
inline u64 swap64(const u8* _pData)
|
||||
{
|
||||
return swap64(*(const u64*)_pData);
|
||||
}
|
||||
|
||||
template <int count>
|
||||
void swap(u8*);
|
||||
|
||||
template <>
|
||||
inline void swap<1>(u8* data)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void swap<2>(u8* data)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
// This header contains type definitions that are shared between the Dolphin core and
|
||||
// other parts of the code. Any definitions that are only used by the core should be
|
||||
// placed in "Common.h" instead.
|
||||
|
|
|
@ -22,7 +22,8 @@ int bn_compare(const u8* a, const u8* b, u32 n)
|
|||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if (a[i] < b[i])
|
||||
return -1;
|
||||
if (a[i] > b[i])
|
||||
|
@ -39,7 +40,8 @@ void bn_sub_modulus(u8* a, const u8* N, u32 n)
|
|||
u8 c;
|
||||
|
||||
c = 0;
|
||||
for (i = n - 1; i < n; i--) {
|
||||
for (i = n - 1; i < n; i--)
|
||||
{
|
||||
dig = N[i] + c;
|
||||
c = (a[i] < dig);
|
||||
a[i] -= dig;
|
||||
|
@ -53,7 +55,8 @@ void bn_add(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
|
|||
u8 c;
|
||||
|
||||
c = 0;
|
||||
for (i = n - 1; i < n; i--) {
|
||||
for (i = n - 1; i < n; i--)
|
||||
{
|
||||
dig = a[i] + b[i] + c;
|
||||
c = (dig >= 0x100);
|
||||
d[i] = dig;
|
||||
|
@ -74,7 +77,8 @@ void bn_mul(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
|
|||
bn_zero(d, n);
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
for (mask = 0x80; mask != 0; mask >>= 1) {
|
||||
for (mask = 0x80; mask != 0; mask >>= 1)
|
||||
{
|
||||
bn_add(d, d, d, N, n);
|
||||
if ((a[i] & mask) != 0)
|
||||
bn_add(d, d, b, N, n);
|
||||
|
@ -90,7 +94,8 @@ void bn_exp(u8* d, const u8* a, const u8* N, u32 n, const u8* e, u32 en)
|
|||
bn_zero(d, n);
|
||||
d[n - 1] = 1;
|
||||
for (i = 0; i < en; i++)
|
||||
for (mask = 0x80; mask != 0; mask >>= 1) {
|
||||
for (mask = 0x80; mask != 0; mask >>= 1)
|
||||
{
|
||||
bn_mul(t, d, d, N, n);
|
||||
if ((e[i] & mask) != 0)
|
||||
bn_mul(d, t, a, N, n);
|
||||
|
|
|
@ -16,21 +16,21 @@
|
|||
#include "Common/Crypto/ec.h"
|
||||
|
||||
// y**2 + x*y = x**3 + x + b
|
||||
UNUSED static const u8 ec_b[30] =
|
||||
{0x00,0x66,0x64,0x7e,0xde,0x6c,0x33,0x2c,0x7f,0x8c,0x09,0x23,0xbb,0x58,0x21
|
||||
,0x3b,0x33,0x3b,0x20,0xe9,0xce,0x42,0x81,0xfe,0x11,0x5f,0x7d,0x8f,0x90,0xad};
|
||||
UNUSED static const u8 ec_b[30] = {0x00, 0x66, 0x64, 0x7e, 0xde, 0x6c, 0x33, 0x2c, 0x7f, 0x8c,
|
||||
0x09, 0x23, 0xbb, 0x58, 0x21, 0x3b, 0x33, 0x3b, 0x20, 0xe9,
|
||||
0xce, 0x42, 0x81, 0xfe, 0x11, 0x5f, 0x7d, 0x8f, 0x90, 0xad};
|
||||
|
||||
// order of the addition group of points
|
||||
static const u8 ec_N[30] =
|
||||
{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
,0x13,0xe9,0x74,0xe7,0x2f,0x8a,0x69,0x22,0x03,0x1d,0x26,0x03,0xcf,0xe0,0xd7};
|
||||
static const u8 ec_N[30] = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xe9, 0x74, 0xe7, 0x2f,
|
||||
0x8a, 0x69, 0x22, 0x03, 0x1d, 0x26, 0x03, 0xcf, 0xe0, 0xd7};
|
||||
|
||||
// base point
|
||||
static const u8 ec_G[60] =
|
||||
{0x00,0xfa,0xc9,0xdf,0xcb,0xac,0x83,0x13,0xbb,0x21,0x39,0xf1,0xbb,0x75,0x5f
|
||||
,0xef,0x65,0xbc,0x39,0x1f,0x8b,0x36,0xf8,0xf8,0xeb,0x73,0x71,0xfd,0x55,0x8b
|
||||
,0x01,0x00,0x6a,0x08,0xa4,0x19,0x03,0x35,0x06,0x78,0xe5,0x85,0x28,0xbe,0xbf
|
||||
,0x8a,0x0b,0xef,0xf8,0x67,0xa7,0xca,0x36,0x71,0x6f,0x7e,0x01,0xf8,0x10,0x52};
|
||||
static const u8 ec_G[60] = {0x00, 0xfa, 0xc9, 0xdf, 0xcb, 0xac, 0x83, 0x13, 0xbb, 0x21, 0x39, 0xf1,
|
||||
0xbb, 0x75, 0x5f, 0xef, 0x65, 0xbc, 0x39, 0x1f, 0x8b, 0x36, 0xf8, 0xf8,
|
||||
0xeb, 0x73, 0x71, 0xfd, 0x55, 0x8b, 0x01, 0x00, 0x6a, 0x08, 0xa4, 0x19,
|
||||
0x03, 0x35, 0x06, 0x78, 0xe5, 0x85, 0x28, 0xbe, 0xbf, 0x8a, 0x0b, 0xef,
|
||||
0xf8, 0x67, 0xa7, 0xca, 0x36, 0x71, 0x6f, 0x7e, 0x01, 0xf8, 0x10, 0x52};
|
||||
|
||||
static void elt_copy(u8* d, const u8* a)
|
||||
{
|
||||
|
@ -69,7 +69,8 @@ static void elt_mul_x(u8* d, const u8* a)
|
|||
carry = a[0] & 1;
|
||||
|
||||
x = 0;
|
||||
for (i = 0; i < 29; i++) {
|
||||
for (i = 0; i < 29; i++)
|
||||
{
|
||||
y = a[i + 1];
|
||||
d[i] = x ^ (y >> 7);
|
||||
x = y << 1;
|
||||
|
@ -88,28 +89,31 @@ static void elt_mul(u8* d, const u8* a, const u8* b)
|
|||
|
||||
i = 0;
|
||||
mask = 1;
|
||||
for (n = 0; n < 233; n++) {
|
||||
for (n = 0; n < 233; n++)
|
||||
{
|
||||
elt_mul_x(d, d);
|
||||
|
||||
if ((a[i] & mask) != 0)
|
||||
elt_add(d, d, b);
|
||||
|
||||
mask >>= 1;
|
||||
if (mask == 0) {
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 0x80;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const u8 square[16] =
|
||||
{0x00,0x01,0x04,0x05,0x10,0x11,0x14,0x15,0x40,0x41,0x44,0x45,0x50,0x51,0x54,0x55};
|
||||
static const u8 square[16] = {0x00, 0x01, 0x04, 0x05, 0x10, 0x11, 0x14, 0x15,
|
||||
0x40, 0x41, 0x44, 0x45, 0x50, 0x51, 0x54, 0x55};
|
||||
|
||||
static void elt_square_to_wide(u8* d, const u8* a)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 30; i++) {
|
||||
for (i = 0; i < 30; i++)
|
||||
{
|
||||
d[2 * i] = square[a[i] >> 4];
|
||||
d[2 * i + 1] = square[a[i] & 15];
|
||||
}
|
||||
|
@ -120,7 +124,8 @@ static void wide_reduce(u8* d)
|
|||
u32 i;
|
||||
u8 x;
|
||||
|
||||
for (i = 0; i < 30; i++) {
|
||||
for (i = 0; i < 30; i++)
|
||||
{
|
||||
x = d[i];
|
||||
|
||||
d[i + 19] ^= x >> 7;
|
||||
|
@ -155,7 +160,8 @@ static void itoh_tsujii(u8* d, const u8* a, const u8* b, u32 j)
|
|||
u8 t[30];
|
||||
|
||||
elt_copy(t, a);
|
||||
while (j--) {
|
||||
while (j--)
|
||||
{
|
||||
elt_square(d, t);
|
||||
elt_copy(t, d);
|
||||
}
|
||||
|
@ -221,7 +227,8 @@ static void point_double(u8* r, const u8* p)
|
|||
rx = r;
|
||||
ry = r + 30;
|
||||
|
||||
if (elt_is_zero(px)) {
|
||||
if (elt_is_zero(px))
|
||||
{
|
||||
elt_zero(rx);
|
||||
elt_zero(ry);
|
||||
|
||||
|
@ -256,13 +263,15 @@ static void point_add(u8* r, const u8* p, const u8* q)
|
|||
rx = r;
|
||||
ry = r + 30;
|
||||
|
||||
if (point_is_zero(p)) {
|
||||
if (point_is_zero(p))
|
||||
{
|
||||
elt_copy(rx, qx);
|
||||
elt_copy(ry, qy);
|
||||
return;
|
||||
}
|
||||
|
||||
if (point_is_zero(q)) {
|
||||
if (point_is_zero(q))
|
||||
{
|
||||
elt_copy(rx, px);
|
||||
elt_copy(ry, py);
|
||||
return;
|
||||
|
@ -270,11 +279,13 @@ static void point_add(u8* r, const u8* p, const u8* q)
|
|||
|
||||
elt_add(u, px, qx);
|
||||
|
||||
if (elt_is_zero(u)) {
|
||||
if (elt_is_zero(u))
|
||||
{
|
||||
elt_add(u, py, qy);
|
||||
if (elt_is_zero(u))
|
||||
point_double(r, p);
|
||||
else {
|
||||
else
|
||||
{
|
||||
elt_zero(rx);
|
||||
elt_zero(ry);
|
||||
}
|
||||
|
@ -306,7 +317,8 @@ static void point_mul(u8* d, const u8* a, const u8* b) // a is bignum
|
|||
elt_zero(d + 30);
|
||||
|
||||
for (i = 0; i < 30; i++)
|
||||
for (mask = 0x80; mask != 0; mask >>= 1) {
|
||||
for (mask = 0x80; mask != 0; mask >>= 1)
|
||||
{
|
||||
point_double(d, d);
|
||||
if ((a[i] & mask) != 0)
|
||||
point_add(d, d, b);
|
||||
|
|
|
@ -11,10 +11,13 @@ class DebugInterface
|
|||
{
|
||||
protected:
|
||||
virtual ~DebugInterface() {}
|
||||
|
||||
public:
|
||||
virtual std::string Disassemble(unsigned int /*address*/) { return "NODEBUGGER"; }
|
||||
virtual void GetRawMemoryString(int /*memory*/, unsigned int /*address*/, char* dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
||||
virtual void GetRawMemoryString(int /*memory*/, unsigned int /*address*/, char* dest,
|
||||
int /*max_size*/)
|
||||
{
|
||||
strcpy(dest, "NODEBUGGER");
|
||||
}
|
||||
virtual int GetInstructionSize(int /*instruction*/) { return 1; }
|
||||
virtual bool IsAlive() { return true; }
|
||||
virtual bool IsBreakpoint(unsigned int /*address*/) { return false; }
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
namespace ENetUtil
|
||||
{
|
||||
|
||||
void WakeupThread(ENetHost* host)
|
||||
{
|
||||
// Send ourselves a spurious message. This is hackier than it should be.
|
||||
|
@ -37,6 +36,4 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
namespace ENetUtil
|
||||
{
|
||||
|
||||
void WakeupThread(ENetHost* host);
|
||||
int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event);
|
||||
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
#include "Common/Flag.h"
|
||||
|
||||
namespace Common {
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class Event final
|
||||
{
|
||||
public:
|
||||
|
@ -52,8 +52,7 @@ public:
|
|||
return true;
|
||||
|
||||
std::unique_lock<std::mutex> lk(m_mutex);
|
||||
bool signaled = m_condvar.wait_for(lk, rel_time,
|
||||
[&]{ return m_flag.TestAndClear(); });
|
||||
bool signaled = m_condvar.wait_for(lk, rel_time, [&] { return m_flag.TestAndClear(); });
|
||||
|
||||
return signaled;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@ namespace FPURoundMode
|
|||
{
|
||||
// TODO: MSVC currently produces broken code:
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/828892/vc-2013-miscompilation-with-enums-and-bit-fields
|
||||
// Once that is fixed, change types in SetRoundMode(), SetSIMDMode(), and in UReg_FPSCR to 'RoundMode'.
|
||||
// Once that is fixed, change types in SetRoundMode(), SetSIMDMode(), and in UReg_FPSCR to
|
||||
// 'RoundMode'.
|
||||
|
||||
enum RoundMode
|
||||
{
|
||||
|
|
|
@ -15,16 +15,11 @@
|
|||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
template <typename T, bool NeedSize = true>
|
||||
class FifoQueue
|
||||
{
|
||||
public:
|
||||
FifoQueue() : m_size(0)
|
||||
{
|
||||
m_write_ptr = m_read_ptr = new ElementPtr();
|
||||
}
|
||||
|
||||
FifoQueue() : m_size(0) { m_write_ptr = m_read_ptr = new ElementPtr(); }
|
||||
~FifoQueue()
|
||||
{
|
||||
// this will empty out the whole queue
|
||||
|
@ -37,16 +32,8 @@ public:
|
|||
return m_size.load();
|
||||
}
|
||||
|
||||
bool Empty() const
|
||||
{
|
||||
return !m_read_ptr->next.load();
|
||||
}
|
||||
|
||||
T& Front() const
|
||||
{
|
||||
return m_read_ptr->current;
|
||||
}
|
||||
|
||||
bool Empty() const { return !m_read_ptr->next.load(); }
|
||||
T& Front() const { return m_read_ptr->current; }
|
||||
template <typename Arg>
|
||||
void Push(Arg&& t)
|
||||
{
|
||||
|
@ -104,7 +91,6 @@ private:
|
|||
{
|
||||
public:
|
||||
ElementPtr() : next(nullptr) {}
|
||||
|
||||
~ElementPtr()
|
||||
{
|
||||
ElementPtr* next_ptr = next.load();
|
||||
|
@ -121,5 +107,4 @@ private:
|
|||
ElementPtr* m_read_ptr;
|
||||
std::atomic<u32> m_size;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#include "Common/FileSearch.h"
|
||||
#include "Common/FileUtil.h"
|
||||
|
||||
static std::vector<std::string> FileSearchWithTest(const std::vector<std::string>& directories, bool recursive, std::function<bool(const File::FSTEntry &)> callback)
|
||||
static std::vector<std::string>
|
||||
FileSearchWithTest(const std::vector<std::string>& directories, bool recursive,
|
||||
std::function<bool(const File::FSTEntry&)> callback)
|
||||
{
|
||||
std::vector<std::string> result;
|
||||
for (const std::string& directory : directories)
|
||||
|
@ -32,7 +34,8 @@ static std::vector<std::string> FileSearchWithTest(const std::vector<std::string
|
|||
return result;
|
||||
}
|
||||
|
||||
std::vector<std::string> DoFileSearch(const std::vector<std::string>& exts, const std::vector<std::string>& directories, bool recursive)
|
||||
std::vector<std::string> DoFileSearch(const std::vector<std::string>& exts,
|
||||
const std::vector<std::string>& directories, bool recursive)
|
||||
{
|
||||
bool accept_all = std::find(exts.begin(), exts.end(), "") != exts.end();
|
||||
return FileSearchWithTest(directories, recursive, [&](const File::FSTEntry& entry) {
|
||||
|
@ -41,15 +44,16 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& exts, cons
|
|||
std::string name = entry.virtualName;
|
||||
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
return std::any_of(exts.begin(), exts.end(), [&](const std::string& ext) {
|
||||
return name.length() >= ext.length() && name.compare(name.length() - ext.length(), ext.length(), ext) == 0;
|
||||
return name.length() >= ext.length() &&
|
||||
name.compare(name.length() - ext.length(), ext.length(), ext) == 0;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Result includes the passed directories themselves as well as their subdirectories.
|
||||
std::vector<std::string> FindSubdirectories(const std::vector<std::string>& directories, bool recursive)
|
||||
std::vector<std::string> FindSubdirectories(const std::vector<std::string>& directories,
|
||||
bool recursive)
|
||||
{
|
||||
return FileSearchWithTest(directories, true, [&](const File::FSTEntry& entry) {
|
||||
return entry.isDirectory;
|
||||
});
|
||||
return FileSearchWithTest(directories, true,
|
||||
[&](const File::FSTEntry& entry) { return entry.isDirectory; });
|
||||
}
|
||||
|
|
|
@ -7,5 +7,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
std::vector<std::string> DoFileSearch(const std::vector<std::string>& exts, const std::vector<std::string>& directories, bool recursive = false);
|
||||
std::vector<std::string> FindSubdirectories(const std::vector<std::string>& directories, bool recursive);
|
||||
std::vector<std::string> DoFileSearch(const std::vector<std::string>& exts,
|
||||
const std::vector<std::string>& directories,
|
||||
bool recursive = false);
|
||||
std::vector<std::string> FindSubdirectories(const std::vector<std::string>& directories,
|
||||
bool recursive);
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sys/stat.h>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
|
@ -55,7 +55,6 @@
|
|||
// REMEMBER: strdup considered harmful!
|
||||
namespace File
|
||||
{
|
||||
|
||||
// Remove any ending forward slashes from directory paths
|
||||
// Modifies argument.
|
||||
static void StripTailDirSlashes(std::string& fname)
|
||||
|
@ -100,8 +99,8 @@ bool IsDirectory(const std::string& filename)
|
|||
|
||||
if (result < 0)
|
||||
{
|
||||
WARN_LOG(COMMON, "IsDirectory: stat failed on %s: %s",
|
||||
filename.c_str(), GetLastErrorMsg().c_str());
|
||||
WARN_LOG(COMMON, "IsDirectory: stat failed on %s: %s", filename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -132,15 +131,15 @@ bool Delete(const std::string& filename)
|
|||
#ifdef _WIN32
|
||||
if (!DeleteFile(UTF8ToTStr(filename).c_str()))
|
||||
{
|
||||
WARN_LOG(COMMON, "Delete: DeleteFile failed on %s: %s",
|
||||
filename.c_str(), GetLastErrorMsg().c_str());
|
||||
WARN_LOG(COMMON, "Delete: DeleteFile failed on %s: %s", filename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
if (unlink(filename.c_str()) == -1)
|
||||
{
|
||||
WARN_LOG(COMMON, "Delete: unlink failed on %s: %s",
|
||||
filename.c_str(), GetLastErrorMsg().c_str());
|
||||
WARN_LOG(COMMON, "Delete: unlink failed on %s: %s", filename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -218,7 +217,6 @@ bool CreateFullPath(const std::string& fullPath)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Deletes a directory filename, returns true on success
|
||||
bool DeleteDir(const std::string& filename)
|
||||
{
|
||||
|
@ -246,14 +244,14 @@ bool DeleteDir(const std::string& filename)
|
|||
// renames file srcFilename to destFilename, returns true on success
|
||||
bool Rename(const std::string& srcFilename, const std::string& destFilename)
|
||||
{
|
||||
INFO_LOG(COMMON, "Rename: %s --> %s",
|
||||
srcFilename.c_str(), destFilename.c_str());
|
||||
INFO_LOG(COMMON, "Rename: %s --> %s", srcFilename.c_str(), destFilename.c_str());
|
||||
#ifdef _WIN32
|
||||
auto sf = UTF8ToTStr(srcFilename);
|
||||
auto df = UTF8ToTStr(destFilename);
|
||||
// The Internet seems torn about whether ReplaceFile is atomic or not.
|
||||
// Hopefully it's atomic enough...
|
||||
if (ReplaceFile(df.c_str(), sf.c_str(), nullptr, REPLACEFILE_IGNORE_MERGE_ERRORS, nullptr, nullptr))
|
||||
if (ReplaceFile(df.c_str(), sf.c_str(), nullptr, REPLACEFILE_IGNORE_MERGE_ERRORS, nullptr,
|
||||
nullptr))
|
||||
return true;
|
||||
// Might have failed because the destination doesn't exist.
|
||||
if (GetLastError() == ERROR_FILE_NOT_FOUND)
|
||||
|
@ -265,8 +263,8 @@ bool Rename(const std::string& srcFilename, const std::string& destFilename)
|
|||
if (rename(srcFilename.c_str(), destFilename.c_str()) == 0)
|
||||
return true;
|
||||
#endif
|
||||
ERROR_LOG(COMMON, "Rename: failed %s --> %s: %s",
|
||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "Rename: failed %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -308,14 +306,13 @@ bool RenameSync(const std::string& srcFilename, const std::string& destFilename)
|
|||
// copies file srcFilename to destFilename, returns true on success
|
||||
bool Copy(const std::string& srcFilename, const std::string& destFilename)
|
||||
{
|
||||
INFO_LOG(COMMON, "Copy: %s --> %s",
|
||||
srcFilename.c_str(), destFilename.c_str());
|
||||
INFO_LOG(COMMON, "Copy: %s --> %s", srcFilename.c_str(), destFilename.c_str());
|
||||
#ifdef _WIN32
|
||||
if (CopyFile(UTF8ToTStr(srcFilename).c_str(), UTF8ToTStr(destFilename).c_str(), FALSE))
|
||||
return true;
|
||||
|
||||
ERROR_LOG(COMMON, "Copy: failed %s --> %s: %s",
|
||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "Copy: failed %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
#else
|
||||
|
||||
|
@ -329,8 +326,8 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename)
|
|||
OpenFStream(input, srcFilename, std::ifstream::in | std::ifstream::binary);
|
||||
if (!input.is_open())
|
||||
{
|
||||
ERROR_LOG(COMMON, "Copy: input failed %s --> %s: %s",
|
||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "Copy: input failed %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -339,8 +336,8 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename)
|
|||
|
||||
if (!output.IsOpen())
|
||||
{
|
||||
ERROR_LOG(COMMON, "Copy: output failed %s --> %s: %s",
|
||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "Copy: output failed %s --> %s: %s", srcFilename.c_str(),
|
||||
destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -351,18 +348,16 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename)
|
|||
input.read(buffer, BSIZE);
|
||||
if (!input)
|
||||
{
|
||||
ERROR_LOG(COMMON,
|
||||
"Copy: failed reading from source, %s --> %s: %s",
|
||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "Copy: failed reading from source, %s --> %s: %s", srcFilename.c_str(),
|
||||
destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// write output
|
||||
if (!output.WriteBytes(buffer, BSIZE))
|
||||
{
|
||||
ERROR_LOG(COMMON,
|
||||
"Copy: failed writing to output, %s --> %s: %s",
|
||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "Copy: failed writing to output, %s --> %s: %s", srcFilename.c_str(),
|
||||
destFilename.c_str(), GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -393,13 +388,11 @@ u64 GetSize(const std::string& filename)
|
|||
if (stat64(filename.c_str(), &buf) == 0)
|
||||
#endif
|
||||
{
|
||||
DEBUG_LOG(COMMON, "GetSize: %s: %lld",
|
||||
filename.c_str(), (long long)buf.st_size);
|
||||
DEBUG_LOG(COMMON, "GetSize: %s: %lld", filename.c_str(), (long long)buf.st_size);
|
||||
return buf.st_size;
|
||||
}
|
||||
|
||||
ERROR_LOG(COMMON, "GetSize: Stat failed %s: %s",
|
||||
filename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "GetSize: Stat failed %s: %s", filename.c_str(), GetLastErrorMsg().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -409,8 +402,7 @@ u64 GetSize(const int fd)
|
|||
struct stat64 buf;
|
||||
if (fstat64(fd, &buf) != 0)
|
||||
{
|
||||
ERROR_LOG(COMMON, "GetSize: stat failed %i: %s",
|
||||
fd, GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "GetSize: stat failed %i: %s", fd, GetLastErrorMsg().c_str());
|
||||
return 0;
|
||||
}
|
||||
return buf.st_size;
|
||||
|
@ -423,16 +415,14 @@ u64 GetSize(FILE* f)
|
|||
u64 pos = ftello(f);
|
||||
if (fseeko(f, 0, SEEK_END) != 0)
|
||||
{
|
||||
ERROR_LOG(COMMON, "GetSize: seek failed %p: %s",
|
||||
f, GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", f, GetLastErrorMsg().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
u64 size = ftello(f);
|
||||
if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0))
|
||||
{
|
||||
ERROR_LOG(COMMON, "GetSize: seek failed %p: %s",
|
||||
f, GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", f, GetLastErrorMsg().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -446,15 +436,14 @@ bool CreateEmptyFile(const std::string& filename)
|
|||
|
||||
if (!File::IOFile(filename, "wb"))
|
||||
{
|
||||
ERROR_LOG(COMMON, "CreateEmptyFile: failed %s: %s",
|
||||
filename.c_str(), GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "CreateEmptyFile: failed %s: %s", filename.c_str(),
|
||||
GetLastErrorMsg().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Scans the directory tree gets, starting from _Directory and adds the
|
||||
// results into parentEntry. Returns the number of files+directories found
|
||||
FSTEntry ScanDirectoryTree(const std::string& directory, bool recursive)
|
||||
|
@ -525,7 +514,6 @@ FSTEntry ScanDirectoryTree(const std::string& directory, bool recursive)
|
|||
return parent_entry;
|
||||
}
|
||||
|
||||
|
||||
// Deletes the given directory and anything under it. Returns true on success.
|
||||
bool DeleteDirRecursively(const std::string& directory)
|
||||
{
|
||||
|
@ -561,8 +549,7 @@ bool DeleteDirRecursively(const std::string& directory)
|
|||
|
||||
// check for "." and ".."
|
||||
if (((virtualName[0] == '.') && (virtualName[1] == '\0')) ||
|
||||
((virtualName[0] == '.') && (virtualName[1] == '.') &&
|
||||
(virtualName[2] == '\0')))
|
||||
((virtualName[0] == '.') && (virtualName[1] == '.') && (virtualName[2] == '\0')))
|
||||
continue;
|
||||
|
||||
std::string newPath = directory + DIR_SEP_CHR + virtualName;
|
||||
|
@ -599,9 +586,12 @@ bool DeleteDirRecursively(const std::string& directory)
|
|||
// Create directory and copy contents (does not overwrite existing files)
|
||||
void CopyDir(const std::string& source_path, const std::string& dest_path)
|
||||
{
|
||||
if (source_path == dest_path) return;
|
||||
if (!File::Exists(source_path)) return;
|
||||
if (!File::Exists(dest_path)) File::CreateFullPath(dest_path);
|
||||
if (source_path == dest_path)
|
||||
return;
|
||||
if (!File::Exists(source_path))
|
||||
return;
|
||||
if (!File::Exists(dest_path))
|
||||
File::CreateFullPath(dest_path);
|
||||
|
||||
#ifdef _WIN32
|
||||
WIN32_FIND_DATA ffd;
|
||||
|
@ -619,7 +609,8 @@ void CopyDir(const std::string& source_path, const std::string& dest_path)
|
|||
#else
|
||||
struct dirent dirent, *result = nullptr;
|
||||
DIR* dirp = opendir(source_path.c_str());
|
||||
if (!dirp) return;
|
||||
if (!dirp)
|
||||
return;
|
||||
|
||||
while (!readdir_r(dirp, &dirent, &result) && result)
|
||||
{
|
||||
|
@ -633,10 +624,12 @@ void CopyDir(const std::string& source_path, const std::string& dest_path)
|
|||
std::string dest = dest_path + DIR_SEP + virtualName;
|
||||
if (IsDirectory(source))
|
||||
{
|
||||
if (!File::Exists(dest)) File::CreateFullPath(dest + DIR_SEP);
|
||||
if (!File::Exists(dest))
|
||||
File::CreateFullPath(dest + DIR_SEP);
|
||||
CopyDir(source, dest);
|
||||
}
|
||||
else if (!File::Exists(dest)) File::Copy(source, dest);
|
||||
else if (!File::Exists(dest))
|
||||
File::Copy(source, dest);
|
||||
#ifdef _WIN32
|
||||
} while (FindNextFile(hFind, &ffd) != 0);
|
||||
FindClose(hFind);
|
||||
|
@ -653,8 +646,7 @@ std::string GetCurrentDir()
|
|||
// Get the current working directory (getcwd uses malloc)
|
||||
if (!(dir = __getcwd(nullptr, 0)))
|
||||
{
|
||||
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s",
|
||||
GetLastErrorMsg().c_str());
|
||||
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", GetLastErrorMsg().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
std::string strDir = dir;
|
||||
|
@ -808,8 +800,10 @@ static void RebuildUserDirectories(unsigned int dir_index)
|
|||
s_user_paths[F_GCSRAM_IDX] = s_user_paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
|
||||
s_user_paths[D_MEMORYWATCHER_IDX] = s_user_paths[D_USER_IDX] + MEMORYWATCHER_DIR DIR_SEP;
|
||||
s_user_paths[F_MEMORYWATCHERLOCATIONS_IDX] = s_user_paths[D_MEMORYWATCHER_IDX] + MEMORYWATCHER_LOCATIONS;
|
||||
s_user_paths[F_MEMORYWATCHERSOCKET_IDX] = s_user_paths[D_MEMORYWATCHER_IDX] + MEMORYWATCHER_SOCKET;
|
||||
s_user_paths[F_MEMORYWATCHERLOCATIONS_IDX] =
|
||||
s_user_paths[D_MEMORYWATCHER_IDX] + MEMORYWATCHER_LOCATIONS;
|
||||
s_user_paths[F_MEMORYWATCHERSOCKET_IDX] =
|
||||
s_user_paths[D_MEMORYWATCHER_IDX] + MEMORYWATCHER_SOCKET;
|
||||
|
||||
// The shader cache has moved to the cache directory, so remove the old one.
|
||||
// TODO: remove that someday.
|
||||
|
@ -900,16 +894,15 @@ bool ReadFileToString(const std::string& filename, std::string& str)
|
|||
return retval;
|
||||
}
|
||||
|
||||
IOFile::IOFile()
|
||||
: m_file(nullptr), m_good(true)
|
||||
{}
|
||||
IOFile::IOFile() : m_file(nullptr), m_good(true)
|
||||
{
|
||||
}
|
||||
|
||||
IOFile::IOFile(std::FILE* file)
|
||||
: m_file(file), m_good(true)
|
||||
{}
|
||||
IOFile::IOFile(std::FILE* file) : m_file(file), m_good(true)
|
||||
{
|
||||
}
|
||||
|
||||
IOFile::IOFile(const std::string& filename, const char openmode[])
|
||||
: m_file(nullptr), m_good(true)
|
||||
IOFile::IOFile(const std::string& filename, const char openmode[]) : m_file(nullptr), m_good(true)
|
||||
{
|
||||
Open(filename, openmode);
|
||||
}
|
||||
|
@ -919,8 +912,7 @@ IOFile::~IOFile()
|
|||
Close();
|
||||
}
|
||||
|
||||
IOFile::IOFile(IOFile&& other)
|
||||
: m_file(nullptr), m_good(true)
|
||||
IOFile::IOFile(IOFile&& other) : m_file(nullptr), m_good(true)
|
||||
{
|
||||
Swap(other);
|
||||
}
|
||||
|
@ -1007,7 +999,8 @@ bool IOFile::Flush()
|
|||
|
||||
bool IOFile::Resize(u64 size)
|
||||
{
|
||||
if (!IsOpen() || 0 !=
|
||||
if (!IsOpen() ||
|
||||
0 !=
|
||||
#ifdef _WIN32
|
||||
// ector: _chsize sucks, not 64-bit safe
|
||||
// F|RES: changed to _chsize_s. i think it is 64-bit safe
|
||||
|
|
|
@ -18,13 +18,15 @@
|
|||
#endif
|
||||
|
||||
// User directory indices for GetUserPath
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
D_USER_IDX,
|
||||
D_GCUSER_IDX,
|
||||
D_WIIROOT_IDX, // always points to User/Wii or global user-configured directory
|
||||
D_SESSION_WIIROOT_IDX, // may point to minimal temporary directory for determinism
|
||||
D_CONFIG_IDX, // global settings
|
||||
D_GAMESETTINGS_IDX, // user-specified settings which override both the global and the default settings (per game)
|
||||
D_GAMESETTINGS_IDX, // user-specified settings which override both the global and the default
|
||||
// settings (per game)
|
||||
D_MAPS_IDX,
|
||||
D_CACHE_IDX,
|
||||
D_SHADERCACHE_IDX,
|
||||
|
@ -58,7 +60,6 @@ enum {
|
|||
|
||||
namespace File
|
||||
{
|
||||
|
||||
// FileSystem tree node/
|
||||
struct FSTEntry
|
||||
{
|
||||
|
@ -206,15 +207,12 @@ public:
|
|||
}
|
||||
|
||||
bool IsOpen() const { return nullptr != m_file; }
|
||||
|
||||
// m_good is set to false when a read, write or other function fails
|
||||
bool IsGood() const { return m_good; }
|
||||
operator void*() { return m_good ? m_file : nullptr; }
|
||||
|
||||
std::FILE* ReleaseHandle();
|
||||
|
||||
std::FILE* GetHandle() { return m_file; }
|
||||
|
||||
void SetHandle(std::FILE* file);
|
||||
|
||||
bool Seek(s64 off, int origin);
|
||||
|
@ -224,10 +222,15 @@ public:
|
|||
bool Flush();
|
||||
|
||||
// clear error state
|
||||
void Clear() { m_good = true; std::clearerr(m_file); }
|
||||
void Clear()
|
||||
{
|
||||
m_good = true;
|
||||
std::clearerr(m_file);
|
||||
}
|
||||
|
||||
std::FILE* m_file;
|
||||
bool m_good;
|
||||
|
||||
private:
|
||||
IOFile(IOFile&);
|
||||
IOFile& operator=(IOFile& other);
|
||||
|
|
|
@ -23,7 +23,6 @@ class FixedSizeQueue
|
|||
|
||||
// Make copy constructor private for now.
|
||||
FixedSizeQueue(FixedSizeQueue& other) {}
|
||||
|
||||
public:
|
||||
FixedSizeQueue()
|
||||
{
|
||||
|
@ -31,11 +30,7 @@ public:
|
|||
clear();
|
||||
}
|
||||
|
||||
~FixedSizeQueue()
|
||||
{
|
||||
delete[] storage;
|
||||
}
|
||||
|
||||
~FixedSizeQueue() { delete[] storage; }
|
||||
void clear()
|
||||
{
|
||||
head = 0;
|
||||
|
@ -69,9 +64,5 @@ public:
|
|||
|
||||
T& front() { return storage[head]; }
|
||||
const T& front() const { return storage[head]; }
|
||||
|
||||
size_t size() const
|
||||
{
|
||||
return count;
|
||||
}
|
||||
size_t size() const { return count; }
|
||||
};
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
#include <atomic>
|
||||
|
||||
namespace Common {
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class Flag final
|
||||
{
|
||||
public:
|
||||
|
@ -28,33 +28,16 @@ public:
|
|||
// object - it should be made explicit that a flag is *not* a normal
|
||||
// variable.
|
||||
explicit Flag(bool initial_value = false) : m_val(initial_value) {}
|
||||
|
||||
void Set(bool val = true)
|
||||
{
|
||||
m_val.store(val);
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
Set(false);
|
||||
}
|
||||
|
||||
bool IsSet() const
|
||||
{
|
||||
return m_val.load();
|
||||
}
|
||||
|
||||
void Set(bool val = true) { m_val.store(val); }
|
||||
void Clear() { Set(false); }
|
||||
bool IsSet() const { return m_val.load(); }
|
||||
bool TestAndSet(bool val = true)
|
||||
{
|
||||
bool expected = !val;
|
||||
return m_val.compare_exchange_strong(expected, val);
|
||||
}
|
||||
|
||||
bool TestAndClear()
|
||||
{
|
||||
return TestAndSet(false);
|
||||
}
|
||||
|
||||
bool TestAndClear() { return TestAndSet(false); }
|
||||
private:
|
||||
std::atomic_bool m_val;
|
||||
};
|
||||
|
|
|
@ -24,4 +24,3 @@
|
|||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
|
||||
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void(APIENTRYP PFNDOLRELEASESHADERCOMPILERPROC)(void);
|
||||
typedef void (APIENTRYP PFNDOLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
|
||||
typedef void (APIENTRYP PFNDOLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||
typedef void(APIENTRYP PFNDOLSHADERBINARYPROC)(GLsizei count, const GLuint* shaders,
|
||||
GLenum binaryformat, const void* binary,
|
||||
GLsizei length);
|
||||
typedef void(APIENTRYP PFNDOLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype,
|
||||
GLint* range, GLint* precision);
|
||||
typedef void(APIENTRYP PFNDOLDEPTHRANGEFPROC)(GLfloat n, GLfloat f);
|
||||
typedef void(APIENTRYP PFNDOLCLEARDEPTHFPROC)(GLfloat d);
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
|
||||
#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
|
||||
|
||||
typedef void (APIENTRYP PFNDOLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
|
||||
typedef void(APIENTRYP PFNDOLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber,
|
||||
GLuint index, const GLchar* name);
|
||||
typedef GLint(APIENTRYP PFNDOLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar* name);
|
||||
|
||||
extern PFNDOLBINDFRAGDATALOCATIONINDEXEDPROC dolBindFragDataLocationIndexed;
|
||||
|
|
|
@ -33,8 +33,10 @@
|
|||
#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
|
||||
#define GL_BUFFER_STORAGE_FLAGS 0x8220
|
||||
|
||||
typedef void (APIENTRYP PFNDOLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void(APIENTRYP PFNDOLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void* data,
|
||||
GLbitfield flags);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDBUFFERSTORAGEEXTPROC)(GLuint buffer, GLsizeiptr size,
|
||||
const void* data, GLbitfield flags);
|
||||
|
||||
extern PFNDOLBUFFERSTORAGEPROC dolBufferStorage;
|
||||
|
||||
|
|
|
@ -23,7 +23,12 @@
|
|||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void (APIENTRYP PFNDOLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void(APIENTRYP PFNDOLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, GLint srcLevel,
|
||||
GLint srcX, GLint srcY, GLint srcZ,
|
||||
GLuint dstName, GLenum dstTarget, GLint dstLevel,
|
||||
GLint dstX, GLint dstY, GLint dstZ,
|
||||
GLsizei srcWidth, GLsizei srcHeight,
|
||||
GLsizei srcDepth);
|
||||
|
||||
extern PFNDOLCOPYIMAGESUBDATAPROC dolCopyImageSubData;
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void (APIENTRYP GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
typedef void(APIENTRYP GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity,
|
||||
GLsizei length, const GLchar* message,
|
||||
const void* userParam);
|
||||
#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
|
||||
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
|
||||
#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
|
||||
|
@ -47,10 +49,18 @@ typedef void (APIENTRYP GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLen
|
|||
#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
|
||||
#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
typedef void (APIENTRYP PFNDOLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
typedef void (APIENTRYP PFNDOLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
|
||||
typedef GLuint (APIENTRYP PFNDOLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
typedef void(APIENTRYP PFNDOLDEBUGMESSAGECONTROLARBPROC)(GLenum source, GLenum type,
|
||||
GLenum severity, GLsizei count,
|
||||
const GLuint* ids, GLboolean enabled);
|
||||
typedef void(APIENTRYP PFNDOLDEBUGMESSAGEINSERTARBPROC)(GLenum source, GLenum type, GLuint id,
|
||||
GLenum severity, GLsizei length,
|
||||
const GLchar* buf);
|
||||
typedef void(APIENTRYP PFNDOLDEBUGMESSAGECALLBACKARBPROC)(GLDEBUGPROCARB callback,
|
||||
const void* userParam);
|
||||
typedef GLuint(APIENTRYP PFNDOLGETDEBUGMESSAGELOGARBPROC)(GLuint count, GLsizei bufSize,
|
||||
GLenum* sources, GLenum* types,
|
||||
GLuint* ids, GLenum* severities,
|
||||
GLsizei* lengths, GLchar* messageLog);
|
||||
|
||||
extern PFNDOLDEBUGMESSAGECALLBACKARBPROC dolDebugMessageCallbackARB;
|
||||
extern PFNDOLDEBUGMESSAGECONTROLARBPROC dolDebugMessageControlARB;
|
||||
|
|
|
@ -23,10 +23,21 @@
|
|||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNDOLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNDOLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type,
|
||||
const void* indices, GLint basevertex);
|
||||
typedef void(APIENTRYP PFNDOLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const void* indices,
|
||||
GLint basevertex);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count,
|
||||
GLenum type, const void* indices,
|
||||
GLsizei instancecount,
|
||||
GLint basevertex);
|
||||
typedef void(APIENTRYP PFNDOLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei* count,
|
||||
GLenum type,
|
||||
const void* const* indices,
|
||||
GLsizei drawcount,
|
||||
const GLint* basevertex);
|
||||
|
||||
extern PFNDOLDRAWELEMENTSBASEVERTEXPROC dolDrawElementsBaseVertex;
|
||||
extern PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXPROC dolDrawElementsInstancedBaseVertex;
|
||||
|
|
|
@ -25,24 +25,42 @@
|
|||
|
||||
typedef void(APIENTRYP PFNDOLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
|
||||
typedef void(APIENTRYP PFNDOLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
|
||||
typedef void (APIENTRYP PFNDOLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef void(APIENTRYP PFNDOLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1,
|
||||
GLint srcY1, GLint dstX0, GLint dstY0,
|
||||
GLint dstX1, GLint dstY1, GLbitfield mask,
|
||||
GLenum filter);
|
||||
typedef GLenum(APIENTRYP PFNDOLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
|
||||
typedef void(APIENTRYP PFNDOLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint* framebuffers);
|
||||
typedef void(APIENTRYP PFNDOLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint* renderbuffers);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment,
|
||||
GLenum renderbuffertarget,
|
||||
GLuint renderbuffer);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment,
|
||||
GLenum textarget, GLuint texture,
|
||||
GLint level);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment,
|
||||
GLenum textarget, GLuint texture,
|
||||
GLint level);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment,
|
||||
GLenum textarget, GLuint texture,
|
||||
GLint level, GLint zoffset);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment,
|
||||
GLuint texture, GLint level, GLint layer);
|
||||
typedef void(APIENTRYP PFNDOLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint* framebuffers);
|
||||
typedef void(APIENTRYP PFNDOLGENRENDERBUFFERSPROC)(GLsizei n, GLuint* renderbuffers);
|
||||
typedef void(APIENTRYP PFNDOLGENERATEMIPMAPPROC)(GLenum target);
|
||||
typedef void (APIENTRYP PFNDOLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void(APIENTRYP PFNDOLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target,
|
||||
GLenum attachment,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname,
|
||||
GLint* params);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISFRAMEBUFFERPROC)(GLuint framebuffer);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISRENDERBUFFERPROC)(GLuint renderbuffer);
|
||||
typedef void (APIENTRYP PFNDOLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
|
||||
extern PFNDOLBINDFRAMEBUFFERPROC dolBindFramebuffer;
|
||||
extern PFNDOLBINDRENDERBUFFERPROC dolBindRenderbuffer;
|
||||
|
|
|
@ -28,8 +28,10 @@
|
|||
#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
|
||||
#define GL_PROGRAM_BINARY_FORMATS 0x87FF
|
||||
|
||||
typedef void (APIENTRYP PFNDOLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
typedef void (APIENTRYP PFNDOLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||
typedef void(APIENTRYP PFNDOLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei* length,
|
||||
GLenum* binaryFormat, void* binary);
|
||||
typedef void(APIENTRYP PFNDOLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat,
|
||||
const void* binary, GLsizei length);
|
||||
typedef void(APIENTRYP PFNDOLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value);
|
||||
|
||||
extern PFNDOLGETPROGRAMBINARYPROC dolGetProgramBinary;
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void *(APIENTRYP PFNDOLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (APIENTRYP PFNDOLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
typedef void*(APIENTRYP PFNDOLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length,
|
||||
GLbitfield access);
|
||||
typedef void(APIENTRYP PFNDOLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset,
|
||||
GLsizeiptr length);
|
||||
|
||||
extern PFNDOLFLUSHMAPPEDBUFFERRANGEPROC dolFlushMappedBufferRange;
|
||||
extern PFNDOLMAPBUFFERRANGEPROC dolMapBufferRange;
|
||||
|
|
|
@ -28,15 +28,23 @@ typedef void (APIENTRYP PFNDOLDELETESAMPLERSPROC) (GLsizei count, const GLuint *
|
|||
typedef GLboolean(APIENTRYP PFNDOLISSAMPLERPROC)(GLuint sampler);
|
||||
typedef void(APIENTRYP PFNDOLBINDSAMPLERPROC)(GLuint unit, GLuint sampler);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNDOLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname,
|
||||
const GLint* param);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRYP PFNDOLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
|
||||
typedef void (APIENTRYP PFNDOLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (APIENTRYP PFNDOLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
typedef void (APIENTRYP PFNDOLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNDOLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname,
|
||||
const GLfloat* param);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname,
|
||||
const GLint* param);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname,
|
||||
const GLuint* param);
|
||||
typedef void(APIENTRYP PFNDOLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname,
|
||||
GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname,
|
||||
GLuint* params);
|
||||
|
||||
extern PFNDOLBINDSAMPLERPROC dolBindSampler;
|
||||
extern PFNDOLDELETESAMPLERSPROC dolDeleteSamplers;
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
|
||||
#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
|
||||
|
||||
typedef void (APIENTRY * PFNDOLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
|
||||
typedef void(APIENTRY* PFNDOLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program,
|
||||
GLuint storageBlockIndex,
|
||||
GLuint storageBlockBinding);
|
||||
|
||||
extern PFNDOLSHADERSTORAGEBLOCKBINDINGPROC dolShaderStorageBlockBinding;
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ typedef void (APIENTRYP PFNDOLDELETESYNCPROC) (GLsync sync);
|
|||
typedef GLenum(APIENTRYP PFNDOLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void(APIENTRYP PFNDOLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void(APIENTRYP PFNDOLGETINTEGER64VPROC)(GLenum pname, GLint64* data);
|
||||
typedef void (APIENTRYP PFNDOLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
|
||||
typedef void(APIENTRYP PFNDOLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei bufSize,
|
||||
GLsizei* length, GLint* values);
|
||||
typedef void(APIENTRYP PFNDOLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64* data);
|
||||
|
||||
extern PFNDOLCLIENTWAITSYNCPROC dolClientWaitSync;
|
||||
|
|
|
@ -23,8 +23,14 @@
|
|||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat* val);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask);
|
||||
|
||||
|
|
|
@ -23,8 +23,14 @@
|
|||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void (APIENTRYP PFNDOLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNDOLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth,
|
||||
GLboolean fixedsamplelocations);
|
||||
|
||||
extern PFNDOLTEXSTORAGE2DMULTISAMPLEPROC dolTexStorage2DMultisample;
|
||||
extern PFNDOLTEXSTORAGE3DMULTISAMPLEPROC dolTexStorage3DMultisample;
|
||||
|
|
|
@ -24,15 +24,28 @@
|
|||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void(APIENTRYP PFNDOLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint* data);
|
||||
typedef void (APIENTRYP PFNDOLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer,
|
||||
GLintptr offset, GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
|
||||
typedef GLuint (APIENTRYP PFNDOLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
|
||||
typedef void(APIENTRYP PFNDOLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount,
|
||||
const GLchar* const* uniformNames,
|
||||
GLuint* uniformIndices);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount,
|
||||
const GLuint* uniformIndices, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex,
|
||||
GLsizei bufSize, GLsizei* length,
|
||||
GLchar* uniformName);
|
||||
typedef GLuint(APIENTRYP PFNDOLGETUNIFORMBLOCKINDEXPROC)(GLuint program,
|
||||
const GLchar* uniformBlockName);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program,
|
||||
GLuint uniformBlockIndex,
|
||||
GLsizei bufSize, GLsizei* length,
|
||||
GLchar* uniformBlockName);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex,
|
||||
GLuint uniformBlockBinding);
|
||||
|
||||
extern PFNDOLBINDBUFFERBASEPROC dolBindBufferBase;
|
||||
extern PFNDOLBINDBUFFERRANGEPROC dolBindBufferRange;
|
||||
|
|
|
@ -24,10 +24,12 @@
|
|||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void(APIENTRYP PFNDOLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat* v);
|
||||
typedef void (APIENTRYP PFNDOLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
|
||||
typedef void(APIENTRYP PFNDOLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w,
|
||||
GLfloat h);
|
||||
typedef void(APIENTRYP PFNDOLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat* v);
|
||||
typedef void(APIENTRYP PFNDOLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint* v);
|
||||
typedef void (APIENTRYP PFNDOLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLSCISSORINDEXEDVPROC)(GLuint index, const GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, const GLdouble* v);
|
||||
typedef void(APIENTRYP PFNDOLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,14 +7,14 @@
|
|||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "Common/GL/GLExtensions/AMD_pinned_memory.h"
|
||||
#include "Common/GL/GLExtensions/ARB_ES2_compatibility.h"
|
||||
#include "Common/GL/GLExtensions/ARB_ES3_compatibility.h"
|
||||
#include "Common/GL/GLExtensions/ARB_blend_func_extended.h"
|
||||
#include "Common/GL/GLExtensions/ARB_buffer_storage.h"
|
||||
#include "Common/GL/GLExtensions/ARB_clip_control.h"
|
||||
#include "Common/GL/GLExtensions/ARB_copy_image.h"
|
||||
#include "Common/GL/GLExtensions/ARB_debug_output.h"
|
||||
#include "Common/GL/GLExtensions/ARB_draw_elements_base_vertex.h"
|
||||
#include "Common/GL/GLExtensions/ARB_ES2_compatibility.h"
|
||||
#include "Common/GL/GLExtensions/ARB_ES3_compatibility.h"
|
||||
#include "Common/GL/GLExtensions/ARB_framebuffer_object.h"
|
||||
#include "Common/GL/GLExtensions/ARB_get_program_binary.h"
|
||||
#include "Common/GL/GLExtensions/ARB_map_buffer_range.h"
|
||||
|
@ -29,6 +29,10 @@
|
|||
#include "Common/GL/GLExtensions/ARB_vertex_array_object.h"
|
||||
#include "Common/GL/GLExtensions/ARB_viewport_array.h"
|
||||
#include "Common/GL/GLExtensions/EXT_texture_filter_anisotropic.h"
|
||||
#include "Common/GL/GLExtensions/HP_occlusion_test.h"
|
||||
#include "Common/GL/GLExtensions/KHR_debug.h"
|
||||
#include "Common/GL/GLExtensions/NV_occlusion_query_samples.h"
|
||||
#include "Common/GL/GLExtensions/NV_primitive_restart.h"
|
||||
#include "Common/GL/GLExtensions/gl_1_1.h"
|
||||
#include "Common/GL/GLExtensions/gl_1_2.h"
|
||||
#include "Common/GL/GLExtensions/gl_1_3.h"
|
||||
|
@ -43,10 +47,6 @@
|
|||
#include "Common/GL/GLExtensions/gl_4_3.h"
|
||||
#include "Common/GL/GLExtensions/gl_4_4.h"
|
||||
#include "Common/GL/GLExtensions/gl_4_5.h"
|
||||
#include "Common/GL/GLExtensions/HP_occlusion_test.h"
|
||||
#include "Common/GL/GLExtensions/KHR_debug.h"
|
||||
#include "Common/GL/GLExtensions/NV_occlusion_query_samples.h"
|
||||
#include "Common/GL/GLExtensions/NV_primitive_restart.h"
|
||||
|
||||
namespace GLExtensions
|
||||
{
|
||||
|
|
|
@ -64,18 +64,31 @@
|
|||
#define GL_DEBUG_SEVERITY_LOW 0x9148
|
||||
#define GL_DEBUG_OUTPUT 0x92E0
|
||||
|
||||
typedef void (APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
typedef void(APIENTRYP GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity,
|
||||
GLsizei length, const GLchar* message, const void* userParam);
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const GLvoid *userParam);
|
||||
typedef void (APIENTRYP PFNDOLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
|
||||
typedef void (APIENTRYP PFNDOLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf);
|
||||
typedef GLuint (APIENTRYP PFNDOLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog);
|
||||
typedef void (APIENTRYP PFNDOLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar *label);
|
||||
typedef void (APIENTRYP PFNDOLGETOBJECTPTRLABELPROC) (void* ptr, GLsizei bufSize, GLsizei* length, GLchar *label);
|
||||
typedef void (APIENTRYP PFNDOLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar* label);
|
||||
typedef void(APIENTRYP PFNDOLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback,
|
||||
const GLvoid* userParam);
|
||||
typedef void(APIENTRYP PFNDOLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity,
|
||||
GLsizei count, const GLuint* ids,
|
||||
GLboolean enabled);
|
||||
typedef void(APIENTRYP PFNDOLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id,
|
||||
GLenum severity, GLsizei length,
|
||||
const GLchar* buf);
|
||||
typedef GLuint(APIENTRYP PFNDOLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufsize,
|
||||
GLenum* sources, GLenum* types, GLuint* ids,
|
||||
GLenum* severities, GLsizei* lengths,
|
||||
GLchar* messageLog);
|
||||
typedef void(APIENTRYP PFNDOLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize,
|
||||
GLsizei* length, GLchar* label);
|
||||
typedef void(APIENTRYP PFNDOLGETOBJECTPTRLABELPROC)(void* ptr, GLsizei bufSize, GLsizei* length,
|
||||
GLchar* label);
|
||||
typedef void(APIENTRYP PFNDOLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length,
|
||||
const GLchar* label);
|
||||
typedef void(APIENTRYP PFNDOLOBJECTPTRLABELPROC)(void* ptr, GLsizei length, const GLchar* label);
|
||||
typedef void(APIENTRYP PFNDOLPOPDEBUGGROUPPROC)(void);
|
||||
typedef void (APIENTRYP PFNDOLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar * message);
|
||||
typedef void(APIENTRYP PFNDOLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length,
|
||||
const GLchar* message);
|
||||
|
||||
extern PFNDOLDEBUGMESSAGECALLBACKPROC dolDebugMessageCallback;
|
||||
extern PFNDOLDEBUGMESSAGECONTROLPROC dolDebugMessageControl;
|
||||
|
|
|
@ -579,7 +579,6 @@
|
|||
#define GL_SCISSOR_BIT 0x00080000
|
||||
#define GL_ALL_ATTRIB_BITS 0x000FFFFF
|
||||
|
||||
|
||||
/* OpenGL 1.1 */
|
||||
#define GL_PROXY_TEXTURE_1D 0x8063
|
||||
#define GL_PROXY_TEXTURE_2D 0x8064
|
||||
|
@ -627,10 +626,12 @@
|
|||
#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
|
||||
|
||||
typedef void(APIENTRYP PFNDOLCLEARINDEXPROC)(GLfloat c);
|
||||
typedef void (APIENTRYP PFNDOLCLEARCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
|
||||
typedef void(APIENTRYP PFNDOLCLEARCOLORPROC)(GLclampf red, GLclampf green, GLclampf blue,
|
||||
GLclampf alpha);
|
||||
typedef void(APIENTRYP PFNDOLCLEARPROC)(GLbitfield mask);
|
||||
typedef void(APIENTRYP PFNDOLINDEXMASKPROC)(GLuint mask);
|
||||
typedef void (APIENTRYP PFNDOLCOLORMASKPROC) ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
|
||||
typedef void(APIENTRYP PFNDOLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue,
|
||||
GLboolean alpha);
|
||||
typedef void(APIENTRYP PFNDOLALPHAFUNCPROC)(GLenum func, GLclampf ref);
|
||||
typedef void(APIENTRYP PFNDOLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
|
||||
typedef void(APIENTRYP PFNDOLLOGICOPPROC)(GLenum opcode);
|
||||
|
@ -673,11 +674,14 @@ typedef void (APIENTRYP PFNDOLCLEARDEPTHPROC) ( GLclampd depth );
|
|||
typedef void(APIENTRYP PFNDOLDEPTHFUNCPROC)(GLenum func);
|
||||
typedef void(APIENTRYP PFNDOLDEPTHMASKPROC)(GLboolean flag);
|
||||
typedef void(APIENTRYP PFNDOLDEPTHRANGEPROC)(GLclampd near_val, GLclampd far_val);
|
||||
typedef void (APIENTRYP PFNDOLCLEARACCUMPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
|
||||
typedef void(APIENTRYP PFNDOLCLEARACCUMPROC)(GLfloat red, GLfloat green, GLfloat blue,
|
||||
GLfloat alpha);
|
||||
typedef void(APIENTRYP PFNDOLACCUMPROC)(GLenum op, GLfloat value);
|
||||
typedef void(APIENTRYP PFNDOLMATRIXMODEPROC)(GLenum mode);
|
||||
typedef void (APIENTRYP PFNDOLORTHOPROC) ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
typedef void (APIENTRYP PFNDOLFRUSTUMPROC) ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
typedef void(APIENTRYP PFNDOLORTHOPROC)(GLdouble left, GLdouble right, GLdouble bottom,
|
||||
GLdouble top, GLdouble near_val, GLdouble far_val);
|
||||
typedef void(APIENTRYP PFNDOLFRUSTUMPROC)(GLdouble left, GLdouble right, GLdouble bottom,
|
||||
GLdouble top, GLdouble near_val, GLdouble far_val);
|
||||
typedef void(APIENTRYP PFNDOLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLPUSHMATRIXPROC)(void);
|
||||
typedef void(APIENTRYP PFNDOLPOPMATRIXPROC)(void);
|
||||
|
@ -755,13 +759,15 @@ typedef void (APIENTRYP PFNDOLCOLOR3UBPROC) ( GLubyte red, GLubyte green, GLubyt
|
|||
typedef void(APIENTRYP PFNDOLCOLOR3UIPROC)(GLuint red, GLuint green, GLuint blue);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4BPROC)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
|
||||
typedef void (APIENTRYP PFNDOLCOLOR4DPROC) ( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha );
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4DPROC)(GLdouble red, GLdouble green, GLdouble blue,
|
||||
GLdouble alpha);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4FPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4IPROC)(GLint red, GLint green, GLint blue, GLint alpha);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4SPROC)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4UBPROC)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4UIPROC)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
|
||||
typedef void (APIENTRYP PFNDOLCOLOR4USPROC) ( GLushort red, GLushort green, GLushort blue, GLushort alpha );
|
||||
typedef void(APIENTRYP PFNDOLCOLOR4USPROC)(GLushort red, GLushort green, GLushort blue,
|
||||
GLushort alpha);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR3BVPROC)(const GLbyte* v);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR3DVPROC)(const GLdouble* v);
|
||||
typedef void(APIENTRYP PFNDOLCOLOR3FVPROC)(const GLfloat* v);
|
||||
|
@ -842,17 +848,22 @@ typedef void (APIENTRYP PFNDOLRECTDVPROC) ( const GLdouble *v1, const GLdouble *
|
|||
typedef void(APIENTRYP PFNDOLRECTFVPROC)(const GLfloat* v1, const GLfloat* v2);
|
||||
typedef void(APIENTRYP PFNDOLRECTIVPROC)(const GLint* v1, const GLint* v2);
|
||||
typedef void(APIENTRYP PFNDOLRECTSVPROC)(const GLshort* v1, const GLshort* v2);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void(APIENTRYP PFNDOLVERTEXPOINTERPROC)(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid* ptr);
|
||||
typedef void(APIENTRYP PFNDOLNORMALPOINTERPROC)(GLenum type, GLsizei stride, const GLvoid* ptr);
|
||||
typedef void (APIENTRYP PFNDOLCOLORPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void(APIENTRYP PFNDOLCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid* ptr);
|
||||
typedef void(APIENTRYP PFNDOLINDEXPOINTERPROC)(GLenum type, GLsizei stride, const GLvoid* ptr);
|
||||
typedef void (APIENTRYP PFNDOLTEXCOORDPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void(APIENTRYP PFNDOLTEXCOORDPOINTERPROC)(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid* ptr);
|
||||
typedef void(APIENTRYP PFNDOLEDGEFLAGPOINTERPROC)(GLsizei stride, const GLvoid* ptr);
|
||||
typedef void(APIENTRYP PFNDOLGETPOINTERVPROC)(GLenum pname, GLvoid** params);
|
||||
typedef void(APIENTRYP PFNDOLARRAYELEMENTPROC)(GLint i);
|
||||
typedef void(APIENTRYP PFNDOLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSPROC) ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices );
|
||||
typedef void (APIENTRYP PFNDOLINTERLEAVEDARRAYSPROC) ( GLenum format, GLsizei stride, const GLvoid *pointer );
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid* indices);
|
||||
typedef void(APIENTRYP PFNDOLINTERLEAVEDARRAYSPROC)(GLenum format, GLsizei stride,
|
||||
const GLvoid* pointer);
|
||||
typedef void(APIENTRYP PFNDOLSHADEMODELPROC)(GLenum mode);
|
||||
typedef void(APIENTRYP PFNDOLLIGHTFPROC)(GLenum light, GLenum pname, GLfloat param);
|
||||
typedef void(APIENTRYP PFNDOLLIGHTIPROC)(GLenum light, GLenum pname, GLint param);
|
||||
|
@ -882,10 +893,15 @@ typedef void (APIENTRYP PFNDOLPIXELMAPUSVPROC) ( GLenum map, GLsizei mapsize, co
|
|||
typedef void(APIENTRYP PFNDOLGETPIXELMAPFVPROC)(GLenum map, GLfloat* values);
|
||||
typedef void(APIENTRYP PFNDOLGETPIXELMAPUIVPROC)(GLenum map, GLuint* values);
|
||||
typedef void(APIENTRYP PFNDOLGETPIXELMAPUSVPROC)(GLenum map, GLushort* values);
|
||||
typedef void (APIENTRYP PFNDOLBITMAPPROC) ( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap );
|
||||
typedef void (APIENTRYP PFNDOLREADPIXELSPROC) ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels );
|
||||
typedef void (APIENTRYP PFNDOLDRAWPIXELSPROC) ( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP PFNDOLCOPYPIXELSPROC) ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type );
|
||||
typedef void(APIENTRYP PFNDOLBITMAPPROC)(GLsizei width, GLsizei height, GLfloat xorig,
|
||||
GLfloat yorig, GLfloat xmove, GLfloat ymove,
|
||||
const GLubyte* bitmap);
|
||||
typedef void(APIENTRYP PFNDOLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLDRAWPIXELSPROC)(GLsizei width, GLsizei height, GLenum format,
|
||||
GLenum type, const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLCOPYPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum type);
|
||||
typedef void(APIENTRYP PFNDOLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
|
||||
typedef void(APIENTRYP PFNDOLSTENCILMASKPROC)(GLuint mask);
|
||||
typedef void(APIENTRYP PFNDOLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
|
@ -907,31 +923,57 @@ typedef void (APIENTRYP PFNDOLGETTEXENVFVPROC) ( GLenum target, GLenum pname, GL
|
|||
typedef void(APIENTRYP PFNDOLGETTEXENVIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
|
||||
typedef void(APIENTRYP PFNDOLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNDOLTEXPARAMETERFVPROC) ( GLenum target, GLenum pname, const GLfloat *params );
|
||||
typedef void(APIENTRYP PFNDOLTEXPARAMETERFVPROC)(GLenum target, GLenum pname,
|
||||
const GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXLEVELPARAMETERFVPROC) ( GLenum target, GLint level, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP PFNDOLGETTEXLEVELPARAMETERIVPROC) ( GLenum target, GLint level, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE1DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE2DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP PFNDOLGETTEXIMAGEPROC) ( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels );
|
||||
typedef void(APIENTRYP PFNDOLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname,
|
||||
GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalFormat,
|
||||
GLsizei width, GLint border, GLenum format,
|
||||
GLenum type, const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalFormat,
|
||||
GLsizei width, GLsizei height, GLint border,
|
||||
GLenum format, GLenum type, const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format,
|
||||
GLenum type, GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGENTEXTURESPROC)(GLsizei n, GLuint* textures);
|
||||
typedef void(APIENTRYP PFNDOLDELETETEXTURESPROC)(GLsizei n, const GLuint* textures);
|
||||
typedef void(APIENTRYP PFNDOLBINDTEXTUREPROC)(GLenum target, GLuint texture);
|
||||
typedef void (APIENTRYP PFNDOLPRIORITIZETEXTURESPROC) ( GLsizei n, const GLuint *textures, const GLclampf *priorities );
|
||||
typedef GLboolean (APIENTRYP PFNDOLARETEXTURESRESIDENTPROC) ( GLsizei n, const GLuint *textures, GLboolean *residences );
|
||||
typedef void(APIENTRYP PFNDOLPRIORITIZETEXTURESPROC)(GLsizei n, const GLuint* textures,
|
||||
const GLclampf* priorities);
|
||||
typedef GLboolean(APIENTRYP PFNDOLARETEXTURESRESIDENTPROC)(GLsizei n, const GLuint* textures,
|
||||
GLboolean* residences);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISTEXTUREPROC)(GLuint texture);
|
||||
typedef void (APIENTRYP PFNDOLTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP PFNDOLTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border );
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXIMAGE2DPROC) ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border );
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
|
||||
typedef void (APIENTRYP PFNDOLMAP1DPROC) ( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points );
|
||||
typedef void (APIENTRYP PFNDOLMAP1FPROC) ( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points );
|
||||
typedef void (APIENTRYP PFNDOLMAP2DPROC) ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points );
|
||||
typedef void (APIENTRYP PFNDOLMAP2FPROC) ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points );
|
||||
typedef void(APIENTRYP PFNDOLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLsizei width, GLenum format, GLenum type,
|
||||
const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat,
|
||||
GLint x, GLint y, GLsizei width, GLint border);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLint border);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint x, GLint y, GLsizei width);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint x, GLint y, GLsizei width,
|
||||
GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLMAP1DPROC)(GLenum target, GLdouble u1, GLdouble u2, GLint stride,
|
||||
GLint order, const GLdouble* points);
|
||||
typedef void(APIENTRYP PFNDOLMAP1FPROC)(GLenum target, GLfloat u1, GLfloat u2, GLint stride,
|
||||
GLint order, const GLfloat* points);
|
||||
typedef void(APIENTRYP PFNDOLMAP2DPROC)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride,
|
||||
GLint uorder, GLdouble v1, GLdouble v2, GLint vstride,
|
||||
GLint vorder, const GLdouble* points);
|
||||
typedef void(APIENTRYP PFNDOLMAP2FPROC)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride,
|
||||
GLint uorder, GLfloat v1, GLfloat v2, GLint vstride,
|
||||
GLint vorder, const GLfloat* points);
|
||||
typedef void(APIENTRYP PFNDOLGETMAPDVPROC)(GLenum target, GLenum query, GLdouble* v);
|
||||
typedef void(APIENTRYP PFNDOLGETMAPFVPROC)(GLenum target, GLenum query, GLfloat* v);
|
||||
typedef void(APIENTRYP PFNDOLGETMAPIVPROC)(GLenum target, GLenum query, GLint* v);
|
||||
|
@ -945,8 +987,10 @@ typedef void (APIENTRYP PFNDOLEVALCOORD2DVPROC) ( const GLdouble *u );
|
|||
typedef void(APIENTRYP PFNDOLEVALCOORD2FVPROC)(const GLfloat* u);
|
||||
typedef void(APIENTRYP PFNDOLMAPGRID1DPROC)(GLint un, GLdouble u1, GLdouble u2);
|
||||
typedef void(APIENTRYP PFNDOLMAPGRID1FPROC)(GLint un, GLfloat u1, GLfloat u2);
|
||||
typedef void (APIENTRYP PFNDOLMAPGRID2DPROC) ( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 );
|
||||
typedef void (APIENTRYP PFNDOLMAPGRID2FPROC) ( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 );
|
||||
typedef void(APIENTRYP PFNDOLMAPGRID2DPROC)(GLint un, GLdouble u1, GLdouble u2, GLint vn,
|
||||
GLdouble v1, GLdouble v2);
|
||||
typedef void(APIENTRYP PFNDOLMAPGRID2FPROC)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
|
||||
GLfloat v2);
|
||||
typedef void(APIENTRYP PFNDOLEVALPOINT1PROC)(GLint i);
|
||||
typedef void(APIENTRYP PFNDOLEVALPOINT2PROC)(GLint i, GLint j);
|
||||
typedef void(APIENTRYP PFNDOLEVALMESH1PROC)(GLenum mode, GLint i1, GLint i2);
|
||||
|
|
|
@ -65,10 +65,20 @@
|
|||
#define GL_MAX_3D_TEXTURE_SIZE 0x8073
|
||||
#define GL_TEXTURE_BINDING_3D 0x806A
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
typedef void (APIENTRYP PFNDOLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const GLvoid* indices);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLint border, GLenum format, GLenum type,
|
||||
const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth, GLenum format,
|
||||
GLenum type, const GLvoid* pixels);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height);
|
||||
|
||||
extern PFNDOLCOPYTEXSUBIMAGE3DPROC dolCopyTexSubImage3D;
|
||||
extern PFNDOLDRAWRANGEELEMENTSPROC dolDrawRangeElements;
|
||||
|
|
|
@ -130,12 +130,30 @@
|
|||
|
||||
typedef void(APIENTRYP PFNDOLACTIVETEXTUREPROC)(GLenum texture);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLECOVERAGEPROC)(GLclampf value, GLboolean invert);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth, GLint border,
|
||||
GLsizei imageSize, const GLvoid* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLint border,
|
||||
GLsizei imageSize, const GLvoid* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLint border, GLsizei imageSize,
|
||||
const GLvoid* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei depth, GLenum format,
|
||||
GLsizei imageSize, const GLvoid* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLsizei width,
|
||||
GLsizei height, GLenum format,
|
||||
GLsizei imageSize, const GLvoid* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset,
|
||||
GLsizei width, GLenum format,
|
||||
GLsizei imageSize, const GLvoid* data);
|
||||
typedef void(APIENTRYP PFNDOLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, GLvoid* img);
|
||||
|
||||
typedef void(APIENTRYP PFNDOLACTIVETEXTUREARBPROC)(GLenum texture);
|
||||
|
@ -156,21 +174,28 @@ typedef void (APIENTRYP PFNDOLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, G
|
|||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD2IVARBPROC)(GLenum target, const GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD2SARBPROC)(GLenum target, GLshort s, GLshort t);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD2SVARBPROC)(GLenum target, const GLshort* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3DARBPROC)(GLenum target, GLdouble s, GLdouble t,
|
||||
GLdouble r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3DVARBPROC)(GLenum target, const GLdouble* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3FARBPROC)(GLenum target, GLfloat s, GLfloat t,
|
||||
GLfloat r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3FVARBPROC)(GLenum target, const GLfloat* v);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3IARBPROC)(GLenum target, GLint s, GLint t, GLint r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3IVARBPROC)(GLenum target, const GLint* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3SARBPROC)(GLenum target, GLshort s, GLshort t,
|
||||
GLshort r);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD3SVARBPROC)(GLenum target, const GLshort* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4DARBPROC)(GLenum target, GLdouble s, GLdouble t,
|
||||
GLdouble r, GLdouble q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4DVARBPROC)(GLenum target, const GLdouble* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4FARBPROC)(GLenum target, GLfloat s, GLfloat t, GLfloat r,
|
||||
GLfloat q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4FVARBPROC)(GLenum target, const GLfloat* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4IARBPROC)(GLenum target, GLint s, GLint t, GLint r,
|
||||
GLint q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4IVARBPROC)(GLenum target, const GLint* v);
|
||||
typedef void (APIENTRYP PFNDOLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4SARBPROC)(GLenum target, GLshort s, GLshort t, GLshort r,
|
||||
GLshort q);
|
||||
typedef void(APIENTRYP PFNDOLMULTITEXCOORD4SVARBPROC)(GLenum target, const GLshort* v);
|
||||
typedef void(APIENTRYP PFNDOLLOADTRANSPOSEMATRIXFARBPROC)(const GLfloat* m);
|
||||
typedef void(APIENTRYP PFNDOLLOADTRANSPOSEMATRIXDARBPROC)(const GLdouble* m);
|
||||
|
|
|
@ -72,9 +72,12 @@
|
|||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
|
||||
typedef void (APIENTRYP PFNDOLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void (APIENTRYP PFNDOLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
|
||||
typedef void (APIENTRYP PFNDOLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
|
||||
typedef void(APIENTRYP PFNDOLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB,
|
||||
GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void(APIENTRYP PFNDOLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint* first,
|
||||
const GLsizei* count, GLsizei drawcount);
|
||||
typedef void(APIENTRYP PFNDOLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei* count, GLenum type,
|
||||
const void* const* indices, GLsizei drawcount);
|
||||
typedef void(APIENTRYP PFNDOLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param);
|
||||
typedef void(APIENTRYP PFNDOLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLPOINTPARAMETERIPROC)(GLenum pname, GLint param);
|
||||
|
@ -100,7 +103,8 @@ typedef void (APIENTRYP PFNDOLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green,
|
|||
typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3UIVPROC)(const GLuint* v);
|
||||
typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue);
|
||||
typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3USVPROC)(const GLushort* v);
|
||||
typedef void (APIENTRYP PFNDOLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
typedef void(APIENTRYP PFNDOLSECONDARYCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride,
|
||||
const void* pointer);
|
||||
typedef void(APIENTRYP PFNDOLWINDOWPOS2DPROC)(GLdouble x, GLdouble y);
|
||||
typedef void(APIENTRYP PFNDOLWINDOWPOS2DVPROC)(const GLdouble* v);
|
||||
typedef void(APIENTRYP PFNDOLWINDOWPOS2FPROC)(GLfloat x, GLfloat y);
|
||||
|
@ -117,7 +121,8 @@ typedef void (APIENTRYP PFNDOLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
|
|||
typedef void(APIENTRYP PFNDOLWINDOWPOS3IVPROC)(const GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLWINDOWPOS3SPROC)(GLshort x, GLshort y, GLshort z);
|
||||
typedef void(APIENTRYP PFNDOLWINDOWPOS3SVPROC)(const GLshort* v);
|
||||
typedef void (APIENTRYP PFNDOLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void(APIENTRYP PFNDOLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue,
|
||||
GLfloat alpha);
|
||||
typedef void(APIENTRYP PFNDOLBLENDEQUATIONPROC)(GLenum mode);
|
||||
|
||||
// These two are provided by ARB_imaging as well
|
||||
|
|
|
@ -86,9 +86,12 @@ typedef void (APIENTRYP PFNDOLBINDBUFFERPROC) (GLenum target, GLuint buffer);
|
|||
typedef void(APIENTRYP PFNDOLDELETEBUFFERSPROC)(GLsizei n, const GLuint* buffers);
|
||||
typedef void(APIENTRYP PFNDOLGENBUFFERSPROC)(GLsizei n, GLuint* buffers);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISBUFFERPROC)(GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
typedef void (APIENTRYP PFNDOLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
|
||||
typedef void(APIENTRYP PFNDOLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void* data,
|
||||
GLenum usage);
|
||||
typedef void(APIENTRYP PFNDOLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size,
|
||||
const void* data);
|
||||
typedef void(APIENTRYP PFNDOLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size,
|
||||
void* data);
|
||||
typedef void*(APIENTRYP PFNDOLMAPBUFFERPROC)(GLenum target, GLenum access);
|
||||
typedef GLboolean(APIENTRYP PFNDOLUNMAPBUFFERPROC)(GLenum target);
|
||||
typedef void(APIENTRYP PFNDOLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
|
|
|
@ -110,11 +110,14 @@
|
|||
|
||||
typedef void(APIENTRYP PFNDOLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void(APIENTRYP PFNDOLDRAWBUFFERSPROC)(GLsizei n, const GLenum* bufs);
|
||||
typedef void (APIENTRYP PFNDOLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
typedef void (APIENTRYP PFNDOLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
typedef void(APIENTRYP PFNDOLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail,
|
||||
GLenum dppass);
|
||||
typedef void(APIENTRYP PFNDOLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref,
|
||||
GLuint mask);
|
||||
typedef void(APIENTRYP PFNDOLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
|
||||
typedef void(APIENTRYP PFNDOLATTACHSHADERPROC)(GLuint program, GLuint shader);
|
||||
typedef void (APIENTRYP PFNDOLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
|
||||
typedef void(APIENTRYP PFNDOLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index,
|
||||
const GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLCOMPILESHADERPROC)(GLuint shader);
|
||||
typedef GLuint(APIENTRYP PFNDOLCREATEPROGRAMPROC)(void);
|
||||
typedef GLuint(APIENTRYP PFNDOLCREATESHADERPROC)(GLenum type);
|
||||
|
@ -123,31 +126,42 @@ typedef void (APIENTRYP PFNDOLDELETESHADERPROC) (GLuint shader);
|
|||
typedef void(APIENTRYP PFNDOLDETACHSHADERPROC)(GLuint program, GLuint shader);
|
||||
typedef void(APIENTRYP PFNDOLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
|
||||
typedef void(APIENTRYP PFNDOLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
typedef void (APIENTRYP PFNDOLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize,
|
||||
GLsizei* length, GLint* size, GLenum* type,
|
||||
GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize,
|
||||
GLsizei* length, GLint* size, GLenum* type,
|
||||
GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount,
|
||||
GLsizei* count, GLuint* shaders);
|
||||
typedef GLint(APIENTRYP PFNDOLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint* params);
|
||||
typedef void (APIENTRYP PFNDOLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void(APIENTRYP PFNDOLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize,
|
||||
GLsizei* length, GLchar* infoLog);
|
||||
typedef void(APIENTRYP PFNDOLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint* params);
|
||||
typedef void (APIENTRYP PFNDOLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (APIENTRYP PFNDOLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||
typedef void(APIENTRYP PFNDOLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei* length,
|
||||
GLchar* infoLog);
|
||||
typedef void(APIENTRYP PFNDOLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei* length,
|
||||
GLchar* source);
|
||||
typedef GLint(APIENTRYP PFNDOLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble* params);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint* params);
|
||||
typedef void (APIENTRYP PFNDOLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname,
|
||||
void** pointer);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISPROGRAMPROC)(GLuint program);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISSHADERPROC)(GLuint shader);
|
||||
typedef void(APIENTRYP PFNDOLLINKPROGRAMPROC)(GLuint program);
|
||||
typedef void (APIENTRYP PFNDOLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
typedef void(APIENTRYP PFNDOLSHADERSOURCEPROC)(GLuint shader, GLsizei count,
|
||||
const GLchar* const* string, const GLint* length);
|
||||
typedef void(APIENTRYP PFNDOLUSEPROGRAMPROC)(GLuint program);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM1FPROC)(GLint location, GLfloat v0);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
|
||||
GLfloat v3);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM1IPROC)(GLint location, GLint v0);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2);
|
||||
|
@ -160,9 +174,12 @@ typedef void (APIENTRYP PFNDOLUNIFORM1IVPROC) (GLint location, GLsizei count, co
|
|||
typedef void(APIENTRYP PFNDOLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLVALIDATEPROGRAMPROC)(GLuint program);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble* v);
|
||||
|
@ -185,22 +202,28 @@ typedef void (APIENTRYP PFNDOLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort
|
|||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort* v);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z,
|
||||
GLubyte w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte* v);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z,
|
||||
GLdouble w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble* v);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z,
|
||||
GLfloat w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4IVPROC)(GLuint index, const GLint* v);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z,
|
||||
GLshort w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort* v);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type,
|
||||
GLboolean normalized, GLsizei stride,
|
||||
const void* pointer);
|
||||
|
||||
extern PFNDOLATTACHSHADERPROC dolAttachShader;
|
||||
extern PFNDOLBINDATTRIBLOCATIONPROC dolBindAttribLocation;
|
||||
|
|
|
@ -47,12 +47,18 @@
|
|||
#define GL_COMPRESSED_SLUMINANCE 0x8C4A
|
||||
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
|
||||
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat* value);
|
||||
|
||||
extern PFNDOLUNIFORMMATRIX2X3FVPROC dolUniformMatrix2x3fv;
|
||||
extern PFNDOLUNIFORMMATRIX2X4FVPROC dolUniformMatrix2x4fv;
|
||||
|
|
|
@ -261,7 +261,8 @@
|
|||
#define GL_CLAMP_FRAGMENT_COLOR 0x891B
|
||||
#define GL_ALPHA_INTEGER 0x8D97
|
||||
|
||||
typedef void (APIENTRYP PFNDOLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef void(APIENTRYP PFNDOLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b,
|
||||
GLboolean a);
|
||||
typedef void(APIENTRYP PFNDOLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean* data);
|
||||
typedef void(APIENTRYP PFNDOLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint* data);
|
||||
typedef void(APIENTRYP PFNDOLENABLEIPROC)(GLenum target, GLuint index);
|
||||
|
@ -269,14 +270,21 @@ typedef void (APIENTRYP PFNDOLDISABLEIPROC) (GLenum target, GLuint index);
|
|||
typedef GLboolean(APIENTRYP PFNDOLISENABLEDIPROC)(GLenum target, GLuint index);
|
||||
typedef void(APIENTRYP PFNDOLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode);
|
||||
typedef void(APIENTRYP PFNDOLENDTRANSFORMFEEDBACKPROC)(void);
|
||||
typedef void (APIENTRYP PFNDOLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer,
|
||||
GLintptr offset, GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNDOLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
typedef void(APIENTRYP PFNDOLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count,
|
||||
const GLchar* const* varyings,
|
||||
GLenum bufferMode);
|
||||
typedef void(APIENTRYP PFNDOLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index,
|
||||
GLsizei bufSize, GLsizei* length,
|
||||
GLsizei* size, GLenum* type,
|
||||
GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLCLAMPCOLORPROC)(GLenum target, GLenum clamp);
|
||||
typedef void(APIENTRYP PFNDOLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode);
|
||||
typedef void(APIENTRYP PFNDOLENDCONDITIONALRENDERPROC)(void);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type,
|
||||
GLsizei stride, const void* pointer);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint* params);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI1IPROC)(GLuint index, GLint x);
|
||||
|
@ -286,7 +294,8 @@ typedef void (APIENTRYP PFNDOLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint
|
|||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z,
|
||||
GLuint w);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint* v);
|
||||
|
@ -300,47 +309,74 @@ typedef void (APIENTRYP PFNDOLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort
|
|||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte* v);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort* v);
|
||||
typedef void(APIENTRYP PFNDOLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint* params);
|
||||
typedef void (APIENTRYP PFNDOLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
|
||||
typedef void(APIENTRYP PFNDOLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color,
|
||||
const GLchar* name);
|
||||
typedef GLint(APIENTRYP PFNDOLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM1UIPROC)(GLint location, GLuint v0);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2,
|
||||
GLuint v3);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint* value);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint* value);
|
||||
typedef void(APIENTRYP PFNDOLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint* params);
|
||||
typedef void (APIENTRYP PFNDOLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void(APIENTRYP PFNDOLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname,
|
||||
const GLuint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint* params);
|
||||
typedef void (APIENTRYP PFNDOLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
|
||||
typedef void (APIENTRYP PFNDOLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
|
||||
typedef void (APIENTRYP PFNDOLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer,
|
||||
const GLint* value);
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer,
|
||||
const GLuint* value);
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer,
|
||||
const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth,
|
||||
GLint stencil);
|
||||
typedef const GLubyte*(APIENTRYP PFNDOLGETSTRINGIPROC)(GLenum name, GLuint index);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISRENDERBUFFERPROC)(GLuint renderbuffer);
|
||||
typedef void(APIENTRYP PFNDOLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
|
||||
typedef void(APIENTRYP PFNDOLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint* renderbuffers);
|
||||
typedef void(APIENTRYP PFNDOLGENRENDERBUFFERSPROC)(GLsizei n, GLuint* renderbuffers);
|
||||
typedef void (APIENTRYP PFNDOLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void(APIENTRYP PFNDOLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname,
|
||||
GLint* params);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISFRAMEBUFFERPROC)(GLuint framebuffer);
|
||||
typedef void(APIENTRYP PFNDOLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
|
||||
typedef void(APIENTRYP PFNDOLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint* framebuffers);
|
||||
typedef void(APIENTRYP PFNDOLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint* framebuffers);
|
||||
typedef GLenum(APIENTRYP PFNDOLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (APIENTRYP PFNDOLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment,
|
||||
GLenum textarget, GLuint texture,
|
||||
GLint level);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment,
|
||||
GLenum textarget, GLuint texture,
|
||||
GLint level);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment,
|
||||
GLenum textarget, GLuint texture,
|
||||
GLint level, GLint zoffset);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment,
|
||||
GLenum renderbuffertarget,
|
||||
GLuint renderbuffer);
|
||||
typedef void(APIENTRYP PFNDOLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target,
|
||||
GLenum attachment,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGENERATEMIPMAPPROC)(GLenum target);
|
||||
typedef void (APIENTRYP PFNDOLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef void (APIENTRYP PFNDOLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
typedef void *(APIENTRYP PFNDOLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (APIENTRYP PFNDOLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
typedef void(APIENTRYP PFNDOLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1,
|
||||
GLint srcY1, GLint dstX0, GLint dstY0,
|
||||
GLint dstX1, GLint dstY1, GLbitfield mask,
|
||||
GLenum filter);
|
||||
typedef void(APIENTRYP PFNDOLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment,
|
||||
GLuint texture, GLint level, GLint layer);
|
||||
typedef void*(APIENTRYP PFNDOLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length,
|
||||
GLbitfield access);
|
||||
typedef void(APIENTRYP PFNDOLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset,
|
||||
GLsizeiptr length);
|
||||
typedef void(APIENTRYP PFNDOLBINDVERTEXARRAYPROC)(GLuint array);
|
||||
typedef void(APIENTRYP PFNDOLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint* arrays);
|
||||
typedef void(APIENTRYP PFNDOLGENVERTEXARRAYSPROC)(GLsizei n, GLuint* arrays);
|
||||
|
|
|
@ -85,18 +85,34 @@
|
|||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
|
||||
#define GL_INVALID_INDEX 0xFFFFFFFFu
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
|
||||
typedef void(APIENTRYP PFNDOLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count,
|
||||
GLsizei instancecount);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type,
|
||||
const void* indices, GLsizei instancecount);
|
||||
typedef void(APIENTRYP PFNDOLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer);
|
||||
typedef void(APIENTRYP PFNDOLPRIMITIVERESTARTINDEXPROC)(GLuint index);
|
||||
typedef void (APIENTRYP PFNDOLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNDOLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
|
||||
typedef GLuint (APIENTRYP PFNDOLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
|
||||
typedef void (APIENTRYP PFNDOLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
|
||||
typedef void(APIENTRYP PFNDOLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget,
|
||||
GLintptr readOffset, GLintptr writeOffset,
|
||||
GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount,
|
||||
const GLchar* const* uniformNames,
|
||||
GLuint* uniformIndices);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount,
|
||||
const GLuint* uniformIndices, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex,
|
||||
GLsizei bufSize, GLsizei* length,
|
||||
GLchar* uniformName);
|
||||
typedef GLuint(APIENTRYP PFNDOLGETUNIFORMBLOCKINDEXPROC)(GLuint program,
|
||||
const GLchar* uniformBlockName);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program,
|
||||
GLuint uniformBlockIndex,
|
||||
GLsizei bufSize, GLsizei* length,
|
||||
GLchar* uniformBlockName);
|
||||
typedef void(APIENTRYP PFNDOLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex,
|
||||
GLuint uniformBlockBinding);
|
||||
|
||||
extern PFNDOLDRAWARRAYSINSTANCEDPROC dolDrawArraysInstanced;
|
||||
extern PFNDOLDRAWELEMENTSINSTANCEDPROC dolDrawElementsInstanced;
|
||||
|
|
|
@ -88,10 +88,21 @@
|
|||
#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
|
||||
#define GL_MAX_INTEGER_SAMPLES 0x9110
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNDOLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNDOLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type,
|
||||
const void* indices, GLint basevertex);
|
||||
typedef void(APIENTRYP PFNDOLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const void* indices,
|
||||
GLint basevertex);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count,
|
||||
GLenum type, const void* indices,
|
||||
GLsizei instancecount,
|
||||
GLint basevertex);
|
||||
typedef void(APIENTRYP PFNDOLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei* count,
|
||||
GLenum type,
|
||||
const void* const* indices,
|
||||
GLsizei drawcount,
|
||||
const GLint* basevertex);
|
||||
typedef void(APIENTRYP PFNDOLPROVOKINGVERTEXPROC)(GLenum mode);
|
||||
typedef GLsync(APIENTRYP PFNDOLFENCESYNCPROC)(GLenum condition, GLbitfield flags);
|
||||
typedef GLboolean(APIENTRYP PFNDOLISSYNCPROC)(GLsync sync);
|
||||
|
@ -99,12 +110,21 @@ typedef void (APIENTRYP PFNDOLDELETESYNCPROC) (GLsync sync);
|
|||
typedef GLenum(APIENTRYP PFNDOLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void(APIENTRYP PFNDOLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void(APIENTRYP PFNDOLGETINTEGER64VPROC)(GLenum pname, GLint64* data);
|
||||
typedef void (APIENTRYP PFNDOLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
|
||||
typedef void(APIENTRYP PFNDOLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei bufSize,
|
||||
GLsizei* length, GLint* values);
|
||||
typedef void(APIENTRYP PFNDOLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64* data);
|
||||
typedef void (APIENTRYP PFNDOLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
|
||||
typedef void (APIENTRYP PFNDOLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNDOLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname,
|
||||
GLint64* params);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment,
|
||||
GLuint texture, GLint level);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat* val);
|
||||
typedef void(APIENTRYP PFNDOLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask);
|
||||
|
||||
|
|
|
@ -136,22 +136,42 @@
|
|||
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
|
||||
typedef void (APIENTRYP PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
|
||||
typedef void (APIENTRYP PFNDOLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
|
||||
typedef void(APIENTRYP PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first,
|
||||
GLsizei count,
|
||||
GLsizei instancecount,
|
||||
GLuint baseinstance);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count,
|
||||
GLenum type,
|
||||
const void* indices,
|
||||
GLsizei instancecount,
|
||||
GLuint baseinstance);
|
||||
typedef void(APIENTRYP PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)(
|
||||
GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount,
|
||||
GLint basevertex, GLuint baseinstance);
|
||||
typedef void(APIENTRYP PFNDOLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat,
|
||||
GLenum pname, GLsizei bufSize, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level,
|
||||
GLboolean layered, GLint layer, GLenum access,
|
||||
GLenum format);
|
||||
typedef void(APIENTRYP PFNDOLMEMORYBARRIERPROC)(GLbitfield barriers);
|
||||
typedef void (APIENTRYP PFNDOLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (APIENTRYP PFNDOLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (APIENTRYP PFNDOLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
|
||||
typedef void (APIENTRYP PFNDOLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void(APIENTRYP PFNDOLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id,
|
||||
GLsizei instancecount);
|
||||
typedef void(APIENTRYP PFNDOLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id,
|
||||
GLuint stream,
|
||||
GLsizei instancecount);
|
||||
|
||||
extern PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC dolDrawArraysInstancedBaseInstance;
|
||||
extern PFNDOLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC dolDrawElementsInstancedBaseInstance;
|
||||
extern PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC dolDrawElementsInstancedBaseVertexBaseInstance;
|
||||
extern PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC
|
||||
dolDrawElementsInstancedBaseVertexBaseInstance;
|
||||
extern PFNDOLGETINTERNALFORMATIVPROC dolGetInternalformativ;
|
||||
extern PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC dolGetActiveAtomicCounterBufferiv;
|
||||
extern PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture;
|
||||
|
|
|
@ -282,33 +282,67 @@
|
|||
#define GL_VERTEX_BINDING_BUFFER 0x8F4F
|
||||
#define GL_DISPLAY_LIST 0x82E7
|
||||
|
||||
typedef void (APIENTRYP PFNDOLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat,
|
||||
GLenum format, GLenum type, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat,
|
||||
GLintptr offset, GLsizeiptr size,
|
||||
GLenum format, GLenum type, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y,
|
||||
GLuint num_groups_z);
|
||||
typedef void(APIENTRYP PFNDOLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNDOLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
|
||||
typedef void (APIENTRYP PFNDOLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void(APIENTRYP PFNDOLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat,
|
||||
GLenum pname, GLsizei bufSize,
|
||||
GLint64* params);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr length);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATEBUFFERDATAPROC)(GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
typedef void (APIENTRYP PFNDOLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (APIENTRYP PFNDOLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (APIENTRYP PFNDOLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
|
||||
typedef GLuint (APIENTRYP PFNDOLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
|
||||
typedef void (APIENTRYP PFNDOLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
|
||||
typedef void (APIENTRYP PFNDOLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||
typedef GLint (APIENTRYP PFNDOLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
|
||||
typedef GLint (APIENTRYP PFNDOLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
|
||||
typedef void (APIENTRYP PFNDOLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
typedef void (APIENTRYP PFNDOLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments,
|
||||
const GLenum* attachments);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments,
|
||||
const GLenum* attachments, GLint x,
|
||||
GLint y, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void* indirect,
|
||||
GLsizei drawcount, GLsizei stride);
|
||||
typedef void(APIENTRYP PFNDOLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type,
|
||||
const void* indirect, GLsizei drawcount,
|
||||
GLsizei stride);
|
||||
typedef void(APIENTRYP PFNDOLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface,
|
||||
GLenum pname, GLint* params);
|
||||
typedef GLuint(APIENTRYP PFNDOLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface,
|
||||
const GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface,
|
||||
GLuint index, GLsizei bufSize,
|
||||
GLsizei* length, GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface,
|
||||
GLuint index, GLsizei propCount,
|
||||
const GLenum* props, GLsizei bufSize,
|
||||
GLsizei* length, GLint* params);
|
||||
typedef GLint(APIENTRYP PFNDOLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program,
|
||||
GLenum programInterface,
|
||||
const GLchar* name);
|
||||
typedef GLint(APIENTRYP PFNDOLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program,
|
||||
GLenum programInterface,
|
||||
const GLchar* name);
|
||||
typedef void(APIENTRYP PFNDOLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat,
|
||||
GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture,
|
||||
GLenum internalformat, GLuint minlevel,
|
||||
GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
typedef void(APIENTRYP PFNDOLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer,
|
||||
GLintptr offset, GLsizei stride);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type,
|
||||
GLboolean normalized, GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type,
|
||||
GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, GLenum type,
|
||||
GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor);
|
||||
|
||||
|
|
|
@ -41,15 +41,26 @@
|
|||
#define GL_QUERY_RESULT_NO_WAIT 0x9194
|
||||
#define GL_MIRROR_CLAMP_TO_EDGE 0x8743
|
||||
|
||||
typedef void (APIENTRYP PFNDOLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void (APIENTRYP PFNDOLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
|
||||
typedef void (APIENTRYP PFNDOLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
|
||||
typedef void(APIENTRYP PFNDOLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void* data,
|
||||
GLbitfield flags);
|
||||
typedef void(APIENTRYP PFNDOLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format,
|
||||
GLenum type, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth, GLenum format,
|
||||
GLenum type, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count,
|
||||
const GLuint* buffers);
|
||||
typedef void(APIENTRYP PFNDOLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count,
|
||||
const GLuint* buffers, const GLintptr* offsets,
|
||||
const GLsizeiptr* sizes);
|
||||
typedef void(APIENTRYP PFNDOLBINDTEXTURESPROC)(GLuint first, GLsizei count, const GLuint* textures);
|
||||
typedef void(APIENTRYP PFNDOLBINDSAMPLERSPROC)(GLuint first, GLsizei count, const GLuint* samplers);
|
||||
typedef void (APIENTRYP PFNDOLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
|
||||
typedef void (APIENTRYP PFNDOLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
|
||||
typedef void(APIENTRYP PFNDOLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count,
|
||||
const GLuint* textures);
|
||||
typedef void(APIENTRYP PFNDOLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count,
|
||||
const GLuint* buffers, const GLintptr* offsets,
|
||||
const GLsizei* strides);
|
||||
|
||||
extern PFNDOLCLEARTEXIMAGEPROC dolClearTexImage;
|
||||
extern PFNDOLCLEARTEXSUBIMAGEPROC dolClearTexSubImage;
|
||||
|
|
|
@ -48,125 +48,267 @@
|
|||
|
||||
typedef void(APIENTRYP PFNDOLCLIPCONTROLPROC)(GLenum origin, GLenum depth);
|
||||
typedef void(APIENTRYP PFNDOLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint* ids);
|
||||
typedef void (APIENTRYP PFNDOLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index,
|
||||
GLuint buffer);
|
||||
typedef void(APIENTRYP PFNDOLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index,
|
||||
GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint* param);
|
||||
typedef void (APIENTRYP PFNDOLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
|
||||
typedef void (APIENTRYP PFNDOLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
|
||||
typedef void(APIENTRYP PFNDOLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index,
|
||||
GLint* param);
|
||||
typedef void(APIENTRYP PFNDOLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, GLuint index,
|
||||
GLint64* param);
|
||||
typedef void(APIENTRYP PFNDOLCREATEBUFFERSPROC)(GLsizei n, GLuint* buffers);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNDOLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size,
|
||||
const void* data, GLbitfield flags);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, const void* data,
|
||||
GLenum usage);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr size, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer,
|
||||
GLintptr readOffset, GLintptr writeOffset,
|
||||
GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat,
|
||||
GLenum format, GLenum type,
|
||||
const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat,
|
||||
GLintptr offset, GLsizeiptr size,
|
||||
GLenum format, GLenum type,
|
||||
const void* data);
|
||||
typedef void*(APIENTRYP PFNDOLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access);
|
||||
typedef void *(APIENTRYP PFNDOLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void*(APIENTRYP PFNDOLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr length, GLbitfield access);
|
||||
typedef GLboolean(APIENTRYP PFNDOLUNMAPNAMEDBUFFERPROC)(GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
|
||||
typedef void(APIENTRYP PFNDOLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr length);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname,
|
||||
GLint64* params);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname,
|
||||
void** params);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr size, void* data);
|
||||
typedef void(APIENTRYP PFNDOLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint* framebuffers);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer,
|
||||
GLenum attachment,
|
||||
GLenum renderbuffertarget,
|
||||
GLuint renderbuffer);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname,
|
||||
GLint param);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment,
|
||||
GLuint texture, GLint level);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer,
|
||||
GLenum attachment, GLuint texture,
|
||||
GLint level, GLint layer);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n,
|
||||
const GLenum* bufs);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src);
|
||||
typedef void (APIENTRYP PFNDOLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
|
||||
typedef void (APIENTRYP PFNDOLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
|
||||
typedef void (APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
|
||||
typedef void (APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil);
|
||||
typedef void (APIENTRYP PFNDOLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer,
|
||||
GLsizei numAttachments,
|
||||
const GLenum* attachments);
|
||||
typedef void(APIENTRYP PFNDOLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)(GLuint framebuffer,
|
||||
GLsizei numAttachments,
|
||||
const GLenum* attachments,
|
||||
GLint x, GLint y, GLsizei width,
|
||||
GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer,
|
||||
GLint drawbuffer, const GLint* value);
|
||||
typedef void(APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer,
|
||||
GLint drawbuffer, const GLuint* value);
|
||||
typedef void(APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer,
|
||||
GLint drawbuffer, const GLfloat* value);
|
||||
typedef void(APIENTRYP PFNDOLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer,
|
||||
const GLfloat depth, GLint stencil);
|
||||
typedef void(APIENTRYP PFNDOLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer,
|
||||
GLuint drawFramebuffer, GLint srcX0,
|
||||
GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1,
|
||||
GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef GLenum(APIENTRYP PFNDOLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, GLenum target);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, GLenum pname,
|
||||
GLint* param);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer,
|
||||
GLenum attachment,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint* renderbuffers);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)(
|
||||
GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint* textures);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNDOLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat,
|
||||
GLuint buffer);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat,
|
||||
GLuint buffer, GLintptr offset,
|
||||
GLsizeiptr size);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels,
|
||||
GLenum internalformat, GLsizei width);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth,
|
||||
GLboolean fixedsamplelocations);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLsizei width, GLenum format, GLenum type,
|
||||
const void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, const void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth, GLenum format,
|
||||
GLenum type, const void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level,
|
||||
GLint xoffset, GLsizei width,
|
||||
GLenum format, GLsizei imageSize,
|
||||
const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLenum format, GLsizei imageSize,
|
||||
const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCOMPRESSEDTEXTURESUBIMAGE3DPROC)(
|
||||
GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint x, GLint y, GLsizei width);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLint x,
|
||||
GLint y, GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname,
|
||||
const GLfloat* param);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNDOLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname,
|
||||
const GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname,
|
||||
const GLuint* params);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname,
|
||||
const GLint* param);
|
||||
typedef void(APIENTRYP PFNDOLGENERATETEXTUREMIPMAPPROC)(GLuint texture);
|
||||
typedef void(APIENTRYP PFNDOLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format,
|
||||
GLenum type, GLsizei bufSize, void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level,
|
||||
GLsizei bufSize, void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level,
|
||||
GLenum pname, GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname,
|
||||
GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname,
|
||||
GLuint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint* arrays);
|
||||
typedef void(APIENTRYP PFNDOLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index);
|
||||
typedef void(APIENTRYP PFNDOLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNDOLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex,
|
||||
GLuint buffer, GLintptr offset,
|
||||
GLsizei stride);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first,
|
||||
GLsizei count, const GLuint* buffers,
|
||||
const GLintptr* offsets,
|
||||
const GLsizei* strides);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex,
|
||||
GLuint bindingindex);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex,
|
||||
GLint size, GLenum type,
|
||||
GLboolean normalized,
|
||||
GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex,
|
||||
GLint size, GLenum type,
|
||||
GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex,
|
||||
GLint size, GLenum type,
|
||||
GLuint relativeoffset);
|
||||
typedef void(APIENTRYP PFNDOLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex,
|
||||
GLuint divisor);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint* param);
|
||||
typedef void (APIENTRYP PFNDOLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNDOLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, GLenum pname,
|
||||
GLint* param);
|
||||
typedef void(APIENTRYP PFNDOLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index,
|
||||
GLenum pname, GLint64* param);
|
||||
typedef void(APIENTRYP PFNDOLCREATESAMPLERSPROC)(GLsizei n, GLuint* samplers);
|
||||
typedef void(APIENTRYP PFNDOLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint* pipelines);
|
||||
typedef void(APIENTRYP PFNDOLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint* ids);
|
||||
typedef void (APIENTRYP PFNDOLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNDOLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNDOLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNDOLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void(APIENTRYP PFNDOLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, GLenum pname,
|
||||
GLintptr offset);
|
||||
typedef void(APIENTRYP PFNDOLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname,
|
||||
GLintptr offset);
|
||||
typedef void(APIENTRYP PFNDOLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, GLenum pname,
|
||||
GLintptr offset);
|
||||
typedef void(APIENTRYP PFNDOLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname,
|
||||
GLintptr offset);
|
||||
typedef void(APIENTRYP PFNDOLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers);
|
||||
typedef void (APIENTRYP PFNDOLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth, GLenum format,
|
||||
GLenum type, GLsizei bufSize, void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLint zoffset, GLsizei width,
|
||||
GLsizei height, GLsizei depth,
|
||||
GLsizei bufSize, void* pixels);
|
||||
typedef GLenum(APIENTRYP PFNDOLGETGRAPHICSRESETSTATUSPROC)(void);
|
||||
typedef void (APIENTRYP PFNDOLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNDOLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
|
||||
typedef void (APIENTRYP PFNDOLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNDOLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (APIENTRYP PFNDOLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
typedef void (APIENTRYP PFNDOLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (APIENTRYP PFNDOLGETNMAPDVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
|
||||
typedef void (APIENTRYP PFNDOLGETNMAPFVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
|
||||
typedef void(APIENTRYP PFNDOLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, GLsizei bufSize,
|
||||
void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format,
|
||||
GLenum type, GLsizei bufSize, void* pixels);
|
||||
typedef void(APIENTRYP PFNDOLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize,
|
||||
GLdouble* params);
|
||||
typedef void(APIENTRYP PFNDOLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize,
|
||||
GLfloat* params);
|
||||
typedef void(APIENTRYP PFNDOLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize,
|
||||
GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize,
|
||||
GLuint* params);
|
||||
typedef void(APIENTRYP PFNDOLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, GLsizei bufSize,
|
||||
void* data);
|
||||
typedef void(APIENTRYP PFNDOLGETNMAPDVPROC)(GLenum target, GLenum query, GLsizei bufSize,
|
||||
GLdouble* v);
|
||||
typedef void(APIENTRYP PFNDOLGETNMAPFVPROC)(GLenum target, GLenum query, GLsizei bufSize,
|
||||
GLfloat* v);
|
||||
typedef void(APIENTRYP PFNDOLGETNMAPIVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLint* v);
|
||||
typedef void(APIENTRYP PFNDOLGETNPIXELMAPFVPROC)(GLenum map, GLsizei bufSize, GLfloat* values);
|
||||
typedef void(APIENTRYP PFNDOLGETNPIXELMAPUIVPROC)(GLenum map, GLsizei bufSize, GLuint* values);
|
||||
typedef void(APIENTRYP PFNDOLGETNPIXELMAPUSVPROC)(GLenum map, GLsizei bufSize, GLushort* values);
|
||||
typedef void(APIENTRYP PFNDOLGETNPOLYGONSTIPPLEPROC)(GLsizei bufSize, GLubyte* pattern);
|
||||
typedef void (APIENTRYP PFNDOLGETNCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
|
||||
typedef void (APIENTRYP PFNDOLGETNCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
|
||||
typedef void (APIENTRYP PFNDOLGETNSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
|
||||
typedef void (APIENTRYP PFNDOLGETNHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
|
||||
typedef void (APIENTRYP PFNDOLGETNMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
|
||||
typedef void(APIENTRYP PFNDOLGETNCOLORTABLEPROC)(GLenum target, GLenum format, GLenum type,
|
||||
GLsizei bufSize, void* table);
|
||||
typedef void(APIENTRYP PFNDOLGETNCONVOLUTIONFILTERPROC)(GLenum target, GLenum format, GLenum type,
|
||||
GLsizei bufSize, void* image);
|
||||
typedef void(APIENTRYP PFNDOLGETNSEPARABLEFILTERPROC)(GLenum target, GLenum format, GLenum type,
|
||||
GLsizei rowBufSize, void* row,
|
||||
GLsizei columnBufSize, void* column,
|
||||
void* span);
|
||||
typedef void(APIENTRYP PFNDOLGETNHISTOGRAMPROC)(GLenum target, GLboolean reset, GLenum format,
|
||||
GLenum type, GLsizei bufSize, void* values);
|
||||
typedef void(APIENTRYP PFNDOLGETNMINMAXPROC)(GLenum target, GLboolean reset, GLenum format,
|
||||
GLenum type, GLsizei bufSize, void* values);
|
||||
typedef void(APIENTRYP PFNDOLTEXTUREBARRIERPROC)(void);
|
||||
|
||||
extern PFNDOLCREATETRANSFORMFEEDBACKSPROC dolCreateTransformFeedbacks;
|
||||
|
@ -207,7 +349,8 @@ extern PFNDOLCLEARNAMEDFRAMEBUFFERFIPROC dolClearNamedFramebufferfi;
|
|||
extern PFNDOLBLITNAMEDFRAMEBUFFERPROC dolBlitNamedFramebuffer;
|
||||
extern PFNDOLCHECKNAMEDFRAMEBUFFERSTATUSPROC dolCheckNamedFramebufferStatus;
|
||||
extern PFNDOLGETNAMEDFRAMEBUFFERPARAMETERIVPROC dolGetNamedFramebufferParameteriv;
|
||||
extern PFNDOLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC dolGetNamedFramebufferAttachmentParameteriv;
|
||||
extern PFNDOLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC
|
||||
dolGetNamedFramebufferAttachmentParameteriv;
|
||||
extern PFNDOLCREATERENDERBUFFERSPROC dolCreateRenderbuffers;
|
||||
extern PFNDOLNAMEDRENDERBUFFERSTORAGEPROC dolNamedRenderbufferStorage;
|
||||
extern PFNDOLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC dolNamedRenderbufferStorageMultisample;
|
||||
|
@ -412,5 +555,3 @@ extern PFNDOLTEXTUREBARRIERPROC dolTextureBarrier;
|
|||
#define glGetnHistogram dolGetnHistogram
|
||||
#define glGetnMinmax dolGetnMinmax
|
||||
#define glTextureBarrier dolTextureBarrier
|
||||
|
||||
|
||||
|
|
|
@ -30,9 +30,11 @@ bool cInterfaceAGL::Create(void *window_handle, bool core)
|
|||
s_backbuffer_width = size.width;
|
||||
s_backbuffer_height = size.height;
|
||||
|
||||
NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, core ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy, NSOpenGLPFAAccelerated, 0 };
|
||||
NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
|
||||
initWithAttributes: attr];
|
||||
NSOpenGLPixelFormatAttribute attr[] = {NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile,
|
||||
core ? NSOpenGLProfileVersion3_2Core :
|
||||
NSOpenGLProfileVersionLegacy,
|
||||
NSOpenGLPFAAccelerated, 0};
|
||||
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];
|
||||
if (fmt == nil)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "failed to create pixel format");
|
||||
|
@ -89,8 +91,7 @@ void cInterfaceAGL::Update()
|
|||
size.width *= scale;
|
||||
size.height *= scale;
|
||||
|
||||
if (s_backbuffer_width == size.width &&
|
||||
s_backbuffer_height == size.height)
|
||||
if (s_backbuffer_width == size.width && s_backbuffer_height == size.height)
|
||||
return;
|
||||
|
||||
s_backbuffer_width = size.width;
|
||||
|
@ -103,4 +104,3 @@ void cInterfaceAGL::SwapInterval(int interval)
|
|||
{
|
||||
[cocoaCtx setValues:(GLint*)&interval forParameter:NSOpenGLCPSwapInterval];
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue