1 /* 2 * Copyright 2006-2012, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Philippe Houdoin <philippe.houdoin@free.fr> 7 */ 8 #ifndef _GLRENDERER_ROSTER_H 9 #define _GLRENDERER_ROSTER_H 10 11 12 #include <GLRenderer.h> 13 14 #include <map> 15 16 17 struct renderer_item { 18 BGLRenderer* renderer; 19 entry_ref ref; 20 ino_t node; 21 image_id image; 22 }; 23 24 typedef std::map<renderer_id, renderer_item> RendererMap; 25 26 27 class GLRendererRoster { 28 public: 29 GLRendererRoster(BGLView* view, ulong options); 30 virtual ~GLRendererRoster(); 31 32 BGLRenderer* GetRenderer(int32 id = 0); 33 34 private: 35 void AddDefaultPaths(); 36 status_t AddPath(const char* path); 37 status_t AddRenderer(BGLRenderer* renderer, 38 image_id image, const entry_ref* ref, ino_t node); 39 status_t CreateRenderer(const entry_ref& ref); 40 41 RendererMap fRenderers; 42 int32 fNextID; 43 BGLView* fView; 44 ulong fOptions; 45 bool fSafeMode; 46 const char* fABISubDirectory; 47 48 }; 49 50 51 #endif /* _GLRENDERER_ROSTER_H */ 52