X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fflexui%2Ffui_gfx_gl.pas;h=a226deee0cc7175a2a7d7ddafadae3e1229d8992;hb=refs%2Fheads%2Fpone;hp=93992faeacfc65ffa435b00b200c54d9dc133269;hpb=281b90361877a19420b086d8729eb4b6aaf882fa;p=d2df-sdl.git diff --git a/src/flexui/fui_gfx_gl.pas b/src/flexui/fui_gfx_gl.pas index 93992fa..a226dee 100644 --- a/src/flexui/fui_gfx_gl.pas +++ b/src/flexui/fui_gfx_gl.pas @@ -21,11 +21,7 @@ unit fui_gfx_gl; interface uses -{$IFDEF USE_NANOGL} - nanoGL, -{$ELSE} - GL, GLExt, -{$ENDIF} + {$INCLUDE ../nogl/noGLuses.inc} SysUtils, Classes, SDL2, sdlcarcass, @@ -235,18 +231,14 @@ begin glMatrixMode(GL_MODELVIEW); glPushMatrix(); glMatrixMode(GL_TEXTURE); glPushMatrix(); glMatrixMode(GL_COLOR); glPushMatrix(); -{$IFNDEF USE_NANOGL} // FIXIT: nanoGL doesn't support glPushAttrib glPushAttrib({GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_CURRENT_BIT}GL_ALL_ATTRIB_BITS); // let's play safe -{$ENDIF} saved := true; end; procedure TSavedGLState.restore (); begin if (not saved) then raise Exception.Create('cannot restore unsaved OpenGL state'); -{$IFNDEF USE_NANOGL} // FIXIT: nanoGL doesn't support glPopAttrib glPopAttrib({GL_ENABLE_BIT}); -{$ENDIF} glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glMatrixMode(GL_TEXTURE); glPopMatrix(); @@ -329,11 +321,7 @@ type procedure TScissorSave.save (enableScissoring: Boolean); begin -{$IFDEF USE_NANOGL} // FIXIT: nanoGL doesn't support glIsEnabled - wassc := false; -{$ELSE} wassc := (glIsEnabled(GL_SCISSOR_TEST) <> 0); -{$ENDIF} if wassc then glGetIntegerv(GL_SCISSOR_BOX, @scxywh[0]) else glGetIntegerv(GL_VIEWPORT, @scxywh[0]); //conwritefln('(%d,%d)-(%d,%d)', [scxywh[0], scxywh[1], scxywh[2], scxywh[3]]); if enableScissoring and (not wassc) then glEnable(GL_SCISSOR_TEST);