~ubuntu-branches/ubuntu/natty/plee-the-bear/natty

« back to all changes in this revision

Viewing changes to bear-engine/core/src/visual/gl_screen.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
  Bear Engine
3
3
 
4
 
  Copyright (C) 2005-2009 Julien Jorge, Sebastien Angibaud
 
4
  Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
5
5
 
6
6
  This program is free software; you can redistribute it and/or modify it
7
7
  under the terms of the GNU General Public License as published by the
30
30
#define __VISUAL_GL_SCREEN_HPP__
31
31
 
32
32
#include "visual/base_screen.hpp"
 
33
#include <GL/gl.h>
33
34
 
34
35
namespace bear
35
36
{
56
57
      bool need_restoration() const;
57
58
      void set_restored();
58
59
 
 
60
      void set_background_color( const color_type& c );
 
61
      color_type get_background_color() const;
 
62
 
59
63
      void begin_render();
60
64
      void render( const position_type& pos, const sprite& s );
61
 
      void end_render();
 
65
      bool end_render();
62
66
 
63
67
      void draw_line
64
 
      ( const claw::graphic::rgba_pixel& color,
 
68
      ( const color_type& color,
65
69
        const std::vector<position_type>& p, double w = 1.0 );
66
70
 
67
71
      void draw_polygon
68
 
      ( const claw::graphic::rgba_pixel& color,
 
72
      ( const color_type& color,
69
73
        const std::vector<position_type>& p );
70
74
 
71
75
      void shot( claw::graphic::image& img ) const;
83
87
 
84
88
      void failure_check( const std::string& where ) const;
85
89
 
 
90
      void set_video_mode( unsigned int w, unsigned int y, bool f );
 
91
      bool is_closed();
 
92
 
86
93
    private:
87
94
      /** \brief The width and height of the screen. */
88
 
      const claw::math::coordinate_2d<unsigned int> m_size;
 
95
      claw::math::coordinate_2d<unsigned int> m_size;
89
96
 
90
 
      /** \brief Tell if the screen need to be restored. */
 
97
      /** \brief Tell if the screen needs to be restored. */
91
98
      bool m_need_restoration;
92
99
 
93
100
      /** \brief A buffer in which we do the screenshots, to avoid an allocation