PDA

View Full Version : rendering to multiple targets



boldt
11-22-2002, 04:22 AM
Is it possible to render to several textures in one pass?

It's also possible rendering to multiple textures using the arb_fragment_program extension. If so, how it's done.

Asgard
11-22-2002, 04:34 AM
Is it possible to render to several textures in one pass?

AFAIK currently only DirectX 9 allows this.


It's also possible rendering to multiple textures using the arb_fragment_program extension.

If that was supposed to be a question: No it's not possible with ARBfp.

Cheers.

Humus
11-22-2002, 04:48 AM
I think this is what GL_ATI_draw_buffers does. From glATI.h,

#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
#define GL_DRAW_BUFFER0_ATI 0x8825
#define GL_DRAW_BUFFER1_ATI 0x8826
#define GL_DRAW_BUFFER2_ATI 0x8827
#define GL_DRAW_BUFFER3_ATI 0x8828
#define GL_DRAW_BUFFER4_ATI 0x8829
#define GL_DRAW_BUFFER5_ATI 0x882A
#define GL_DRAW_BUFFER6_ATI 0x882B
#define GL_DRAW_BUFFER7_ATI 0x882C
#define GL_DRAW_BUFFER8_ATI 0x882D
#define GL_DRAW_BUFFER9_ATI 0x882E
#define GL_DRAW_BUFFER10_ATI 0x882F
#define GL_DRAW_BUFFER11_ATI 0x8830
#define GL_DRAW_BUFFER12_ATI 0x8831
#define GL_DRAW_BUFFER13_ATI 0x8832
#define GL_DRAW_BUFFER14_ATI 0x8833
#define GL_DRAW_BUFFER15_ATI 0x8834

typedef void (APIENTRY * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);

I'm not sure I understand how to use it though :/, hoping we'll see a spec soon.