NoRender_Multi.h
1 /*
2 
3 Copyright (c) 2018, Johnathan Corkery. (jcorkery@umich.edu)
4 All rights reserved.
5 
6 This file is part of the Dynacoe project (https://github.com/jcorks/Dynacoe)
7 Dynacoe was released under the MIT License, as detailed below.
8 
9 
10 
11 Permission is hereby granted, free of charge, to any person obtaining a copy
12 of this software and associated documentation files (the "Software"), to deal
13 in the Software without restriction, including without limitation the rights
14 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 copies of the Software, and to permit persons to whom the Software is furnished
16 to do so, subject to the following conditions:
17 
18 The above copyright notice and this permission notice shall
19 be included in all copies or substantial portions of the Software.
20 
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 DEALINGS IN THE SOFTWARE.
28 
29 
30 
31 */
32 
33 #ifndef H_DC_BACKENDS_NORENDER_INCLUDED
34 #define H_DC_BACKENDS_NORENDER_INCLUDED
35 
36 #include <Dynacoe/Backends/Renderer/Renderer.h>
37 
38 namespace Dynacoe {
39 class NoRenderer : public Renderer {
40  public:
41  std::string Name(){return "NoRenderer";}
42  std::string Version(){return "v1.0";}
43  bool Valid();
44 
45 
46  void Queue2DVertices(
47  const uint32_t * indices,
48  uint32_t count
49  );
50 
51  uint32_t Add2DObject();
52  void Remove2DObject(uint32_t);
53  uint32_t Add2DVertex();
54  void Remove2DVertex(uint32_t object);
55  void Set2DVertex(uint32_t vertex, Vertex2D);
56  Vertex2D Get2DVertex(uint32_t vertex);
57  void Set2DObjectParameters(uint32_t object, Render2DObjectParameters);
58  void Render2DVertices(const Render2DStaticParameters &);
59  void Clear2DQueue();
60 
61  void RenderStatic(StaticState *){}
62  void ClearRenderedData(){}
63  RenderBufferID GetStaticViewingMatrixID(){return RenderBufferID();}
64  RenderBufferID GetStaticProjectionMatrixID(){return RenderBufferID();}
65 
66  int AddTexture(int, int, const uint8_t*){return 0;}
67  void UpdateTexture(int, const uint8_t *){}
68  void RemoveTexture(int tex){}
69  void SetTextureFilter(TexFilter){}
70  void GetTexture(int, uint8_t*){}
71  TexFilter GetTextureFilter(){return TexFilter::NoFilter;}
72  int GetTextureWidth(int){return 0;}
73  int GetTextureHeight(int) {return 0;}
74  int MaxSimultaneousTextures(){return 0;}
75 
76  RenderBufferID AddBuffer(float *, int) {return RenderBufferID();}
77  void UpdateBuffer(RenderBufferID, float *, int, int){}
78  void ReadBuffer(RenderBufferID, float *, int, int){}
79  int BufferSize(RenderBufferID){return 0;}
80  void RemoveBuffer(RenderBufferID){}
81 
82 
83  LightID AddLight(LightType){return LightID();}
84  void UpdateLightAttributes(LightID, float *){}
85  void EnableLight(LightID, bool doIt){}
86  void RemoveLight(LightID){}
87  int MaxEnabledLights(){return 0;}
88  int NumLights(){return 0;}
89 
90  std::string ProgramGetLanguage(){return "A hypothetical shader language";}
91  ProgramID ProgramGetBuiltIn(BuiltInShaderMode){return ProgramID();}
92  ProgramID ProgramAdd(const std::string&, const std::string &, std::string &){return ProgramID();}
93 
94 
95  bool IsSupported(Capability){return false;}
96  void SetDrawingMode(Polygon, Dimension, AlphaRule){}
97  void GetDrawingMode(Polygon *, Dimension *, AlphaRule *){}
98  void AttachTarget(Dynacoe::Framebuffer *){}
99  Dynacoe::Framebuffer * GetTarget(){return nullptr;}
100  std::vector<Dynacoe::Framebuffer::Type> SupportedFramebuffers(){
101  return std::vector<Dynacoe::Framebuffer::Type>({
104  });
105  }
106 
107 };
108 }
109 
110 #endif
(uint8_t *) RGBA-ordered pixel array with no padding, matched to the dimensions given ...
Contains a visual state.
Definition: Framebuffer.h:49
Definition: AssetID.h:37