Jump to content
View in the app

A better way to browse. Learn more.

ClassiCube Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

help with making cc plugin

im trying to draw something but its not working
i checked that these functions are getting called
 

void myscreen_render(void* elem, float delta)
{
    struct f3_screen* s = elem;
    
    Gfx_SetVertexFormat(VERTEX_FORMAT_COLOURED);
    Gfx_BindDynamicVb(s -> vb);
    Gfx_DrawVb_IndexedTris(3);
}

void myscreen_build_mesh(void* elem)
{
    struct f3_screen* s = elem;
    struct VertexColoured vb[3];
    
    vb[0].x = 0.0f; vb[0].y = 0.0f; vb[0].z = 1.0f;
    vb[1].x = 1.0f; vb[1].y = 0.0f; vb[1].z = 1.0f;
    vb[2].x = 0.0f; vb[2].y = 1.0f; vb[2].z = 1.0f;

    vb[0].Col = PackedCol_Make(255, 0, 0, 255);
    vb[1].Col = PackedCol_Make(0, 255, 0, 255);
    vb[2].Col = PackedCol_Make(0, 0, 255, 255);
    
    Gfx_SetVertexFormat(VERTEX_FORMAT_COLOURED);
    Gfx_SetDynamicVbData(s -> vb, vb, 3);
}

void myscreen_on_context_lost(void* elem)
{
    struct f3_screen* s = elem;
    
    Gfx_DeleteDynamicVb(&s -> vb);
}

void myscreen_on_context_recreated(void* elem)
{
    struct f3_screen* s = elem;
    
    s -> vb = Gfx_CreateDynamicVb(VERTEX_FORMAT_COLOURED, 3);
    s -> maxVertices = 3;
}

 

Solved by Rainb0wSkeppy

Go to solution

Featured Replies

READ THE RULES BEFORE YOU POST

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.