Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Korean translate#359

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
diskhkme wants to merge49 commits intoOverv:main
base:main
Choose a base branch
Loading
fromdiskhkme:kr_translate
Open
Changes from1 commit
Commits
Show all changes
49 commits
Select commitHold shift + click to select a range
5a4e2c2
kr translate, 00 and 01
diskhkmeSep 17, 2023
f2d96bd
kr translate 02 (except MacOS part)
diskhkmeSep 18, 2023
fff7580
kr translate 03-00-00 base code
diskhkmeSep 19, 2023
95c8ead
kr translate 03-00-01 instance
diskhkmeSep 19, 2023
603a24c
kr translate 03-00-02 validation layerr, backup
diskhkmeSep 27, 2023
a725ed0
kr translate 03-00-02 validation layer, finish
diskhkmeOct 12, 2023
5a8e529
kr translate 03-00-03 physical device
diskhkmeOct 12, 2023
806aa59
kr translate 03-00-04 logical device
diskhkmeOct 14, 2023
ad2d13f
kr translate 03-00-04 logical device, final
diskhkmeOct 14, 2023
dfdb3d2
kr translate update links of 03-00-02, 03
diskhkmeOct 14, 2023
c705993
kr translate 03-01-00 window surface
diskhkmeOct 14, 2023
a1e53f2
kr translate 03-01-01 swap chain
diskhkmeOct 15, 2023
7455fa4
kr translate 03-01-02 image view
diskhkmeOct 15, 2023
9fa6af7
kr translate 03-02-00 graphics pipeline, intro
diskhkmeOct 16, 2023
5b79abf
kr translate 03-02-01 shader modules
diskhkmeOct 17, 2023
a5d2faf
kr translate fixed mardown errors and links
diskhkmeOct 17, 2023
28d4c5c
kr translate 03-02-02 fixed functions
diskhkmeOct 18, 2023
fc35393
kr translate 03-02-03 render passes
diskhkmeOct 19, 2023
a0e18f4
kr translate 03-02-03 pipeline, conclusion
diskhkmeOct 19, 2023
8a05a13
kr translate 03-03-00 framebuffers
diskhkmeOct 21, 2023
81cee13
kr translate 03-03-01 drawing, framebuffers
diskhkmeOct 23, 2023
f9317ab
kr translate 03-03-02 drawing, command buffers
diskhkmeOct 23, 2023
2c9b387
kr translate fix typo
diskhkmeFeb 5, 2024
0b4c98c
kr translate fix typo
diskhkmeFeb 6, 2024
26cfdc5
kr translate fix typo
diskhkmeFeb 6, 2024
03ea8d3
kr translate 03-03-02 rendering and presentation
diskhkmeFeb 7, 2024
de9ddfa
Merge branch 'kr_translate' of https://github.com/diskhkme/VulkanTuto…
diskhkmeFeb 9, 2024
dc891b9
kr translate 03-03-03 frames in flight
diskhkmeFeb 9, 2024
b0b49f2
kr translate 03-03-04 swap chain recreation
diskhkmeFeb 9, 2024
36cc8e0
kr translate 04-00 vertex input desciption
diskhkmeFeb 9, 2024
896d406
kr translate 04-01 vertex buffer creation
diskhkmeFeb 12, 2024
2211065
kr translate 04-02 staging buffer
diskhkmeFeb 12, 2024
9aae27a
kr translate 04-03 index buffer
diskhkmeFeb 13, 2024
4808eb1
kr translate 05-00 descriptor layout and buffer
diskhkmeFeb 15, 2024
ecce6c6
kr translate fix newline inconsistency
diskhkmeFeb 15, 2024
5d456ab
kr translate add Korean glossary, fix terms
diskhkmeFeb 15, 2024
191faaa
kr translate 05-01 descriptor pool and sets
diskhkmeFeb 15, 2024
0378f74
kr translate 06-00 images (needs improvement)
diskhkmeFeb 17, 2024
d8d8401
kr translate 06-00 image view and sampler
diskhkmeFeb 19, 2024
16261a0
kr translate change translation
diskhkmeFeb 20, 2024
bbcb64f
kr translate 06-02 combined image sampler
diskhkmeFeb 20, 2024
39c8196
kr translate 07 depth buffering
diskhkmeFeb 28, 2024
eca0c50
kr translate 08 loading models
diskhkmeMar 4, 2024
69c5920
kr translate 09 generating mipmaps
diskhkmeMar 5, 2024
a7b5555
kr translate 10 multisampling
diskhkmeMar 11, 2024
e07abd6
kr translate 11 compute shader
diskhkmeMar 20, 2024
db544d4
kr translate 90 faq
diskhkmeMar 20, 2024
5dea1a4
Merge branch 'Overv:main' into kr_translate
diskhkmeMar 20, 2024
990a8f9
kr translate sync up to date
diskhkmeMar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
kr translate 03-00-04 logical device, final
  • Loading branch information
@diskhkme
diskhkme committedOct 14, 2023
commitad2d13fcf09b24b23d5876b36cb790c2988cf71f
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,29 +47,22 @@ queueCreateInfo.pQueuePriorities = &queuePriority;

## 사용할 장치 기능 명시하기


The next information to specify is the set of device features that we'll be
using. These are the features that we queried support for with
`vkGetPhysicalDeviceFeatures` in the previous chapter, like geometry shaders.
Right now we don't need anything special, so we can simply define it and leave
everything to `VK_FALSE`. We'll come back to this structure once we're about to
start doing more interesting things with Vulkan.
다음으로는 우리가 사용할 장치의 기능을 명시해야 합니다. 이는 이전 챕터의 지오메트리 셰이더를 `vkGetPhysicalDeviceFeatures`로 질의했던 것과 비슷합니다. 지금은 특별헌 기능이 필요 없으니 그냥 정의만 해 두고 모든 값을 `VK_FALSE`로 둡시다. 나중에 Vulkan을 사용해 좀 더 흥미로운 것들을 할 때 다시 이 구조체를 사용할 것입니다.

```c++
VkPhysicalDeviceFeatures deviceFeatures{};
```

##Creating the logical device
##논리적 장치 생성하기

With the previous two structures in place, we can start filling in the main
`VkDeviceCreateInfo` structure.
이전 두 개의 구조체가 준비되었으니 `VkDeviceCreateInfo` 구조체를 채워 봅시다.

```c++
VkDeviceCreateInfo createInfo{};
createInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
```

First add pointers to the queue creation info and device features structs:
먼저 큐 생성 정보와 장치 기능 구조체에 대한 포인터를 추가합니다.

```c++
createInfo.pQueueCreateInfos = &queueCreateInfo;
Expand All@@ -78,17 +71,11 @@ createInfo.queueCreateInfoCount = 1;
createInfo.pEnabledFeatures = &deviceFeatures;
```

The remainder of the information bears a resemblance to the
`VkInstanceCreateInfo` struct and requires you to specify extensions and
validation layers. The difference is that these are device specific this time.
나머지 정보는 `VkInstanceCreateInfo` 구조체와 비슷해서 확장이나 검증 레이어를 명시할 수 있습니다. 차이점은 이것들이 이번에는 장치에 종속적(device specific)이라는 것입니다.

An example of a device specific extension is `VK_KHR_swapchain`, which allows
you to present rendered images from that device to windows. It is possible that
there are Vulkan devices in the system that lack this ability, for example
because they only support compute operations. We will come back to this
extension in the swap chain chapter.
장치에 종속적인 확장 중 하나의 예시로는 `VK_KHR_swapchain`가 있는데, 렌더링된 이미지를 장치로부터 윈도우로 전달하는 기능입니다. 시스템의 Vulkan 장치가 이 기능을 지원하지 않을 수 있습니다. 예를 들어 계산 명령만 수행하는 장치일 경우에 그렇습니다. 이 확장에 대한 설명은 나중에 스왑 체인 챕터에서 다시 살펴볼 것입니다.

Previous implementations of Vulkan made a distinction between instance and device specific validation layers, but this is [no longer the case](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/chap40.html#extendingvulkan-layers-devicelayerdeprecation).That means that the`enabledLayerCount`and `ppEnabledLayerNames`fields of `VkDeviceCreateInfo` are ignored by up-to-date implementations. However, it is still a good idea to set them anyway to be compatible with older implementations:
Vulkan의 이전 구현에서는 인스턴스와 장치 종속적인 검증 레이어가 구분되어 있었으나, [지금은 아닙니다](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/chap40.html#extendingvulkan-layers-devicelayerdeprecation).즉, `VkDeviceCreateInfo`의`enabledLayerCount` `ppEnabledLayerNames`필드가 최신 구현에서는 무시됩니다. 하지만, 이전 버전과의 호환성을 위해 어쨌든 설정해 주는 것이 좋습니다.

```c++
createInfo.enabledExtensionCount = 0;
Expand All@@ -101,24 +88,19 @@ if (enableValidationLayers) {
}
```

We won't need any device specific extensions for now.
지금은 장치 종속적인 확장은 필요하지 않습니다.

That's it, we're now ready to instantiate the logical device with a call to the
appropriately named `vkCreateDevice` function.
이제 `vkCreateDevice` 함수를 사용해 논리적 장치를 생성할 준비가 되었습니다.

```c++
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
throw std::runtime_error("failed to create logical device!");
}
```

The parameters are the physical device to interface with, the queue and usage
info we just specified, the optional allocation callbacks pointer and a pointer
to a variable to store the logical device handle in. Similarly to the instance
creation function, this call can return errors based on enabling non-existent
extensions or specifying the desired usage of unsupported features.
매개변수들은 상호작용할 물리적 장치, 큐와 방금 명시한 사용 정보, 선택적으로 명시할 수 있는 콜백에 대한 포인터, 마지막으로 논리적 장치를 저장할 핸들에 대한 포인터입니다. 인스턴스 생성 함수와 유사하게 이 호출은 존재하지 않는 확장을 활성화 한다거나, 지원하지 않는 기능을 명시하는 경우 오류를 반환합니다.

The device should be destroyed in`cleanup` with the`vkDestroyDevice` function:
장치는`cleanup`에서`vkDestroyDevice`함수를 통해 소멸되어야 합니다.

```c++
void cleanup() {
Expand All@@ -127,33 +109,24 @@ void cleanup() {
}
```

Logical devices don't interact directly with instances, which is why it's not
included as a parameter.
논리적 장치는 인스턴스와 직접적으로 상호작용하지 않으므로 매개변수에 포함되지 않습니다.

##Retrieving queue handles
##큐 핸들 얻기(Retrieving)

The queues are automatically created along with the logical device, but we don't
have a handle to interface with them yet. First add a class member to store a
handle to the graphics queue:
큐는 논리적 장치와 함께 생성되지만 아직 이들과 상호작용하기 위한 핸들은 얻지 못했습니다. 먼저 그래픽스 큐에 대한 핸들을 클래스 멤버에 추가해 줍시다.

```c++
VkQueue graphicsQueue;
```

Device queues are implicitly cleaned up when the device is destroyed, so we
don't need to do anything in `cleanup`.
장치 큐는 장치가 소멸될 때 자동으로 정리되므로 `cleanup`에서 해 주어야 할 일은 따로 없습니다.

We can use the `vkGetDeviceQueue` function to retrieve queue handles for each
queue family. The parameters are the logical device, queue family, queue index
and a pointer to the variable to store the queue handle in. Because we're only
creating a single queue from this family, we'll simply use index `0`.
`vkGetDeviceQueue`함수를 사용해 각 큐 패밀리에 대한 핸들을 얻어올 수 있습니다. 매개변수는 논리적 장치, 큐 패밀리, 큐 인덱스, 큐 핸들을 저장할 변수의 포인터 입니다. 이 패밀리에서 하나의 큐만 생성하고 있으므로 인덱스는 간단히 `0`으로 설정하면 됩니다.

```c++
vkGetDeviceQueue(device, indices.graphicsFamily.value(), 0, &graphicsQueue);
```

With the logical device and queue handles we can now actually start using the
graphics card to do things! In the next few chapters we'll set up the resources
to present results to the window system.
논리적 장치와 큐의 핸들이 확보 되었으니 이제 실제로 그래픽 카드를 사용해 무언가를 할 수 있습니다! 다음 몇 개 챕터에서는 윈도우 시스템에 결과를 표시하기 위한 리소스들을 설정해 보겠습니다.

[C++ code](/code/04_logical_device.cpp)

[8]ページ先頭

©2009-2025 Movatter.jp