Skip to main content
GameDev.net gamedev.net
🔒 Locked

Android opengl es render shader without triangles

Started by Crazy Coder NJ Aug 15, 2019 at 2:41 PM 3 replies 3.7k views
Original Post
Crazy Coder NJ
Crazy Coder NJ

Hello,


I start in opengl programming. I successfully render a face (2 triangles) with vertex and fragment shader. Now I want to see if it's also to render a shader whitout faces. I mean a shader that is simply painting the screen surface with color. Does someone has already done this kind of rendering?

Thank you for your help.

Coder for life
Crazy Coder NJ
Crazy Coder NJ

Thank you Diego for your answer. It's exactly what I did, using a face that match the screen but I was curious to know if it's possible to manipulate directly the framebuffer in shaders.

Thank you also for the link I will read it to have better knowledge on the pipeline.


Coder for life
wintertime
wintertime

You can use a single triangle with doubled side-lengths containing the whole screen and some outside, it will be clipped automatically and is a bit better than 2.

Though, for just a single color use glClear, as said above, because it doesn't need a shader.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.