2 void *SDL_CreateWindow();
3 void *SDL_CreateRenderer();
4 int SDL_SetRenderDrawColor();
5 int SDL_RenderDrawPoint();
7 int SDL_RenderPresent();
9 int SDL_DestroyRenderer();
10 int SDL_DestroyWindow();
30 fx
= (x
- W
/2)*4000 / W
;
31 fy
= (y
- H
/2)*4000 / H
;
35 for (n
=0; n
<200; n
++) {
36 if (zx
*zx
+ zy
*zy
> 4000000)
38 nx
= (zx
*zx
)/1000 - (zy
*zy
)/1000 + fx
;
44 SDL_SetRenderDrawColor(rnd
, 100, n
, n
, 255);
45 SDL_RenderDrawPoint(rnd
, x
, y
);
60 win
= SDL_CreateWindow("Mandelbrot MiniC", 0, 0, W
, H
, 0);
61 rnd
= SDL_CreateRenderer(win
, -1, 0);
64 col
= malloc(201 * sizeof (int));
66 for (n
=0; n
<200; n
++) {
76 SDL_RenderPresent(rnd
);
79 if (SDL_PollEvent(e
)) {
85 SDL_DestroyRenderer(rnd
);
86 SDL_DestroyWindow(win
);