i'm trying to understand the opengl viewport.
As i understand viewport is used for the resolution.
first question:
what i learned is that for windows i need <windows.h>, <gl/gl.h>, <gl/glu.h> and <stdlib.h>
for linux <windows.h> can be replaced with <x11/lib.h>
is this correct?
second question is about the viewport and like some explanation why i did get errors.
i expect to get a window with border and a error that no materix and/or no collor is defined.
first code:
1 2 3 4
|
int main(void)
{
GL_VIEWPORT(0, 0, 800, 600);
}
|
result
ERROR: term does not evaluate to a function taking 4 arguments.
second code:
1 2 3 4
|
void display()
{
glViewport(0, 0, 800, 600);
}
|
result:
ERROR: entry point must be defined.
last question:
why can't the resolution directly be placed in the viewport and what is the difference in the GL_VIEWPORT or glViewport?
i'm using c++ and try to prevend the use of aditional frameworks (keep it basic).
as you figgured out i try to program crossplatform.