diff --git a/components/opengl/glcarbonaglcontext.pas b/components/opengl/glcarbonaglcontext.pas index 64f4dcfb16..025df5ed87 100644 --- a/components/opengl/glcarbonaglcontext.pas +++ b/components/opengl/glcarbonaglcontext.pas @@ -40,8 +40,6 @@ function CreateOpenGLContextAttrList(DoubleBuffered: boolean; type - TWidgetSetWSWinControl = TCarbonWSWinControl; - TAGLControlInfo = record Control: ControlRef; WinControl: TWinControl; diff --git a/components/opengl/glgtkglxcontext.pas b/components/opengl/glgtkglxcontext.pas index e357a62daa..33a59a19df 100644 --- a/components/opengl/glgtkglxcontext.pas +++ b/components/opengl/glgtkglxcontext.pas @@ -25,10 +25,10 @@ uses Classes, SysUtils, LCLProc, LCLType, X, XUtil, XLib, gl, InterfaceBase, WSLCLClasses, {$IFDEF LCLGTK2} - LMessages, Gtk2Def, gdk2x, glib2, gdk2, gtk2, Gtk2Int, Gtk2WSControls, + LMessages, Gtk2Def, gdk2x, glib2, gdk2, gtk2, Gtk2Int, {$ENDIF} {$IFDEF LCLGTK} - glib, gdk, gtk, GtkInt, GtkWSControls, + glib, gdk, gtk, GtkInt, {$ENDIF} Controls; @@ -136,14 +136,6 @@ procedure LOpenGLDestroyContextInfo(AWinControl: TWinControl); function CreateOpenGLContextAttrList(DoubleBuffered: boolean; RGBA: boolean): PInteger; -type - {$IFDEF LCLGtk} - TWidgetSetWSWinControl = TGtkWSWinControl; - {$ENDIF} - {$IFDEF LCLGtk2} - TWidgetSetWSWinControl = TGtk2WSWinControl; - {$ENDIF} - implementation @@ -701,7 +693,7 @@ end; procedure LOpenGLSwapBuffers(Handle: HWND); begin - gtk_gl_area_swap_buffers(PGtkGLArea(Handle)); + gtk_gl_area_swap_buffers({%H-}PGtkGLArea(Handle)); end; function LOpenGLMakeCurrent(Handle: HWND): boolean; @@ -713,7 +705,7 @@ begin RaiseGDBException('LOpenGLSwapBuffers Handle=0'); Result:=false; - Widget:=PGtkWidget(PtrUInt(Handle)); + Widget:={%H-}PGtkWidget(PtrUInt(Handle)); glarea:=PGtkGLArea(Widget); if not GTK_IS_GL_AREA(glarea) then RaiseGDBException('LOpenGLSwapBuffers not a PGtkGLArea'); @@ -777,14 +769,14 @@ begin AttrList:=CreateOpenGLContextAttrList(DoubleBuffered,RGBA); try if SharedControl<>nil then begin - SharedArea:=PGtkGLArea(PtrUInt(SharedControl.Handle)); + SharedArea:={%H-}PGtkGLArea(PtrUInt(SharedControl.Handle)); if not GTK_IS_GL_AREA(SharedArea) then RaiseGDBException('LOpenGLCreateContext'); NewWidget:=gtk_gl_area_share_new(AttrList,SharedArea); end else begin NewWidget:=gtk_gl_area_new(AttrList); end; - Result:=HWND(PtrUInt(Pointer(NewWidget))); + Result:=HWND({%H-}PtrUInt(Pointer(NewWidget))); PGtkobject(NewWidget)^.flags:=PGtkobject(NewWidget)^.flags or GTK_CAN_FOCUS; {$IFDEF LCLGtk} TGTKWidgetSet(WidgetSet).FinishCreateHandle(AWinControl,NewWidget,AParams); diff --git a/components/opengl/glqtcontext.pas b/components/opengl/glqtcontext.pas index 4638971eaf..4dbc44f104 100644 --- a/components/opengl/glqtcontext.pas +++ b/components/opengl/glqtcontext.pas @@ -76,9 +76,6 @@ procedure LOpenGLDestroyContextInfo(AWinControl: TWinControl); function CreateOpenGLContextAttrList(DoubleBuffered: boolean; RGBA: boolean): PInteger; -type - TWidgetSetWSWinControl = TQTWSWinControl; - implementation type diff --git a/components/opengl/glwin32wglcontext.pas b/components/opengl/glwin32wglcontext.pas index fafae282b6..4968c442c4 100644 --- a/components/opengl/glwin32wglcontext.pas +++ b/components/opengl/glwin32wglcontext.pas @@ -37,8 +37,6 @@ procedure InitOpenGLContextGLWindowClass; type - TWidgetSetWSWinControl = TWin32WSWinControl; - TWGLControlInfo = record Window: HWND; DC: HDC; diff --git a/components/opengl/openglcontext.pas b/components/opengl/openglcontext.pas index 64dd0cbd03..716c67e73f 100644 --- a/components/opengl/openglcontext.pas +++ b/components/opengl/openglcontext.pas @@ -62,7 +62,7 @@ interface uses Classes, SysUtils, LCLProc, Forms, Controls, LCLType, LCLIntf, LResources, - Graphics, LMessages, WSLCLClasses, + Graphics, LMessages, WSLCLClasses, WSControls, {$IFDEF UseGtkGLX} GLGtkGlxContext; {$ENDIF} @@ -184,7 +184,7 @@ type { TWSOpenGLControl } - TWSOpenGLControl = class(TWidgetSetWSWinControl) + TWSOpenGLControl = class(TWSWinControl) published class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): HWND; override; diff --git a/examples/openglcontrol/openglcontrol_demo.lpi b/examples/openglcontrol/openglcontrol_demo.lpi index c3b7e99f39..3a7cbab600 100644 --- a/examples/openglcontrol/openglcontrol_demo.lpi +++ b/examples/openglcontrol/openglcontrol_demo.lpi @@ -54,6 +54,9 @@ + + +