• Welcome to Dark Bit Factory & Gravity.
 

Pixel shaders being buffered?

Started by efecto, November 15, 2009

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

efecto

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

Rbz

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 );


Challenge Trophies Won:

madeyes

Mandelbroth? Is that some sort of fractal soup? ;D ;)

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won: