Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

OpenGL render strangeness

$
0
0

@sam_mcelhinney wrote:

Hello,

I am rendering a load of points via an OpenCL VBO but the image is coming out oddly. Code is as follows:

ofEnableDepthTest();
ofEnableBlendMode(OF_BLENDMODE_ALPHA);

glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);

glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo);
glVertexPointer(3, GL_FLOAT, sizeof( float4 ), 0);

glBindBufferARB(GL_ARRAY_BUFFER_ARB, cbo);
glColorPointer(4, GL_FLOAT, 0, 0);

glPointSize(1);
glDrawArrays(GL_POINTS, 0, counter);

glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glDisableClientState(GL_COLOR_ARRAY);
glPopMatrix();
ofEnableAlphaBlending();

Where the alpha blending of the points is set at 0.1. The images below are meant to show one cloudy disk, but half of the points appear to be occluded in some way and there is a plane appearing also.

How can I fix the occlusion issues in the output image?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles