how to turn off drawing to the window?

i got this answer before in another question i asked but it has since been deleted. I have a shader program that only has a vertex shader but when i run it i still get some output on the screen. so i was wondering; how i can turn off the output for my program? thanks :slight_smile:

glColorMask (0, 0, 0, 0) will do it.

A better solution would be glEnable(GL_RASTERIZER_DISCARD).

Do you want to disable output or disable rasterisation entirely?

GL_RASTERIZER_DISCARD will skip the entire rasterisation process.

Using glColorMask (or glDrawBuffer(GL_NONE)) will still perform rasterisation; it just won’t modify the colour buffer. It will still update the depth and stencil buffers (unless those are also disabled), sample counts, and any images, buffer variables or atomic variables written by a fragment shader.

i want to disable rasterization entirely. im gonna use glEnable(GL_RASTERIZER_DISCARD) thanks guys :slight_smile: