Hi Hernan,
I just added two new examples, UFFIOpenGLOffscreenSamples >> #triangle and UFFIOpenGLOffscreenSamples >> #quad (using your vertices). I tested it on Linux and on OS X.
triangle
������ "
������ self new triangle
������ "
������ | context gl fb colorProgram vertexBuffer |
������ context := UFFIOpenGLContext new.
������ colorProgram := self colorProgramFor: context.
������ vertexBuffer := self immutableVertexBufferFor: context withPackedFloats: {
������ ������ "���� x���������� y�������� z�������� r�������� g�������� b�������� a "
������ ������ { -0.5 . 0.5 . 0.0 . 1.0 . 0.0 . 0.0 . 1.0 }.
������ ������ {�� 0.5 . 0.5 . 0.0 . 0.0 . 1.0 . 0.0 . 1.0 }.
������ ������ {�� 0.0 . -0.5 . 0.0 . 0.0 . 0.0 . 1.0 . 1.0 }.
������ }.
������
������ gl := context gl.
������ fb := context offscreenBufferExtent: 640@480.
������ context asCurrentDo: [
������ ������ fb activate.
������ ������ gl
������ ������ ������ viewport_x: 0 y: 0 width: 640 height: 480;
������ ������ ������
������ ������ ������ clearColor_red: 0.0 green: 0.0 blue: 0.0 alpha: 1.0;
������ ������ ������ clear: GL_COLOR_BUFFER_BIT;
������ ������ ������
������ ������ ������ useProgram: colorProgram validHandle;
������ ������ ������
������ ������ ������ bindBuffer_target: GL_ARRAY_BUFFER buffer: vertexBuffer validHandle.
������ ������ self activateDefaultVertexLayoutOn: context.
������ ������
������ ������ gl drawArrays_mode: GL_TRIANGLES first: 0 count: 3
������ ].
������ fb asForm asMorph openInWindow.
Best regards,
Ronie