Das zweite GLFW-Fenster wird nicht gerendert?C++

Programme in C++. Entwicklerforum
Anonymous
 Das zweite GLFW-Fenster wird nicht gerendert?

Post by Anonymous »

Ich habe mich für einen Doppelbildschirm entschieden, um das Quadrat als Drahtmodell statt als farbiges Quadrat anzuzeigen:

Code: Select all

#include 
#include 
#include 

void frameBuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow* window, GLFWwindow* secondWindow);

//vertex and fragment shaders
const char* vertexShaderSource = "#version 330 core\n"
"layout (location = 0) in vec3 aPos;\n"
"void main()\n"
"{\n"
" gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n"
"}\0";

const char* fragmentShaderSource = "#version 330 core\n"
"out vec4 FragColor;\n"
"void main()\n"
"{\n"
" FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
"}\n";

int success;
char infoLog[512];

int main()
{
//initialization and window hints
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_FLOATING, GLFW_TRUE);

//making the window
GLFWwindow* window = glfwCreateWindow(800, 800, "Square (Wireframe)", NULL, NULL);
//error handling
if (window == NULL) {
std::cout

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post