23 #define GTE_GRAPHICS_USE_NAMED_OBJECTS 35 virtual void ClearColorBuffer() = 0;
36 virtual void ClearDepthBuffer() = 0;
37 virtual void ClearStencilBuffer() = 0;
38 virtual void ClearBuffers() = 0;
42 virtual void SetFont(std::shared_ptr<Font>
const& font)
override;
50 uint64_t Draw(
Visual* visual);
51 uint64_t Draw(std::vector<Visual*>
const& visuals);
52 uint64_t Draw(std::shared_ptr<Visual>
const& visual);
53 uint64_t Draw(std::vector<std::shared_ptr<Visual>>
const& visuals);
60 virtual uint64_t Draw(std::shared_ptr<OverlayEffect>
const& overlay)
override;
65 inline void AllowOcclusionQuery(
bool allow);
70 virtual void Enable(std::shared_ptr<DrawTarget>
const&
target) = 0;
71 virtual void Disable(std::shared_ptr<DrawTarget>
const& target) = 0;
79 GEObject* Bind(std::shared_ptr<GraphicsObject>
const&
object);
80 virtual bool BindProgram(std::shared_ptr<ComputeProgram>
const&
program) = 0;
81 GEDrawTarget* Bind(std::shared_ptr<DrawTarget>
const& target);
82 GEObject* Get(std::shared_ptr<GraphicsObject>
const&
object)
const;
83 GEDrawTarget* Get(std::shared_ptr<DrawTarget>
const& target)
const;
84 inline bool Unbind(std::shared_ptr<GraphicsObject>
const&
object);
85 inline bool Unbind(std::shared_ptr<DrawTarget>
const& target);
86 void GetTotalAllocation(
size_t& numBytes,
size_t& numObjects)
const;
89 virtual bool Update(std::shared_ptr<Buffer>
const&
buffer) = 0;
90 virtual bool Update(std::shared_ptr<TextureSingle>
const&
texture) = 0;
91 virtual bool Update(std::shared_ptr<TextureSingle>
const& texture,
unsigned int level) = 0;
92 virtual bool Update(std::shared_ptr<TextureArray>
const& textureArray) = 0;
93 virtual bool Update(std::shared_ptr<TextureArray>
const& textureArray,
unsigned int item,
unsigned int level) = 0;
96 virtual bool CopyCpuToGpu(std::shared_ptr<Buffer>
const& buffer) = 0;
97 virtual bool CopyCpuToGpu(std::shared_ptr<TextureSingle>
const& texture) = 0;
98 virtual bool CopyCpuToGpu(std::shared_ptr<TextureSingle>
const& texture,
unsigned int level) = 0;
99 virtual bool CopyCpuToGpu(std::shared_ptr<TextureArray>
const& textureArray) = 0;
100 virtual bool CopyCpuToGpu(std::shared_ptr<TextureArray>
const& textureArray,
unsigned int item,
unsigned int level) = 0;
103 virtual bool CopyGpuToCpu(std::shared_ptr<Buffer>
const& buffer) = 0;
104 virtual bool CopyGpuToCpu(std::shared_ptr<TextureSingle>
const& texture) = 0;
105 virtual bool CopyGpuToCpu(std::shared_ptr<TextureSingle>
const& texture,
unsigned int level) = 0;
106 virtual bool CopyGpuToCpu(std::shared_ptr<TextureArray>
const& textureArray) = 0;
107 virtual bool CopyGpuToCpu(std::shared_ptr<TextureArray>
const& textureArray,
unsigned int item,
unsigned int level) = 0;
113 virtual void CopyGpuToGpu(
114 std::shared_ptr<Buffer>
const& buffer0,
115 std::shared_ptr<Buffer>
const& buffer1) = 0;
117 virtual void CopyGpuToGpu(
118 std::shared_ptr<TextureSingle>
const& texture0,
119 std::shared_ptr<TextureSingle>
const& texture1) = 0;
121 virtual void CopyGpuToGpu(
122 std::shared_ptr<TextureSingle>
const& texture0,
123 std::shared_ptr<TextureSingle>
const& texture1,
124 unsigned int level) = 0;
126 virtual void CopyGpuToGpu(
127 std::shared_ptr<TextureArray>
const& textureArray0,
128 std::shared_ptr<TextureArray>
const& textureArray1) = 0;
130 virtual void CopyGpuToGpu(
131 std::shared_ptr<TextureArray>
const& textureArray0,
132 std::shared_ptr<TextureArray>
const& textureArray1,
133 unsigned int item,
unsigned int level) = 0;
136 virtual bool GetNumActiveElements(std::shared_ptr<StructuredBuffer>
const& buffer) = 0;
143 virtual void Execute(std::shared_ptr<ComputeProgram>
const& program,
144 unsigned int numXGroups,
unsigned int numYGroups,
unsigned int numZGroups) = 0;
147 virtual void WaitForFinish() = 0;
150 virtual void Flush() = 0;
156 inline void WarnOnNonemptyBridges(
bool warn);
165 virtual void DestroyDefaultGlobalState();
171 virtual uint64_t DrawPrimitive(
172 std::shared_ptr<VertexBuffer>
const& vbuffer,
173 std::shared_ptr<IndexBuffer>
const& ibuffer,
174 std::shared_ptr<VisualEffect>
const& effect) = 0;
188 std::unique_ptr<GEInputLayoutManager>
mILMap;
192 typedef std::shared_ptr<GEObject>(*CreateGEObject)(
void*,
GraphicsObject const*);
193 typedef std::shared_ptr<GEDrawTarget> (*CreateGEDrawTarget)(
DrawTarget const*,
194 std::vector<GEObject*>&,
GEObject*);
220 virtual void OnDestroy(DrawTarget
const* target);
234 return Unbind(
object.
get());
239 return Unbind(target.get());
244 mAllowOcclusionQuery = allow;
249 mWarnOnNonemptyBridges = warn;
ThreadSafeMap< GraphicsObject const *, std::shared_ptr< GEObject > > mGOMap
std::array< CreateGEObject, GT_NUM_TYPES > mCreateGEObject
CreateGEDrawTarget mCreateGEDrawTarget
void WarnOnNonemptyBridges(bool warn)
GLbitfield GLuint program
std::unique_ptr< GEInputLayoutManager > mILMap
void AllowOcclusionQuery(bool allow)
std::shared_ptr< GOListener > mGOListener
bool Unbind(std::shared_ptr< GraphicsObject > const &object)
GLsizei const GLchar *const * string
ThreadSafeMap< DrawTarget const *, std::shared_ptr< GEDrawTarget > > mDTMap
GLuint GLsizei const GLchar * message
bool mAllowOcclusionQuery
bool mWarnOnNonemptyBridges
std::shared_ptr< DTListener > mDTListener