source: trunk/nv/interface/device.hh @ 44

Last change on this file since 44 was 44, checked in by epyon, 12 years ago
  • context bugfixes, force apply state at creation and apply render state
  • window creates context
  • index buffer
  • vertex arrays (simulation of GL 3 functionality)
  • bugfixes
File size: 1010 bytes
Line 
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 device.hh
8 * @author Kornel Kisielewicz epyon@chaosforge.org
9 * @brief Device class
10 */
11
12#ifndef NV_DEVICE_HH
13#define NV_DEVICE_HH
14
15#include <nv/common.hh>
16#include <nv/string.hh>
17#include <nv/interface/vertex_buffer.hh>
18
19namespace nv
20{
21        class window;
22        class program;
23
24        class device
25        {
26        public:
27                virtual window* create_window( uint16 width, uint16 height ) = 0;
28                virtual program* create_program( const string& vs_source, const string& fs_source ) = 0;
29                virtual vertex_buffer* create_vertex_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
30                virtual index_buffer* create_index_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
31                virtual vertex_array* create_vertex_array() = 0;
32        };
33
34} // namespace nv
35
36
37#endif // NV_DEVICE_HH
Note: See TracBrowser for help on using the repository browser.