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

Last change on this file since 45 was 45, checked in by epyon, 12 years ago
  • temporary draw for context (and implementation)
  • cleaned up warnings
  • general cleanups
File size: 1.2 KB
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#include <nv/interface/texture2d.hh>
19
20namespace nv
21{
22        class window;
23        class program;
24
25        class device
26        {
27        public:
28                virtual window* create_window( uint16 width, uint16 height ) = 0;
29                virtual program* create_program( const string& vs_source, const string& fs_source ) = 0;
30                virtual vertex_buffer* create_vertex_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
31                virtual index_buffer* create_index_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
32                virtual vertex_array* create_vertex_array() = 0;
33                virtual texture2d* create_texture2d( ivec2 size, texture2d::format aformat, texture2d::datatype adatatype, texture2d_sampler sampler, void* data = nullptr ) = 0;
34        };
35
36} // namespace nv
37
38
39#endif // NV_DEVICE_HH
Note: See TracBrowser for help on using the repository browser.