GLScene Linux bug? lazarus / 70-OpenGL ---------------------------------------------------------------------- dicepd · 2017-08-28 08:46 I cannot get a GLSceneViewer to display on a tabbed pagecontrol at runtime. In design time I can see the scene, switch between tabs and all looks fine. However running the app all I get is a blank tabsheet. The navigator is reporting fps when I try to 'spin' the view, so it would appear to be rendering somewhere, but not getting drawn to to screen. This works fine in Win64. Linux version Mint 17.2 64bit fpc 3.0.4rc1 Laz  1.8.0rc4 x64_gtk Attached is the most basic of test app that shows the bug. This is what it should look like when run (screenshot from win64) Peter ---------------------------------------------------------------------- BeanzMaster · 2017-08-28 21:47 Hi Peter, I don't have Linux. I'm really need to install a version. I take a look in the code, and it seems the possible error provide from : 1st : It is internal to the LCL and the Tab component (but why ?) 2nd :  the problem can provide from GLWidgetContext.pas in "procedure TGLWidgetContext.DoGetHandles(outputDevice: HWND; out XWin: HWND);"  around line 143. The Handle may not be valid. It's all i can do at this time. Sorry to not be able to do more. Cheers ---------------------------------------------------------------------- dicepd · 2017-08-30 15:06 Quote2nd :  the problem can provide from GLWidgetContext.pas in "procedure TGLWidgetContext.DoGetHandles(outputDevice: HWND; out XWin: HWND);"  around line 143. The Handle may not be valid. Jerome I had a dig around this area and it would appear that the GTKWidget does not have a valid window as seen from the variable evaluation in a debug of this routine. There looks to be a valid input to the outputdevice parameter. so the call 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 XWin := GDK_WINDOW_XWINDOW(PGdkDrawable(vGTKWidget^.window));   is always going to return 0 if vGTKWidget^.window has a zero value. Peter Code: [Select] = {   ANOBJECT = {     PARENT_INSTANCE = {       G_TYPE_INSTANCE = {         G_CLASS = $1209ef0},       REF_COUNT = 1,       QDATA = $120a9e0},     FLAGS = 2100768},   PRIVATE_FLAGS = 15744,   STATE = 0,   SAVED_STATE = 0,   NAME = $0,   STYLE = $1122020,   REQUISITION = {     WIDTH = 0,     HEIGHT = 0},   ALLOCATION = {     X = 48,     Y = 132,     WIDTH = 302,     HEIGHT = 176},   WINDOW = $0,   PARENT = $11fc490} ---------------------------------------------------------------------- BeanzMaster · 2017-08-31 20:25 Hi, Peter, I've dig too. But not found anything. I don't understand well GTK2Widgets. And i can't test. The better will be ask in the Unix forum here. I'll do some deep search. In Waiting,  perhaps, try  changing vGTKWidget^.window to vGTKWidget^.parent^.Window One thing else you can try to add a TPanel on the tab and TGLViewer on this TPanel to see. jérôme. ---------------------------------------------------------------------- dicepd · 2017-09-02 09:10 Quote from: BeanzMaster on August 31, 2017, 10:25:16 pmIn Waiting,  perhaps, try  changing vGTKWidget^.window to vGTKWidget^.parent^.Window It would seem that none of the parents have a window attribute which is not $0. Quote from: BeanzMaster on August 31, 2017, 10:25:16 pmOne thing else you can try to add a TPanel on the tab and TGLViewer on this TPanel to see. Similar to above except I now have an extra parent with a null for the window atrribute. It would seem this is getting called before the GTKWidgets are properly initialised. I also am not very conversant with GTK window handling and the gtk model of doing things. None of the parents have thier positions or sizes set at the point this call is made, pos is -1,-1 and size is 1,1 for all parent widgets. Pos and size are set according to the properties set in the ide for the scene viewer though. Peter