openglcontrol: clean up

git-svn-id: trunk@13867 -
This commit is contained in:
mattias 2008-01-24 19:59:14 +00:00
parent e1c029f87b
commit e0392bcca2
2 changed files with 8 additions and 12 deletions

View File

@ -403,6 +403,7 @@ begin
dpy := GetDefaultXDisplay;
{$IFDEF lclgtk2}
if visual=nil then ;
vi:=glXChooseVisual(dpy, DefaultScreen(dpy), @attrList[0]);
{$ELSE}
if visual=nil then exit;
@ -701,7 +702,7 @@ begin
RaiseGDBException('LOpenGLSwapBuffers Handle=0');
Result:=false;
Widget:=PGtkWidget(Pointer(Handle));
Widget:=PGtkWidget(PtrUInt(Handle));
glarea:=PGtkGLArea(Widget);
if not GTK_IS_GL_AREA(glarea) then
RaiseGDBException('LOpenGLSwapBuffers not a PGtkGLArea');
@ -734,7 +735,7 @@ begin
end else begin
NewWidget:=gtk_gl_area_new(AttrList);
end;
Result:=HWND(Pointer(NewWidget));
Result:=HWND(PtrUInt(Pointer(NewWidget)));
PGtkobject(NewWidget)^.flags:=PGtkobject(NewWidget)^.flags or GTK_CAN_FOCUS;
{$IFDEF LCLGtk}
TGTKWidgetSet(WidgetSet).FinishCreateHandle(AWinControl,NewWidget,AParams);

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<Package Version="3">
<Name Value="LazOpenGLContext"/>
<CompilerOptions>
<Version Value="5"/>
@ -14,7 +14,7 @@
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="6">
<Files Count="5">
<Item1>
<Filename Value="openglcontext.pas"/>
<HasRegisterProc Value="True"/>
@ -40,20 +40,15 @@
<AddToUsesPkgSection Value="False"/>
<UnitName Value="GLWin32WGLContext"/>
</Item5>
<Item6>
<Filename Value="glgtk2glxcontext.pas"/>
<AddToUsesPkgSection Value="False"/>
<UnitName Value="GLGtk2GLXContext"/>
</Item6>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="LCL"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPkgs>
<UsageOptions>