You've already forked lazarus-ccr
Added check if OpenGL version 2.0 is loaded properly
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1806 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
9
components/nvidia-widgets/src/nvwidgets/nvglutwidgets.pas
Normal file → Executable file
9
components/nvidia-widgets/src/nvwidgets/nvglutwidgets.pas
Normal file → Executable file
@ -117,14 +117,15 @@ function GlutUIContext.init(w, h: integer): boolean;
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Load_GL_version_2_0;
|
if not Load_GL_version_2_0 then
|
||||||
|
begin
|
||||||
|
writeln('OpenGL version 2.0 not loaded properly');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
if not glext_ExtensionSupported('GL_ARB_vertex_program', '') or
|
if not glext_ExtensionSupported('GL_ARB_vertex_program', '') or
|
||||||
not glext_ExtensionSupported('GL_ARB_fragment_program', '') then
|
not glext_ExtensionSupported('GL_ARB_fragment_program', '') then
|
||||||
begin
|
|
||||||
Result := False;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
|
||||||
|
|
||||||
reshape(w, h);
|
reshape(w, h);
|
||||||
Result := True;
|
Result := True;
|
||||||
|
Reference in New Issue
Block a user