nomlib
Loading...
Searching...
No Matches
RendererInfo.hpp
1/******************************************************************************
2
3 nomlib - C++11 cross-platform game engine
4
5Copyright (c) 2013, 2014 Jeffrey Carpenter <i8degrees@gmail.com>
6All rights reserved.
7
8Redistribution and use in source and binary forms, with or without
9modification, are permitted provided that the following conditions are met:
10
111. Redistributions of source code must retain the above copyright notice, this
12 list of conditions and the following disclaimer.
132. Redistributions in binary form must reproduce the above copyright notice,
14 this list of conditions and the following disclaimer in the documentation
15 and/or other materials provided with the distribution.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28******************************************************************************/
29#ifndef NOMLIB_SDL2_RENDERER_INFO_HPP
30#define NOMLIB_SDL2_RENDERER_INFO_HPP
31
32#include <iostream>
33#include <string>
34#include <vector>
35
36#include "nomlib/config.hpp"
37#include "nomlib/system/SDL_helpers.hpp"
38
39namespace nom {
40
43{
44 public:
47
49 RendererInfo ( void );
50
52 ~RendererInfo ( void );
53
55 const std::string& name( void ) const;
56
60 uint32 optimal_texture_format ( void ) const;
61
64 bool target_texture ( void ) const;
65
67 bool accelerated( void ) const;
68
70 bool vsync( void ) const;
71
73 int texture_width( void ) const;
74
76 int texture_height( void ) const;
77
79 std::string name_;
80
82 uint32 flags_;
83
87 std::vector<uint32> texture_formats;
88
91
94};
95
97std::ostream& operator << ( std::ostream& os, const RendererInfo& info );
98
99} // namespace nom
100
101#endif // include guard defined
Container class for the current renderer driver capabilities.
std::string name_
Renderer designation.
const std::string & name(void) const
Query driver's name.
uint32 optimal_texture_format(void) const
Obtain the most optimal texture format available.
int texture_width_
Maximum texture width (in pixels) supported.
bool target_texture(void) const
Query support for setting a nom::Texture as a nom::Renderer target.
uint32 flags_
Mask of supported renderer flags.
std::vector< uint32 > texture_formats
~RendererInfo(void)
Destructor.
RendererInfo(void)
Default constructor.
bool accelerated(void) const
Query driver's support of hardware video acceleration.
RendererInfo * RawPtr
Raw pointer type.
int texture_height_
Maximum texture height (in pixels) supported.
bool vsync(void) const
Query driver's support of VSYNC.
int texture_width(void) const
Get the maximum texture width supported by the driver.
int texture_height(void) const
Get the maximum texture height supported by the driver.