Skip to content

feat(vk-wrapper) implement texture mapping#96

Merged
ripel2 merged 22 commits intomainfrom
86-texture-mapping
Mar 12, 2025
Merged

feat(vk-wrapper) implement texture mapping#96
ripel2 merged 22 commits intomainfrom
86-texture-mapping

Conversation

@MasterLaplace
Copy link
Contributor

@MasterLaplace MasterLaplace commented Feb 20, 2025

Related to:

image

VkWrapper vkWrapper;

// Add a texture in cache that will be prepared for the vulkan pipeline (Image, ImageView, Sampler, ect...)
uint32_t textureId;
vkWrapper.AddTexture(ASSETS_DIR "images/texture.png", textureId);

// Add a model in cache that will be prepared for the vulkan pipeline (VertexBuffer, IndexBuffer, UniformBuffer, ect...) not entirely implemented yet
uint32_t modelId;
vkWrapper.AddModel(ASSETS_DIR "models/plan.obj", modelId);

// Bind the texture to the model so it can be used in the pipeline, not entirely implemented yet
vkWrapper.BindTexture(textureId, modelId);

// Add a shader in cache that will be used in the pipeline (Vertex and Fragment shaders)
vkWrapper.AddShader(SHADER_DIR "vert.spv", "main", VkWrapper::ShaderType::VERTEX);
vkWrapper.AddShader(SHADER_DIR "frag.spv", "main", VkWrapper::ShaderType::FRAGMENT);

vkWrapper.CreatePipeline();

while (!window.ShouldClose())
{
    vkWrapper.DrawFrame();
}

@MasterLaplace MasterLaplace added the enhancement New feature or request label Feb 20, 2025
@MasterLaplace MasterLaplace self-assigned this Feb 20, 2025
@MasterLaplace MasterLaplace linked an issue Feb 20, 2025 that may be closed by this pull request
@MasterLaplace MasterLaplace requested a review from Miou-zora March 11, 2025 15:47
@MasterLaplace MasterLaplace marked this pull request as ready for review March 11, 2025 15:49
@MasterLaplace MasterLaplace requested review from ripel2 and removed request for Miou-zora March 11, 2025 15:50
@MasterLaplace MasterLaplace changed the title 86 texture mapping feat(vkwrapper) implement texture mapping Mar 11, 2025
@MasterLaplace MasterLaplace changed the title feat(vkwrapper) implement texture mapping feat(vk-wrapper) implement texture mapping Mar 11, 2025
@sonarqubecloud
Copy link

@ripel2 ripel2 enabled auto-merge (squash) March 12, 2025 09:50
@ripel2 ripel2 merged commit 2e12979 into main Mar 12, 2025
10 checks passed
@ripel2 ripel2 deleted the 86-texture-mapping branch March 12, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Texture mapping

2 participants