Skip to main content

Software Requirements Specification (SRS)

1. Overview

1.1 Purpose

본 문서는 Ghost 모듈의 소프트웨어 요구사항을 정의한다.

Ghost는 Grap 시스템의 Platform Layer (P2) 역할을 수행하는 라이브러리이며,
운영체제 플랫폼과 직접 통신하여 다음 기능을 제공한다.

  • Window 생성 및 관리
  • OS 이벤트 수집
  • NativeEvent 큐 제공
  • 시간 측정 기능
  • CPU Writable Surface 제공

본 문서는 현재 코드에 정의된 실제 타입, 클래스, 함수 기준으로만 요구사항을 명세한다.

추측 기반 기능이나 미래 기능은 포함하지 않는다.


1.2 Scope

Ghost 라이브러리는 다음 기능을 제공한다.

Window Management

Window 시스템은 다음 기능을 제공한다.

  • ghost::WindowDesc 기반 Window 생성
  • Window 파괴
  • 이벤트 폴링
  • 종료 상태 확인

관련 API

ghost::Window::create()
ghost::Window::destroy()
ghost::Window::poll_events()
ghost::Window::should_close()
ghost::Window::valid()

Native Event System

플랫폼 이벤트는 NativeEvent 형태로 수집된다.

관련 API

ghost::Window::native_events()

이 이벤트는 OS Raw 이벤트를 기반으로 생성된다.


CPU Presentation Surface

Window는 CPU에서 직접 접근 가능한 surface를 제공한다.

관련 API

ghost::Window::acquire_cpu_surface()
ghost::Window::release_cpu_surface()
ghost::Window::present()

CPU Surface는 다음 구조체로 표현된다.

ghost::CpuSurface

Time System

Ghost는 플랫폼 기반 monotonic clock을 제공한다.

관련 API

ghost::Clock::now()

1.3 Definitions

TermDescription
GhostPlatform abstraction layer
WindowOS Window abstraction
NativeEventRaw OS input event
CpuSurfaceCPU writable framebuffer
PixelFormatSurface pixel format
ClockStampTime stamp returned by Clock

1.4 Document Conventions

본 문서는 다음 규칙을 따른다.

  • 실제 코드에 정의된 API만 문서화
  • 추측 기반 기능 금지
  • 구현이 아닌 요구사항 중심 기술
  • 모든 코드 블록은 ~~~ 사용
  • 엔진 / 라이브러리 기술 문서 스타일 유지

1.5 Intended Audience

본 문서는 다음 사용자를 대상으로 한다.

  • Grap 엔진 개발자
  • Ghost 모듈 유지보수 개발자
  • 플랫폼 레이어 구현 개발자
  • 렌더러 또는 엔진 통합 개발자

1.6 Referenced Modules

본 SRS는 다음 Ghost 모듈 구조를 기준으로 작성된다.

ghost/
├── common/
├── id/
├── window/
├── time/
├── native_event/
├── platform/
└── tests/

각 모듈에 대한 상세 요구사항은 이후 섹션에서 정의된다.