본문 바로가기

프로그래밍

(287)
[iOS] 키보드를 따라 올라오는 뷰 해당 뷰의 bottom contraint 를 키보드 사이즈에 맞춰 변경(auto layout 을 사용하지 않는 경우 해당 뷰 프레임을 직접 변경) @IBOutlet weak var editView: NSLayoutConstraint! 키보드 이벤트 등록 NotificationCenter.default.addObserver( self, selector: #selector(MyViewController.keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil) NotificationCenter.default.addObserver( self, selector: #selector(MyViewController.keyboardWi..
[iOS] Google SignIn pod 'Firebase/Auth' pod 'GoogleSignIn' import GoogleSignIn import FirebaseAuth AppDelegate.swift class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate { } func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configuration() GIDSignIn.sharedInstance().clientID = "클라이언트ID" . . re..
xcode 11. ios13 미만, storyboard 없이 시작 삭제 프로젝트 General > Deployment Info Main interface 제거 SceneDelegate 제거 Info.plist Info.plist 의 Main nib file base name 항목 제거 되었는지 확인 Application Scene Manifeset 제거 AppDelegate class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // O..
XCFramework 만들기 프레임워크 빌드 sdk 에 맞춰 아카이빙이나 framework로 빌드할 수 있다. xcodebuild 관련 세부 내용 : xcodebuild (tistory.com) xcodebuild xcode 에서 프로젝트별 xcodebuild 기본 빌드 설정 프로젝트 > Info > Configurations Use Debug/Release for command-line builds 기본 적인 사용 -workspace {xcworkspace} -project {xcodeproj} -configurati.. liveupdate.tistory.com 스키마를 통한 빌드이므로, 대부분의 옵션은 빌드셋팅에 지정된 옵션으로 빌드가 이루어진다. xcodebuild archive -workspace PROJECT.xcworks..
[Android] EGL : 4 - 안드로이드 렌더링 EGL Surface , SurfaceTexture 이전 포스트에서 언급한바와같이 안드로이드 카메라의 프레임 데이터를 수신하기 위한 안드로이드 Surface는 opengl es의 pbuffer 텍스처를 통해 생성하게 된다. pbuffer 텍스처 -> SurfaceTexture -> Surface 를 생성해 카메라 api에 전달하게 되면, 카메라는 해당 Surface에 필요한 렌더링을 하게된다. (카메라 api에 따라 SurfaceTexture를 요구할 수도 있음) 이 텍스처는 external 타입의 텍스처이고, 텍스처로의 렌더링(PBO)은 카메라에서 수행하므로 텍스처 생성과 바인딩, 서피스 생성 외에는 특별히 처리할 일은 없다. 렌더링된 이 텍스처를 이제 원하는 화면에 렌더링해야 해야 하는데, 이때 사용..
[Android] EGL : 3 - 쉐이더 grafika 의 Texture2DProgram 을 통해 간단한 쉐이더를 파악해 본다. 쉐이더코드들은 코드 전체가 문자열로 저장한 뒤 컴파일해서 사용하게 된다. Fragment Shader의 경우 TextureTarget 별로 쉐이더 항목이 달라지므로, 필요한 처리를 위한 쉐이더 코드를 작성해 사용한다. VS Code 등에는 쉐이더 관련 익스텐션이 있으므로, 쉐이더 작성후에 안드로이드로 옮기는것도 방법. 참고사항 : 쉐이더의 각 변수는 변수앞에 형식을 정의하는데, 아래와 같다. uniform : 읽기전용으로 어플리케이션에서 전달하는값으로 vertex, fragment shader 공유 attribute : vertex shader 에 데이터를 전달할때 사용 varying : vertex shader 출력..
[Android] EGL : 2 - 텍스처 텍스처 생성 : 버퍼 int createImageTexture( ByteBuffer data, int width, int height, int format ) { // 텍스처 생성 int[] textures = new int[1]; GLES20.glGenTextures( 1, textures, 0); // 여러개의 텍스처를 사용하는 경우 특정 texture unit 활성화 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); // 바인딩 int texId = textures[0]; GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texId); // 필터링 설정 GLES20.glTexParameteri( GLES20.GL_TEXTURE_2D, GLES2..
[Android] EGL : 1 - 기본 구성 Grafika , WebRTC EGL 관련 내용들 검토를 위해 정리한 내용으로, 대부분의 소스는 grafika 에서 참조. 일반적인 비디오 전송시에는 크게 신경쓸 필요가 없으나 비디오 합성이나 3D 환경 구성을 위해서는 해당 내용에 대해 파악이 필요. EGL14 - api 17 EGL15 - api 29 EGL EGL10 의 경우에는 EGLContext.getEGL(); 메쏘드를 통해 egl 객체를 생성한 뒤에 사용했으나 EGL14의 경우에는 대부분 메쏘드가 static 형태로 변경되었음. EGL 을 사용하기 위한 기본 설정들로 한번 작성해 놓으면 변경할게 없는 보일러플레이트 코드들이다. 디스플레이, 컨텍스트, 버퍼 서피스 등을 생성한다. Display EGLDisplay mDisplay = EGL14...