26 #include <glad/glad.h> 29 #define NK_IMPLEMENTATION 30 #define NK_INCLUDE_FIXED_TYPES 31 #define NK_INCLUDE_FONT_BAKING 32 #define NK_INCLUDE_DEFAULT_FONT 33 #define NK_INCLUDE_DEFAULT_ALLOCATOR 34 #define NK_INCLUDE_VERTEX_BUFFER_OUTPUT 35 #define NK_INCLUDE_STANDARD_VARARGS 38 #define NK_GLFW_GL2_IMPLEMENTATION 46 fprintf(stderr,
"Error: %s\n", description);
49 int main(
int argc,
char** argv)
53 struct nk_font_atlas* atlas;
83 area =
nk_rect(0.
f, 0.
f, (
float) width, (
float) height);
NK_API int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags)
GLFWAPI void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the client area of the specified window.
The header of the GLFW 3 API.
GLFWAPI GLFWglproc glfwGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
void *(* GLADloadproc)(const char *name)
static GLFWwindow * window
GLFWAPI float glfwGetWindowOpacity(GLFWwindow *window)
Returns the opacity of the whole window.
NK_API void nk_glfw3_shutdown(void)
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
Sets the error callback.
NK_API void nk_glfw3_render(enum nk_anti_aliasing)
#define GLFW_SCALE_TO_MONITOR
Window content area scaling window window hint.
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
NK_API void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols)
#define GL_COLOR_BUFFER_BIT
NK_API void nk_glfw3_new_frame(void)
NK_API struct nk_rect nk_rect(float x, float y, float w, float h)
NK_API struct nk_context * nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state)
GLFWAPI void glfwSwapInterval(int interval)
Sets the swap interval for the current context.
GLint GLsizei GLsizei height
GLFWAPI void glfwSwapBuffers(GLFWwindow *window)
Swaps the front and back buffers of the specified window.
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
int main(int argc, char **argv)
GLAPI int gladLoadGLLoader(GLADloadproc)
static const textual_icon exit
NK_API int nk_slider_float(struct nk_context *, float min, float *val, float max, float step)
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
GLFWAPI void glfwWaitEventsTimeout(double timeout)
Waits with timeout until events are queued and processes them.
GLFWAPI void glfwSetWindowOpacity(GLFWwindow *window, float opacity)
Sets the opacity of the whole window.
GLFWAPI void glfwTerminate(void)
Terminates the GLFW library.
NK_API void nk_glfw3_font_stash_end(void)
NK_API void nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas)
NK_API void nk_end(struct nk_context *ctx)
static void error_callback(int error, const char *description)
struct GLFWwindow GLFWwindow
GLFWAPI void glfwWindowHint(int hint, int value)
Sets the specified window hint to the desired value.
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.