Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFML2 sample: add pushGLStates/popGLStates around the GWEN display call #59

Open
lonestarr opened this issue Jun 10, 2013 · 0 comments
Open

Comments

@lonestarr
Copy link

Hi,
The SFML2 sample shows this to render Gwen:

App.clear();
pCanvas->RenderCanvas();
App.display();

It works as long as you don't render anything else than GWEN, otherwise the OpenGL states are screwed-up.
It's ok with pushGLStates/popGLStates around the GWEN display call:

App.clear();
doRenderMy3DWorld();
App.pushGLStates();
pCanvas->RenderCanvas();
App.popGLStates();
App.display();

No big deal anyway.

billyquith added a commit to billyquith/GWork that referenced this issue Aug 13, 2016
billyquith added a commit to billyquith/GWork that referenced this issue Aug 14, 2016
* gwork: (54 commits)
  Use for-range
  Store and restore OpenGL states whilst rendering - Thanks to @lonestarr - garrynewman/GWEN#59
  Tidy.
  Specific directory for SFML2 resource loading - Use directory relative to application executable. - Fixes issue #29 - Fix app resource copy for non-bundled apps.
  Add editor config.
  Use cmake file properties to set bundle resources for OSX.
  Replace deprecated method - SFML2.4 setColor deprecated
  Tidy.
  If tall menu descends off screen then clamp to screen height - Thanks to @qehgt - garrynewman/GWEN@c8aacf8
  Include correct dialog header. - Thanks to @kklouzal - garrynewman/GWEN#95
  Correct spelling of caret. - Thanks to @kklouzal garrynewman/GWEN#93
  comment cannot be on same line.
  Disable use of CTT for color picker. - Address issue #27. - Temporarily disable cache to texture. Broken with Allegro 5.2.
  cmake: Make MacOS package - This fixes hi-res screen for Allegro5. See Allegro5 notes on building apps for OSX. Use C++11 def to build C++11.
  Add <cctype> header for std::isprint
  Changes to get GWork to compile on Windows/VS2015
  Use DebugBreak to break into debugger - cross platform debug break to fix issue #25
  - Correct readme - simplify gitignore
  - Output bin/lib to root. - cmake -D doesn't like spaces - Readme: use Allegro 5 instead of SDL2 as clipping bug not fixed
  Clarify origin of std::isprint
  ...

# Conflicts:
#	cmake/Modules/FindAllegro5.cmake
#	cmgen.sh
#	source/gwork/include/Gwork/Skins/Simple.h
#	source/gwork/include/Gwork/Skins/TexturedBase.h
#	source/gwork/source/Events.cpp
#	source/platform/renderers/Allegro5/Allegro5.cpp
#	source/platform/renderers/Direct2D/Direct2D.cpp
#	source/platform/renderers/DirectX9/DirectX9.cpp
#	source/platform/renderers/GDIPlus/GDIPlus.cpp
#	source/platform/renderers/OpenGL/OpenGL.cpp
#	source/samples/Allegro5/Allegro5Sample.cpp
#	source/test/source/api/Button.cpp
billyquith added a commit to billyquith/GWork that referenced this issue Aug 1, 2017
* gwork: (54 commits)
  Use for-range
  Store and restore OpenGL states whilst rendering - Thanks to @lonestarr - garrynewman/GWEN#59
  Tidy.
  Specific directory for SFML2 resource loading - Use directory relative to application executable. - Fixes issue #29 - Fix app resource copy for non-bundled apps.
  Add editor config.
  Use cmake file properties to set bundle resources for OSX.
  Replace deprecated method - SFML2.4 setColor deprecated
  Tidy.
  If tall menu descends off screen then clamp to screen height - Thanks to @qehgt - garrynewman/GWEN@c8aacf8
  Include correct dialog header. - Thanks to @kklouzal - garrynewman/GWEN#95
  Correct spelling of caret. - Thanks to @kklouzal garrynewman/GWEN#93
  comment cannot be on same line.
  Disable use of CTT for color picker. - Address issue #27. - Temporarily disable cache to texture. Broken with Allegro 5.2.
  cmake: Make MacOS package - This fixes hi-res screen for Allegro5. See Allegro5 notes on building apps for OSX. Use C++11 def to build C++11.
  Add <cctype> header for std::isprint
  Changes to get GWork to compile on Windows/VS2015
  Use DebugBreak to break into debugger - cross platform debug break to fix issue #25
  - Correct readme - simplify gitignore
  - Output bin/lib to root. - cmake -D doesn't like spaces - Readme: use Allegro 5 instead of SDL2 as clipping bug not fixed
  Clarify origin of std::isprint
  ...

# Conflicts:
#	cmake/Modules/FindAllegro5.cmake
#	cmgen.sh
#	source/gwork/include/Gwork/Skins/Simple.h
#	source/gwork/include/Gwork/Skins/TexturedBase.h
#	source/gwork/source/Events.cpp
#	source/platform/renderers/Allegro5/Allegro5.cpp
#	source/platform/renderers/Direct2D/Direct2D.cpp
#	source/platform/renderers/DirectX9/DirectX9.cpp
#	source/platform/renderers/GDIPlus/GDIPlus.cpp
#	source/platform/renderers/OpenGL/OpenGL.cpp
#	source/samples/Allegro5/Allegro5Sample.cpp
#	source/test/source/api/Button.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant