blob: 2679c99e026df0d3e26f3ccf793b3b34a96832ed [file] [log] [blame]
Geoff Langf9a6f082015-01-22 13:32:49 -05001//
2// Copyright 2015 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// FramebufferGL.cpp: Implements the class methods for FramebufferGL.
8
9#include "libANGLE/renderer/gl/FramebufferGL.h"
10
11#include "common/debug.h"
Jamie Madill87de3622015-03-16 10:41:44 -040012#include "libANGLE/State.h"
Geoff Langf9a6f082015-01-22 13:32:49 -050013
14namespace rx
15{
16
Jamie Madilld1405e52015-03-05 15:41:39 -050017FramebufferGL::FramebufferGL(const gl::Framebuffer::Data &data)
18 : FramebufferImpl(data)
Geoff Langf9a6f082015-01-22 13:32:49 -050019{}
20
21FramebufferGL::~FramebufferGL()
22{}
23
24void FramebufferGL::setColorAttachment(size_t index, const gl::FramebufferAttachment *attachment)
25{
Geoff Langf1e85922015-02-23 14:40:04 -050026 //UNIMPLEMENTED();
Geoff Langf9a6f082015-01-22 13:32:49 -050027}
28
Jamie Madillf90353e2015-03-05 19:37:58 -050029void FramebufferGL::setDepthAttachment(const gl::FramebufferAttachment *attachment)
Geoff Langf9a6f082015-01-22 13:32:49 -050030{
Geoff Langf1e85922015-02-23 14:40:04 -050031 //UNIMPLEMENTED();
Geoff Langf9a6f082015-01-22 13:32:49 -050032}
33
34void FramebufferGL::setStencilAttachment(const gl::FramebufferAttachment *attachment)
35{
Geoff Langf1e85922015-02-23 14:40:04 -050036 //UNIMPLEMENTED();
Geoff Langf9a6f082015-01-22 13:32:49 -050037}
38
39void FramebufferGL::setDepthStencilAttachment(const gl::FramebufferAttachment *attachment)
40{
Geoff Langf1e85922015-02-23 14:40:04 -050041 //UNIMPLEMENTED();
Geoff Langf9a6f082015-01-22 13:32:49 -050042}
43
44void FramebufferGL::setDrawBuffers(size_t count, const GLenum *buffers)
45{
Geoff Langf1e85922015-02-23 14:40:04 -050046 //UNIMPLEMENTED();
Geoff Langf9a6f082015-01-22 13:32:49 -050047}
48
49void FramebufferGL::setReadBuffer(GLenum buffer)
50{
Geoff Langf1e85922015-02-23 14:40:04 -050051 //UNIMPLEMENTED();
Geoff Langf9a6f082015-01-22 13:32:49 -050052}
53
54gl::Error FramebufferGL::invalidate(size_t count, const GLenum *attachments)
55{
56 UNIMPLEMENTED();
57 return gl::Error(GL_INVALID_OPERATION);
58}
59
60gl::Error FramebufferGL::invalidateSub(size_t count, const GLenum *attachments, const gl::Rectangle &area)
61{
62 UNIMPLEMENTED();
63 return gl::Error(GL_INVALID_OPERATION);
64}
65
66gl::Error FramebufferGL::clear(const gl::State &state, GLbitfield mask)
67{
68 UNIMPLEMENTED();
69 return gl::Error(GL_INVALID_OPERATION);
70}
71
72gl::Error FramebufferGL::clearBufferfv(const gl::State &state, GLenum buffer, GLint drawbuffer, const GLfloat *values)
73{
74 UNIMPLEMENTED();
75 return gl::Error(GL_INVALID_OPERATION);
76}
77
78gl::Error FramebufferGL::clearBufferuiv(const gl::State &state, GLenum buffer, GLint drawbuffer, const GLuint *values)
79{
80 UNIMPLEMENTED();
81 return gl::Error(GL_INVALID_OPERATION);
82}
83
84gl::Error FramebufferGL::clearBufferiv(const gl::State &state, GLenum buffer, GLint drawbuffer, const GLint *values)
85{
86 UNIMPLEMENTED();
87 return gl::Error(GL_INVALID_OPERATION);
88}
89
90gl::Error FramebufferGL::clearBufferfi(const gl::State &state, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
91{
92 UNIMPLEMENTED();
93 return gl::Error(GL_INVALID_OPERATION);
94}
95
96GLenum FramebufferGL::getImplementationColorReadFormat() const
97{
98 UNIMPLEMENTED();
99 return GLenum();
100}
101
102GLenum FramebufferGL::getImplementationColorReadType() const
103{
104 UNIMPLEMENTED();
105 return GLenum();
106}
107
108gl::Error FramebufferGL::readPixels(const gl::State &state, const gl::Rectangle &area, GLenum format, GLenum type, GLvoid *pixels) const
109{
Jamie Madill87de3622015-03-16 10:41:44 -0400110 const gl::PixelPackState &packState = state.getPackState();
111
112 if (packState.rowLength != 0 || packState.skipRows != 0 || packState.skipPixels != 0)
113 {
114 UNIMPLEMENTED();
115 return gl::Error(GL_INVALID_OPERATION, "invalid pixel store parameters in readPixels");
116 }
117
Geoff Langf9a6f082015-01-22 13:32:49 -0500118 UNIMPLEMENTED();
119 return gl::Error(GL_INVALID_OPERATION);
120}
121
122gl::Error FramebufferGL::blit(const gl::State &state, const gl::Rectangle &sourceArea, const gl::Rectangle &destArea,
123 GLbitfield mask, GLenum filter, const gl::Framebuffer *sourceFramebuffer)
124{
125 UNIMPLEMENTED();
126 return gl::Error(GL_INVALID_OPERATION);
127}
128
129GLenum FramebufferGL::checkStatus() const
130{
131 UNIMPLEMENTED();
132 return GLenum();
133}
134
135}