bruh bulb check gave +5fps

parent 1ebae6b9
No preview for this file type
No preview for this file type
......@@ -11,6 +11,7 @@
#include <complex.h>
#include <CL/cl.h>
#include <omp.h>
#include <x86intrin.h>
#include "mandelbrot.h"
#include "mouse.h"
......@@ -20,13 +21,21 @@
* 1. Store iterations instead of colors ?
* 1.1 memory usage vs performance loss ??? (cant draw in parallel anyway)
* 2. Look into SDL2 rendering
* 2.1 texture tendering DONE
* 2.2 fix colors ???
* 3. employ SSE2
* 3.1 x86intrin.h
* 3.2 inline assembly
*/
int
mandelbrot(Complex c) {
// builb check
if ((c.real + 1.0) * (c.real + 1.0) + c.imag * c.imag <= 0.25)
return MAX_ITERATIONS;
Complex z = {0.0, 0.0};
int i;
......@@ -185,6 +194,12 @@ main(void)
case SDL_WINDOWEVENT:
if(event.window.event == SDL_WINDOWEVENT_RESIZED){
SDL_GetWindowSize(app.window, &app.win_width, &app.win_height);
SDL_DestroyTexture(app.texture);
app.texture = SDL_CreateTexture(app.renderer,
SDL_PIXELFORMAT_RGBA8888,
SDL_TEXTUREACCESS_STREAMING,
app.win_width, app.win_height);
}
break;
case SDL_KEYDOWN:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment