mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-22 18:28:52 -05:00
Metal example code cleanup
This commit is contained in:
parent
8eb2345347
commit
70297aeb49
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user