gryphn texture API
This commit is contained in:
@@ -8,7 +8,7 @@ gnReturnCode gnCreateFramebufferFn(struct gnFramebuffer_t* framebuffer, struct g
|
||||
|
||||
VkImageView* attachments = malloc(sizeof(VkImageView) * info.attachmentCount);
|
||||
for (int i = 0; i < info.attachmentCount; i++)
|
||||
attachments[i] = info.attachments[i]->texture->imageView;
|
||||
attachments[i] = info.attachments[i]->texture->image.imageView;
|
||||
|
||||
VkFramebufferCreateInfo framebufferInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
|
||||
|
@@ -116,8 +116,8 @@ gnReturnCode gnCreatePresentationQueueFn(gnPresentationQueueHandle presentationQ
|
||||
if (vkCreateImageView(device->outputDevice->device, &imageViewCreateInfo, NULL, &presentationQueue->presentationQueue->swapChainImageViews[i]) != VK_SUCCESS)
|
||||
return GN_FAILED_TO_CREATE_IMAGE_VIEW;
|
||||
|
||||
presentationQueue->images[i]->texture->image = presentationQueue->presentationQueue->swapChainImages[i];
|
||||
presentationQueue->images[i]->texture->imageView = presentationQueue->presentationQueue->swapChainImageViews[i];
|
||||
presentationQueue->images[i]->texture->image.image = presentationQueue->presentationQueue->swapChainImages[i];
|
||||
presentationQueue->images[i]->texture->image.imageView = presentationQueue->presentationQueue->swapChainImageViews[i];
|
||||
}
|
||||
|
||||
return GN_SUCCESS;
|
||||
|
@@ -115,7 +115,7 @@ gnReturnCode gnCreateTextureFn(gnTexture texture, gnDevice device, const gnTextu
|
||||
.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT,
|
||||
.samples = VK_SAMPLE_COUNT_1_BIT,
|
||||
.extent = {
|
||||
.width = 100,
|
||||
.width = info.width,
|
||||
.height = info.height,
|
||||
.depth = 1
|
||||
},
|
||||
@@ -147,6 +147,8 @@ gnReturnCode gnCreateTextureFn(gnTexture texture, gnDevice device, const gnTextu
|
||||
texture->texture->width = info.width;
|
||||
texture->texture->height = info.height;
|
||||
|
||||
texture->texture->beenWrittenToo = gnFalse;
|
||||
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user