Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental iOS Support #8407

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

dbratcher
Copy link

Sets up an iOS project and experiments with getting resources to load in the iOS system

@dbratcher dbratcher mentioned this pull request Feb 15, 2024
1 task
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/2)

@@ -23,6 +23,8 @@
#include <ostream>
#include <stdexcept>

#include <CoreFoundation/CoreFoundation.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
CoreFoundation/CoreFoundation.h file not found

*/

/* Include the SDL main definition header */
#include "SDL_main.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
SDL_main.h file not found

#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
typedef metal::int32_t EnumBackingType;
#else
#import <Foundation/Foundation.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-import-preprocessor-directive-pedantic ⚠️
#import is a language extension

#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
typedef metal::int32_t EnumBackingType;
#else
#import <Foundation/Foundation.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
Foundation/Foundation.h file not found

typedef metal::int32_t EnumBackingType;
#else
#import <Foundation/Foundation.h>
typedef NSInteger EnumBackingType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ modernize-use-using ⚠️
use using instead of typedef

Suggested change
typedef NSInteger EnumBackingType;
using EnumBackingType = int;


#include <simd/simd.h>

typedef NS_ENUM(EnumBackingType, BufferIndex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-named-parameter ⚠️
all parameters should be named in a function

Suggested change
typedef NS_ENUM(EnumBackingType, BufferIndex)
typedef NS_ENUM(EnumBackingType /*unused*/, BufferIndex /*unused*/)

BufferIndexUniforms = 2
};

typedef NS_ENUM(EnumBackingType, VertexAttribute)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-named-parameter ⚠️
all parameters should be named in a function

Suggested change
typedef NS_ENUM(EnumBackingType, VertexAttribute)
typedef NS_ENUM(EnumBackingType /*unused*/, VertexAttribute /*unused*/)

VertexAttributeTexcoord = 1,
};

typedef NS_ENUM(EnumBackingType, TextureIndex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-named-parameter ⚠️
all parameters should be named in a function

Suggested change
typedef NS_ENUM(EnumBackingType, TextureIndex)
typedef NS_ENUM(EnumBackingType /*unused*/, TextureIndex /*unused*/)

TextureIndexColor = 0,
};

typedef struct
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ modernize-use-using ⚠️
use using instead of typedef

Suggested change
typedef struct
using Uniforms = struct

{
matrix_float4x4 projectionMatrix;
matrix_float4x4 modelViewMatrix;
} Uniforms;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ modernize-use-using ⚠️
use using instead of typedef

Suggested change
} Uniforms;
};

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (2/2)

TextureIndexColor = 0,
};

typedef struct
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: projectionMatrix, modelViewMatrix

@@ -26,6 +26,7 @@
#include <fstream>
#include <memory>
#include <utility>
#include <CoreFoundation/CoreFoundation.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
CoreFoundation/CoreFoundation.h file not found

@zenseii
Copy link
Collaborator

zenseii commented Feb 20, 2024

Hi, @dbratcher. I know you said you were busy and wouldn't have much time to look into. If you ever do, could you please address the build check comments? Thank you!

@ihhub ihhub marked this pull request as draft March 7, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants