« Linuxにレジストリはないのか | メイン | Bitonic sort on GPU »

Drawing pixels on floating-point PBuffer

Although there are few people working around OpenGL 2.0, I've tried some GPGPU related things.
I successfully created a PBuffer which has two plane(FRONT and BACK) and tried to write/read it with DrawPixels and ReadPixels, but I couldn't.

In OpenGL 2.0 NVidia ForceWare 77.72

glDrawBuffer(GL_BACK_LEFT);
glDrawPixels(4, 1, GL_RED, GL_FLOAT, p);
glFlush();

This code didn't work. Something has happend on the surface, but nothing was written.

glReadBuffer(GL_BACK_LEFT);
glReadPixels(0, 0, 4, 1, GL_RED, GL_FLOAT, p);

This code worked fine because it returns glClearColor.

I've struggled with DrawPixels for while. At last, I gave up to use it and replaced them to glTexSubImage2D and glGetTexImage.

About

2005年08月18日 05:42に投稿されたエントリーのページです。

ひとつ前の投稿は「Linuxにレジストリはないのか」です。

次の投稿は「Bitonic sort on GPU」です。

他にも多くのエントリーがあります。メインページアーカイブページも見てください。

Powered by
Movable Type 3.34