Jump to content

Error in OpenGL code


Robert_d1968
 Share

Recommended Posts

In this section of code there is an Error...

 

while (!window->Closed())
    {
        iVec2 sz = subwindow->ClientSize();                        "It states that this is not declared"  What should it be declared as?
        glViewport(0, 0, sz.x, sz.y);
        glClearColor(0.15f, 0.15f, 0.15f, 1.0f);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        glBegin(GL_TRIANGLES);
        glColor3f(1, 0, 0);
        glVertex3f(0, 0.5, 0);
        glColor3f(0, 1, 0);
        glVertex3f(0.5, -0.5, 0);
        glColor3f(0, 0, 1);
        glVertex3f(-0.5, -0.5, 0);
        glEnd();

        SwapBuffers(hdc);
    }

Thanks for any help, Robert

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...