Path: blob/21.2-virgl/src/gallium/targets/haiku-softpipe/SoftwareRenderer.h
4565 views
/*1* Copyright 2006-2012, Haiku, Inc. All rights reserved.2* Distributed under the terms of the MIT License.3*4* Authors:5* Jérôme Duval, [email protected]6* Philippe Houdoin, [email protected]7* Artur Wyszynski, [email protected]8* Alexander von Gluck IV, [email protected]9*/10#ifndef SOFTWARERENDERER_H11#define SOFTWARERENDERER_H121314#include <kernel/image.h>1516#include "GLRenderer.h"17#include "GalliumContext.h"181920class SoftwareRenderer : public BGLRenderer, public HGLWinsysContext {21public:22SoftwareRenderer(BGLView *view,23ulong bgl_options);24virtual ~SoftwareRenderer();2526void LockGL();27void UnlockGL();2829void Display(BBitmap* bitmap, BRect* updateRect);3031void SwapBuffers(bool vsync = false);32void Draw(BRect updateRect);33status_t CopyPixelsOut(BPoint source, BBitmap *dest);34status_t CopyPixelsIn(BBitmap *source, BPoint dest);35void FrameResized(float width, float height);3637void EnableDirectMode(bool enabled);38void DirectConnected(direct_buffer_info *info);3940private:41GalliumContext* fContextObj;42context_id fContextID;4344bool fDirectModeEnabled;45direct_buffer_info* fInfo;46BLocker fInfoLocker;47ulong fOptions;48GLuint fWidth;49GLuint fHeight;50color_space fColorSpace;51};5253#endif // SOFTPIPERENDERER_H545556