source: trunk/nv/gl/gl_context.hh @ 37

Last change on this file since 37 was 37, checked in by epyon, 12 years ago
  • gl_context added
  • removed geometry shader support from gl_program (non-GL 2.1/GLES 2.0 compatible)
  • cleaned up warnings
File size: 1.5 KB
RevLine 
[37]1// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
2// http://chaosforge.org/
3//
4// This file is part of NV Libraries.
5// For conditions of distribution and use, see copyright notice in nv.hh
6/**
7 * @file gl_context.hh
8 * @author Kornel Kisielewicz epyon@chaosforge.org
9 * @brief Context class
10 */
11
12#ifndef NV_GL_CONTEXT_HH
13#define NV_GL_CONTEXT_HH
14
15#include <nv/interface/context.hh>
16
17namespace nv
18{
19        class gl_context : public context
20        {
21        public:
22                void clear( const clear_state& cs );
23                const ivec4& get_viewport();
24                void set_viewport( const ivec4& viewport );
25
26        private:
27                void force_apply_render_state( const render_state& state );
28                void force_apply_stencil_face( int face, const stencil_test_face& stencil );
29                void apply_render_state( const render_state& state );
30                void apply_stencil_test( const stencil_test& stencil );
31                void apply_stencil_face( int face, stencil_test_face& stencil, const stencil_test_face& new_stencil );
32                void apply_scissor_test( const scissor_test& scissor );
33                void apply_depth_test( const depth_test& depth );
34                void apply_depth_mask( bool mask );
35                void apply_depth_range( const depth_range& range );
36                void apply_color_mask( const color_mask& mask );
37                void apply_blending( const blending& blend );
38                void apply_culling( const culling& cull );
39                void enable( unsigned int what, bool value );
40
41        private:
42                vec4  m_clear_color;
43                float m_clear_depth;
44                int   m_clear_stencil;
45        };
46
47} // namespace nv
48
49#endif // NV_CONTEXT_HH
Note: See TracBrowser for help on using the repository browser.