Well im and asshole, didnt initialize shit.... anyways now it works
This commit is contained in:
70
Osmium.cpp
70
Osmium.cpp
@@ -9,10 +9,7 @@
|
||||
int main(int argc, char **argv) {
|
||||
std::cout << "Hello working!" << std::endl;
|
||||
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
|
||||
|
||||
glfwInit();
|
||||
@@ -22,11 +19,55 @@ int main(int argc, char **argv) {
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
|
||||
|
||||
|
||||
//make the window
|
||||
GLFWwindow *window = glfwCreateWindow(640, 480, "OpenGL Demo", NULL, NULL);
|
||||
if (!window) {
|
||||
|
||||
std::cout << "Failed to create GLFW window." << std::endl;
|
||||
glfwTerminate();
|
||||
return -1;
|
||||
}
|
||||
glfwMakeContextCurrent(window);
|
||||
//d
|
||||
|
||||
//load graphics
|
||||
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
|
||||
std::cerr << "Failed to initialize OpenGL loader!" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
glViewport(0, 0, 640, 480);
|
||||
//d
|
||||
|
||||
//now make ImGui
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
ImGui::StyleColorsDark();
|
||||
ImGui_ImplGlfw_InitForOpenGL(window, true);
|
||||
ImGui_ImplOpenGL3_Init("#version 130");
|
||||
///im a dumbass
|
||||
///d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//program
|
||||
while (!glfwWindowShouldClose(window)) {
|
||||
|
||||
glClearColor(1.0f,.5f,.2f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glfwPollEvents();
|
||||
|
||||
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
@@ -48,27 +89,6 @@ int main(int argc, char **argv) {
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
glfwSwapBuffers(window);
|
||||
|
||||
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
gladLoadGL();
|
||||
glViewport(0, 0, 640, 480);
|
||||
|
||||
|
||||
|
||||
|
||||
while (!glfwWindowShouldClose(window)) {
|
||||
|
||||
glClearColor(1.0f,.5f,.2f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glfwSwapBuffers(window);
|
||||
glfwPollEvents();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user