Skip to content

remove duplicate UploadMeshData calls on the same mesh #11

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apilatosba
Copy link

good morning. In all changed files, after LoadOBJ() is called, UploadMeshData() is called on the returned mesh:

    // LESSON 04: Load 3d model
    Mesh mesh = LoadOBJ("resources/dwarf.obj");     // Load mesh data from OBJ file
    UploadMeshData(&mesh);                          // Upload mesh data to GPU memory (VRAM)

but UploadMeshData() is also called inside the LoadOBJ() function right before return statement:

    // Upload mesh data into VRAM
    UploadMeshData(&mesh);

    return mesh;

so UploadMeshData() is unnecessary in LoadOBJ() function. or vice versa, we should keep UploadMeshData() in LoadOBJ() and remove the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant