mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 06:04:34 +00:00
Removed legacy GLFWCALL.
This commit is contained in:
parent
105e927b84
commit
c5af4c4324
@ -37,7 +37,7 @@
|
||||
static int cursor_x = 0, cursor_y = 0;
|
||||
static int window_width = 640, window_height = 480;
|
||||
|
||||
static void GLFWCALL window_size_callback(int width, int height)
|
||||
static void window_size_callback(int width, int height)
|
||||
{
|
||||
window_width = width;
|
||||
window_height = height;
|
||||
@ -49,7 +49,7 @@ static void GLFWCALL window_size_callback(int width, int height)
|
||||
gluOrtho2D(0.f, window_width, 0.f, window_height);
|
||||
}
|
||||
|
||||
static void GLFWCALL mouse_position_callback(int x, int y)
|
||||
static void mouse_position_callback(int x, int y)
|
||||
{
|
||||
cursor_x = x;
|
||||
cursor_y = y;
|
||||
|
@ -162,7 +162,7 @@ static const char* get_character_string(int character)
|
||||
return result;
|
||||
}
|
||||
|
||||
static void GLFWCALL window_size_callback(int width, int height)
|
||||
static void window_size_callback(int width, int height)
|
||||
{
|
||||
printf("%08x at %0.3f: Window size: %i %i\n",
|
||||
counter++,
|
||||
@ -173,18 +173,18 @@ static void GLFWCALL window_size_callback(int width, int height)
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
static int GLFWCALL window_close_callback(void)
|
||||
static int window_close_callback(void)
|
||||
{
|
||||
printf("%08x at %0.3f: Window close\n", counter++, glfwGetTime());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void GLFWCALL window_refresh_callback(void)
|
||||
static void window_refresh_callback(void)
|
||||
{
|
||||
printf("%08x at %0.3f: Window refresh\n", counter++, glfwGetTime());
|
||||
}
|
||||
|
||||
static void GLFWCALL mouse_button_callback(int button, int action)
|
||||
static void mouse_button_callback(int button, int action)
|
||||
{
|
||||
const char* name = get_button_name(button);
|
||||
|
||||
@ -196,17 +196,17 @@ static void GLFWCALL mouse_button_callback(int button, int action)
|
||||
printf(" was %s\n", get_action_name(action));
|
||||
}
|
||||
|
||||
static void GLFWCALL mouse_position_callback(int x, int y)
|
||||
static void mouse_position_callback(int x, int y)
|
||||
{
|
||||
printf("%08x at %0.3f: Mouse position: %i %i\n", counter++, glfwGetTime(), x, y);
|
||||
}
|
||||
|
||||
static void GLFWCALL mouse_wheel_callback(int position)
|
||||
static void mouse_wheel_callback(int position)
|
||||
{
|
||||
printf("%08x at %0.3f: Mouse wheel: %i\n", counter++, glfwGetTime(), position);
|
||||
}
|
||||
|
||||
static void GLFWCALL key_callback(int key, int action)
|
||||
static void key_callback(int key, int action)
|
||||
{
|
||||
const char* name = get_key_name(key);
|
||||
|
||||
@ -250,7 +250,7 @@ static void GLFWCALL key_callback(int key, int action)
|
||||
}
|
||||
}
|
||||
|
||||
static void GLFWCALL char_callback(int character, int action)
|
||||
static void char_callback(int character, int action)
|
||||
{
|
||||
printf("%08x at %0.3f: Character 0x%04x", counter++, glfwGetTime(), character);
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#define GL_MULTISAMPLE_ARB 0x809D
|
||||
#endif
|
||||
|
||||
static void GLFWCALL window_size_callback(int width, int height)
|
||||
static void window_size_callback(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ static void toggle_mouse_cursor(void)
|
||||
cursor_enabled = !cursor_enabled;
|
||||
}
|
||||
|
||||
static void GLFWCALL mouse_position_callback(int x, int y)
|
||||
static void mouse_position_callback(int x, int y)
|
||||
{
|
||||
printf("Mouse moved to: %i %i\n", x, y);
|
||||
}
|
||||
|
||||
static void GLFWCALL key_callback(int key, int action)
|
||||
static void key_callback(int key, int action)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
@ -79,7 +79,7 @@ static void GLFWCALL key_callback(int key, int action)
|
||||
}
|
||||
}
|
||||
|
||||
static void GLFWCALL window_size_callback(int width, int height)
|
||||
static void window_size_callback(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
@ -53,19 +53,19 @@ static const char* get_mode_name(int mode)
|
||||
}
|
||||
}
|
||||
|
||||
static void GLFWCALL window_size_callback(int width, int height)
|
||||
static void window_size_callback(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
static int GLFWCALL window_close_callback(void)
|
||||
static int window_close_callback(void)
|
||||
{
|
||||
printf("Close callback triggered\n");
|
||||
closed = GL_TRUE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void GLFWCALL key_callback(int key, int action)
|
||||
static void key_callback(int key, int action)
|
||||
{
|
||||
if (action != GLFW_PRESS)
|
||||
return;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
static void GLFWCALL window_size_callback(int width, int height)
|
||||
static void window_size_callback(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user