diff options
author | Alexander von Gluck IV <kallisti5@unixzen.com> | 2013-12-31 15:39:49 -0600 |
---|---|---|
committer | Alexander von Gluck IV <kallisti5@unixzen.com> | 2014-01-06 15:50:21 -0600 |
commit | 61ef697afc0ad509dcabdecfc424f27b5966969c (patch) | |
tree | b099044ff97e9a0f4522b8c59adaaec82d6ace28 /src/hgl/GLRendererRoster.h | |
parent | b236314a1107214210c429295fac8a5bdf457772 (diff) | |
download | external_mesa3d-61ef697afc0ad509dcabdecfc424f27b5966969c.zip external_mesa3d-61ef697afc0ad509dcabdecfc424f27b5966969c.tar.gz external_mesa3d-61ef697afc0ad509dcabdecfc424f27b5966969c.tar.bz2 |
haiku libGL: Move from gallium target to src/hgl
* The Haiku renderers need to link to libGL to function properly
in all usage contexts. As mesa drivers build before gallium
targets, we couldn't properly link the mesa swrast driver to
the gallium libGL target for Haiku.
* This is likely better as it mimics how glx is laid out ensuring
the Haiku libGL is better understood.
* All renderers properly link in libGL now.
Acked-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/hgl/GLRendererRoster.h')
-rw-r--r-- | src/hgl/GLRendererRoster.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/hgl/GLRendererRoster.h b/src/hgl/GLRendererRoster.h new file mode 100644 index 0000000..5c8da27 --- /dev/null +++ b/src/hgl/GLRendererRoster.h @@ -0,0 +1,51 @@ +/* + * Copyright 2006-2012, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Philippe Houdoin <philippe.houdoin@free.fr> + */ +#ifndef _GLRENDERER_ROSTER_H +#define _GLRENDERER_ROSTER_H + + +#include <GLRenderer.h> + +#include <map> + + +struct renderer_item { + BGLRenderer* renderer; + entry_ref ref; + ino_t node; + image_id image; +}; + +typedef std::map<renderer_id, renderer_item> RendererMap; + + +class GLRendererRoster { + public: + GLRendererRoster(BGLView* view, ulong options); + virtual ~GLRendererRoster(); + + BGLRenderer* GetRenderer(int32 id = 0); + + private: + void AddDefaultPaths(); + status_t AddPath(const char* path); + status_t AddRenderer(BGLRenderer* renderer, + image_id image, const entry_ref* ref, ino_t node); + status_t CreateRenderer(const entry_ref& ref); + + RendererMap fRenderers; + int32 fNextID; + BGLView* fView; + ulong fOptions; + bool fSafeMode; + const char* fABISubDirectory; + +}; + + +#endif /* _GLRENDERER_ROSTER_H */ |