Dawn/src/dawnglfw/host/DawnGLFWHost.hpp
2022-10-25 20:55:05 -07:00

33 lines
793 B
C++

// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "host/DawnHost.hpp"
#define DAWN_GLFW_WINDOW_WIDTH_DEFAULT 1280
#define DAWN_GLFW_WINDOW_HEIGHT_DEFAULT 720
#define DAWN_GLFW_INIT_RESULT_INIT_FAILED -1
#define DAWN_GLFW_INIT_RESULT_WINDOW_CREATE_FAILED -2
#define DAWN_GLFW_START_RESULT_UPDATE_FAILED -1
namespace Dawn {
class DawnHostData {
public:
GLFWwindow *window;
};
}
// GLFW Callbacks
void glfwOnError(int error, const char* description);
void glfwOnResize(GLFWwindow *window, int32_t width, int32_t height);
void glfwOnKey(
GLFWwindow *window,
int32_t key, int32_t scancode, int32_t action, int32_t mods
);