mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +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 cursor_x = 0, cursor_y = 0;
|
||||||
static int window_width = 640, window_height = 480;
|
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_width = width;
|
||||||
window_height = height;
|
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);
|
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_x = x;
|
||||||
cursor_y = y;
|
cursor_y = y;
|
||||||
|
@ -162,7 +162,7 @@ static const char* get_character_string(int character)
|
|||||||
return result;
|
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",
|
printf("%08x at %0.3f: Window size: %i %i\n",
|
||||||
counter++,
|
counter++,
|
||||||
@ -173,18 +173,18 @@ static void GLFWCALL window_size_callback(int width, int height)
|
|||||||
glViewport(0, 0, width, 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());
|
printf("%08x at %0.3f: Window close\n", counter++, glfwGetTime());
|
||||||
return 1;
|
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());
|
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);
|
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));
|
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);
|
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);
|
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);
|
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);
|
printf("%08x at %0.3f: Character 0x%04x", counter++, glfwGetTime(), character);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#define GL_MULTISAMPLE_ARB 0x809D
|
#define GL_MULTISAMPLE_ARB 0x809D
|
||||||
#endif
|
#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);
|
glViewport(0, 0, width, height);
|
||||||
}
|
}
|
||||||
|
@ -49,12 +49,12 @@ static void toggle_mouse_cursor(void)
|
|||||||
cursor_enabled = !cursor_enabled;
|
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);
|
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)
|
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);
|
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);
|
glViewport(0, 0, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GLFWCALL window_close_callback(void)
|
static int window_close_callback(void)
|
||||||
{
|
{
|
||||||
printf("Close callback triggered\n");
|
printf("Close callback triggered\n");
|
||||||
closed = GL_TRUE;
|
closed = GL_TRUE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GLFWCALL key_callback(int key, int action)
|
static void key_callback(int key, int action)
|
||||||
{
|
{
|
||||||
if (action != GLFW_PRESS)
|
if (action != GLFW_PRESS)
|
||||||
return;
|
return;
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.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);
|
glViewport(0, 0, width, height);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user