Metal example code cleanup

This commit is contained in:
Camilla Berglund 2015-12-22 16:08:50 +01:00 committed by Camilla Löwy
parent 8eb2345347
commit 70297aeb49

View File

@ -24,16 +24,15 @@
//========================================================================
//! [code]
#import <Metal/Metal.h>
#import <QuartzCore/QuartzCore.h>
#import <simd/simd.h>
#define GLFW_INCLUDE_NONE
#import <GLFW/glfw3.h>
#define GLFW_EXPOSE_NATIVE_COCOA
#define GLFW_EXPOSE_NATIVE_NSGL
#import <GLFW/glfw3native.h>
#import <Metal/Metal.h>
#import <QuartzCore/QuartzCore.h>
#import <simd/simd.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
@ -53,11 +52,7 @@ int main(void)
{
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
if (!device)
{
exit(EXIT_FAILURE);
}
GLFWwindow* window;
glfwSetErrorCallback(error_callback);
@ -65,7 +60,7 @@ int main(void)
exit(EXIT_FAILURE);
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
window = glfwCreateWindow(640, 480, "Metal Example", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(640, 480, "Metal Example", NULL, NULL);
if (!window)
{
glfwTerminate();