Hi all,
I was playing around with pixel shader code in C++ and visual studio, and i have the following strange thing:
I had a mandelbroth rendered in a pixel shader.
I then removed all the logic from the pixel shader and basically had it returning a solid color for each pixel.
yet, after rebuilding the program, when i run the programm from withing visual studio or the exe the mandelbroth is still being displayed???
Are shaders being buffered?
What is going wrong?
tnx,
Efecto
Yes, this is normal, it's buffered in the front/back buffer, you need to clear back buffer an then flip it.
In Opengl you just need to execute the following code:
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
SwapBuffers ( hDC );
Mandelbroth? Is that some sort of fractal soup? ;D ;)
Sounds delicious.