Path: blob/21.2-virgl/src/hgl/GLRendererRoster.h
4558 views
/*1* Copyright 2006-2012, Haiku, Inc. All Rights Reserved.2* Distributed under the terms of the MIT License.3*4* Authors:5* Philippe Houdoin <[email protected]>6*/7#ifndef _GLRENDERER_ROSTER_H8#define _GLRENDERER_ROSTER_H91011#include <GLRenderer.h>1213#include <vector>141516typedef BGLRenderer* (*InstantiateRenderer) (BGLView* view, ulong options);1718struct renderer_item {19InstantiateRenderer entry;20entry_ref ref;21ino_t node;22image_id image;23};2425typedef std::vector<renderer_item> RendererMap;262728class GLRendererRoster {29public:30static GLRendererRoster *Roster();31BGLRenderer* GetRenderer(BGLView *view, ulong options);3233private:34GLRendererRoster();35virtual ~GLRendererRoster();3637void AddDefaultPaths();38status_t AddPath(const char* path);39status_t AddRenderer(InstantiateRenderer entry, image_id image,40const entry_ref* ref, ino_t node);41status_t CreateRenderer(const entry_ref& ref);4243static GLRendererRoster* fInstance;44bool fSafeMode;45const char* fABISubDirectory;4647RendererMap fRenderers;48};495051#endif /* _GLRENDERER_ROSTER_H */525354