Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void oslDrawFillCircle(int x, int y, float radius, OSL_COLOR color){
- OSL_LINE_VERTEX *vertices;
- vertices = (OSL_LINE_VERTEX*)sceGuGetMemory(36 * sizeof(OSL_LINE_VERTEX));
- color = oslBlendColor(color);
- int i;
- float angle;
- for (i = 0; i < 36; i++) {
- angle = i * 10;
- vertices[i].x = x + oslCos(angle, radius);
- vertices[i].y = y + oslSin(angle, radius);
- vertices[i].z = 0.0f;
- vertices[i].color = color;
- }
- int wasEnable = osl_textureEnabled;
- oslDisableTexturing();
- sceGuDrawArray(GU_TRIANGLE_FAN, GU_COLOR_8888|GU_VERTEX_16BIT|GU_TRANSFORM_2D, 36, 0, vertices);
- sceKernelDcacheWritebackRange(vertices, 36 * sizeof(OSL_LINE_VERTEX)); //SAKYA
- if(wasEnable) oslEnableTexturing();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement