Go to the documentation of this file.
30 #include <glad/glad.h>
38 #if defined(__APPLE__)
39 #define MODIFIER GLFW_MOD_SUPER
41 #define MODIFIER GLFW_MOD_CONTROL
46 printf(
"Usage: clipboard [-h]\n");
51 fprintf(
stderr,
"Error: %s\n", description);
72 printf(
"Clipboard contains \"%s\"\n",
string);
74 printf(
"Clipboard does not contain a string\n");
81 const char*
string =
"Hello GLFW World!";
83 printf(
"Setting clipboard to \"%s\"\n",
string);
89 int main(
int argc,
char** argv)
94 while ((ch =
getopt(argc, argv,
"h")) != -1)
112 fprintf(
stderr,
"Failed to initialize GLFW\n");
121 fprintf(
stderr,
"Failed to open GLFW window\n");
GLFWAPI void glfwSwapInterval(int interval)
Sets the swap interval for the current context.
#define GL_COLOR_BUFFER_BIT
static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
GLFWAPI void glfwTerminate(void)
Terminates the GLFW library.
The header of the GLFW 3 API.
GLsizei const GLchar *const * string
static GLFWwindow * window
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
Sets the error callback.
GLFWAPI void glfwWaitEvents(void)
Waits until events are queued and processes them.
GLFWAPI void glfwSwapBuffers(GLFWwindow *window)
Swaps the front and back buffers of the specified window.
int getopt(int argc, char *const argv[], const char *optstring)
int main(int argc, char **argv)
GLAPI int gladLoadGLLoader(GLADloadproc)
struct GLFWwindow GLFWwindow
void *(* GLADloadproc)(const char *name)
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
GLFWAPI GLFWglproc glfwGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
static void error_callback(int error, const char *description)
void key(GLFWwindow *window, int k, int s, int action, int mods)
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
static const textual_icon exit
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.
GLFWAPI void glfwSetWindowShouldClose(GLFWwindow *window, int value)
Sets the close flag of the specified window.
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01