GLScene MeshObjects lazarus / 70-OpenGL ---------------------------------------------------------------------- dicepd · 2017-08-22 11:26 Have got around to the next stage of my program where I need parametric mesh generation for both display and calculation. Borrowing from Jeromes code which he has offered at various times (GLMeshObjectHelper) I started off easy just trying to create a two tri plane (GLMeshObjectHelper uses quads, I need tris for computation reasons). All kind of works with the exception of the displayed faces. This is the basic code for generating the plane: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TTestMeshObject.MakePlane(width, depth: Single);var  X, Y: Single;begin  X := width / 2.0;  Y := depth / 2.0;   // define a rect coplanar to the xy plane  // raised by 12 units in the positive Z axis   // define vertices in CCW rotation from xy positive quadrant  AddNormal(0, 0, 1);    // normal is positive z for all vertices  AddTexCoords(0, 1);  AddVertex(X, Y, 12);   AddNormal(0, 0, 1);  AddTexCoords(1, 1);  AddVertex(X, -Y, 12);   AddNormal(0, 0, 1);  AddTexCoords(0, 1);  AddVertex(-X, -Y, 12);   AddNormal(0, 0, 1);  AddTexCoords(1, 0);  AddVertex(-X, Y, 12);   // Define two tris from a viewpoint looking towards neg Z  // i.e standard top viewpoint in a real world orientation  AddFace(0,1,2);  // top right, top left, bottom left     CCW winding  AddFace(0,2,3);  // top right, bottom left, bottom right  CCW winding   // This should result in a rect which is 12 units above the xy plane  // back culled faces should be the faces facing the origin. end;   However GLScene backculls the top of the plane and not the bottom. I can't change the winding order of the tris as that is the expected winding for computation routines. So something is wrong. Possibilties: I have done something wrong in the generation code and can no longer see the wood from the trees. I am missing some setting or not calling some base class method which should be called. I found a bug. Attached is a working test project which fully demonstrates the issue. Peter ---------------------------------------------------------------------- dicepd · 2017-08-22 12:52 Looks like my own stupidity Points 2 and 4 transposed. Ah well writing about it cleared the head. ---------------------------------------------------------------------- BeanzMaster · 2017-08-27 08:07 Hi, good  Don't remember if i don't answer here don't forget to post questions on : https://sourceforge.net/p/glscene/discussion/ Just a question the procedure MakePlane in my unit "GLMeshObjectHelpe" don't work correctly ? What is her last modified date ? because i posted severals version in GLScene's forum. Cheers