Making brick wall texture programmatically

Hi,

I new with OpenGL and I need to do brick wall texture programmatically. Can anybody give me a hint how that can be done.

Thanks.

-Zogger

Why don’t you just take a picture of a brick and use that?

Synthesizing a texture has nothing to do with OpenGL. Use Photoshop or some other graphics app to do it.

A GLSL brick shader :
http://developer.3dlabs.com/openGL2/downloads/ogl2brick.zip

It is a school project and the texture must be done programmatically, that why I can’t use picture of a brick. It doesn’t have to be brick though. Just something to decorate the walls.