mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Oh, right, this is C.
This commit is contained in:
parent
3f986541dd
commit
39a966d136
@ -566,6 +566,7 @@ void DrawGrid( void )
|
|||||||
int main( void )
|
int main( void )
|
||||||
{
|
{
|
||||||
int running;
|
int running;
|
||||||
|
GLFWwindow window;
|
||||||
|
|
||||||
/* Init GLFW */
|
/* Init GLFW */
|
||||||
if( !glfwInit() )
|
if( !glfwInit() )
|
||||||
@ -576,7 +577,7 @@ int main( void )
|
|||||||
|
|
||||||
glfwOpenWindowHint(GLFW_DEPTH_BITS, 16);
|
glfwOpenWindowHint(GLFW_DEPTH_BITS, 16);
|
||||||
|
|
||||||
GLFWwindow window = glfwOpenWindow( 400, 400, GLFW_WINDOWED );
|
window = glfwOpenWindow( 400, 400, GLFW_WINDOWED );
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "Failed to open GLFW window\n" );
|
fprintf( stderr, "Failed to open GLFW window\n" );
|
||||||
|
@ -45,6 +45,7 @@ static void window_size_callback(GLFWwindow window, int width, int height)
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
int samples;
|
||||||
GLFWwindow window;
|
GLFWwindow window;
|
||||||
|
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
@ -68,7 +69,7 @@ int main(void)
|
|||||||
glfwSetWindowSizeCallback(window, window_size_callback);
|
glfwSetWindowSizeCallback(window, window_size_callback);
|
||||||
glfwSwapInterval(1);
|
glfwSwapInterval(1);
|
||||||
|
|
||||||
int samples = glfwGetWindowParam(window, GLFW_FSAA_SAMPLES);
|
samples = glfwGetWindowParam(window, GLFW_FSAA_SAMPLES);
|
||||||
if (samples)
|
if (samples)
|
||||||
printf("Context reports FSAA is supported with %i samples\n", samples);
|
printf("Context reports FSAA is supported with %i samples\n", samples);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user