gray
This commit is contained in:
parent
038aee2f1c
commit
a98844bf95
|
@ -3,6 +3,8 @@
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "renderer.h"
|
||||||
|
|
||||||
void errorCatcher(int id, const char* str);
|
void errorCatcher(int id, const char* str);
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
@ -12,7 +14,13 @@ int main() {
|
||||||
GLFWwindow *window = glfwCreateWindow(1200, 900, "GLTest", NULL, NULL);
|
GLFWwindow *window = glfwCreateWindow(1200, 900, "GLTest", NULL, NULL);
|
||||||
|
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
|
glewInit();
|
||||||
|
|
||||||
|
renderInit(window);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
render(window);
|
||||||
|
|
||||||
glfwSwapBuffers(window);
|
glfwSwapBuffers(window);
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
} while(!glfwWindowShouldClose(window));
|
} while(!glfwWindowShouldClose(window));
|
||||||
|
|
11
src/renderer.cpp
Normal file
11
src/renderer.cpp
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#include "renderer.h"
|
||||||
|
#include "GLFW/glfw3.h"
|
||||||
|
|
||||||
|
void renderInit(GLFWwindow* window) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void render(GLFWwindow* window) {
|
||||||
|
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
}
|
5
src/renderer.h
Normal file
5
src/renderer.h
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#pragma once
|
||||||
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
|
void renderInit(GLFWwindow* window);
|
||||||
|
void render(GLFWwindow* window);
|
Loading…
Reference in a new issue