Created
July 24, 2023 08:29
-
-
Save borja-munoz/8b8b30d780c6d29b44c92217db85ee72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clear the back buffer to black for the new frame | |
device_ptr->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); | |
device_ptr->BeginScene(); | |
// select which vertex format we are using | |
device_ptr->SetFVF(CUSTOMFVF); | |
// select the vertex buffer to display | |
device_ptr->SetStreamSource(0, v_buffer, 0, sizeof(CUSTOMVERTEX)); | |
// copy the vertex buffer to the back buffer | |
device_ptr->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 1); | |
device_ptr->EndScene(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment