commit
0a196b0090
@ -69,7 +69,7 @@ void BlocksRenderer::face(const vec3& coord, float w, float h,
|
||||
vertex(coord + axisX * w, region.u2, region.v1, lights[1] * tint);
|
||||
vertex(coord + axisX * w + axisY * h, region.u2, region.v2, lights[2] * tint);
|
||||
vertex(coord + axisY * h, region.u1, region.v2, lights[3] * tint);
|
||||
index(0, 1, 3, 0, 2, 3);
|
||||
index(0, 1, 3, 1, 2, 3);
|
||||
}
|
||||
|
||||
void BlocksRenderer::face(const vec3& coord, float w, float h,
|
||||
|
||||
@ -80,7 +80,17 @@ int keycode::NUM_LOCK = GLFW_KEY_NUM_LOCK;
|
||||
int keycode::LEFT_BRACKET = GLFW_KEY_LEFT_BRACKET;
|
||||
int keycode::RIGHT_BRACKET = GLFW_KEY_RIGHT_BRACKET;
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif // _WIN32
|
||||
|
||||
const char* keycode::name(int code) {
|
||||
#ifdef _WIN32
|
||||
char name[64];
|
||||
int result = GetKeyNameTextA(glfwGetKeyScancode(code) << 16, name, 64);
|
||||
if (result == NULL) return "Unknown";
|
||||
return name;
|
||||
#else
|
||||
const char* name = glfwGetKeyName(code, glfwGetKeyScancode(code));
|
||||
if (name == nullptr) {
|
||||
switch (code) {
|
||||
@ -129,6 +139,7 @@ const char* keycode::name(int code) {
|
||||
}
|
||||
}
|
||||
return name;
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
int mousecode::BUTTON_1 = GLFW_MOUSE_BUTTON_1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user