- Timestamp:
- 07/08/13 19:59:07 (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/gl/gl_context.hh
r121 r157 20 20 { 21 21 public: 22 gl_context( );22 gl_context( device* a_device ); 23 23 virtual void clear( const clear_state& cs ); 24 24 // temporary -
trunk/nv/interface/context.hh
r121 r157 32 32 }; 33 33 34 class device; 34 35 class context 35 36 { 36 37 public: 38 context( device* a_device ) { m_device = a_device; } 37 39 virtual void clear( const clear_state& cs ) = 0; 38 40 // temporary … … 41 43 virtual const ivec4& get_viewport() = 0; 42 44 virtual void set_viewport( const ivec4& viewport ) = 0; 45 virtual device* get_device() { return m_device; } 43 46 virtual ~context() {} 44 47 protected: 48 device* m_device; 45 49 clear_state m_clear_state; 46 50 render_state m_render_state; -
trunk/src/gl/gl_context.cc
r121 r157 349 349 350 350 351 gl_context::gl_context() 351 gl_context::gl_context( device* a_device ) 352 : context( a_device ) 352 353 { 353 354 // TODO: do we really need this? -
trunk/src/gl/gl_window.cc
r121 r157 167 167 NV_LOG( LOG_INFO, "OpenGL GLSL Version : " << glGetString(GL_SHADING_LANGUAGE_VERSION) ); 168 168 169 m_context = new gl_context( );169 m_context = new gl_context( m_device ); 170 170 m_context->set_viewport( nv::ivec4( 0, 0, m_width, m_height ) ); 171 171 }
Note: See TracChangeset
for help on using the changeset viewer.