Homebrew citro3d - how to rotate 2d sprite

Pepepuhn

Active Member
OP
Newcomer
Joined
Sep 30, 2013
Messages
30
Trophies
0
Age
36
XP
326
Country
Germany
Hi,
I am trying to modify the following "gpusprites" example of devkitPro:
https://github.com/devkitPro/3ds-examples/blob/master/graphics/gpu/gpusprites/source/main.c

What I am trying to achieve is, I want to rotate in 2d each sprite individually..
Can someone help me?

Currently I am just modifying the sceneRender() function:
Code:
static void sceneRender(void) {
//---------------------------------------------------------------------------------

    int i;
    for(i = 0; i < NUM_SPRITES; i++) {

        Mtx_RotateZ(&projection, 0.1f, false);

        // Update the uniforms
        C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, uLoc_projection, &projection);

        drawSprite( sprites[i].x, sprites[i].y, 32, 32, sprites[i].image);
    }

}

However it doesn't yield the desired result.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: ... that's rough buddy