Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2016 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 | // ContextNULL.cpp: |
| 7 | // Implements the class methods for ContextNULL. |
| 8 | // |
| 9 | |
| 10 | #include "libANGLE/renderer/null/ContextNULL.h" |
| 11 | |
| 12 | #include "common/debug.h" |
| 13 | |
| 14 | namespace rx |
| 15 | { |
| 16 | |
| 17 | ContextNULL::ContextNULL(const gl::ContextState &state) : ContextImpl(state) |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | ContextNULL::~ContextNULL() |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | gl::Error ContextNULL::initialize() |
| 26 | { |
| 27 | UNIMPLEMENTED(); |
| 28 | return gl::Error(GL_INVALID_OPERATION); |
| 29 | } |
| 30 | |
| 31 | gl::Error ContextNULL::flush() |
| 32 | { |
| 33 | UNIMPLEMENTED(); |
| 34 | return gl::Error(GL_INVALID_OPERATION); |
| 35 | } |
| 36 | |
| 37 | gl::Error ContextNULL::finish() |
| 38 | { |
| 39 | UNIMPLEMENTED(); |
| 40 | return gl::Error(GL_INVALID_OPERATION); |
| 41 | } |
| 42 | |
| 43 | gl::Error ContextNULL::drawArrays(GLenum mode, GLint first, GLsizei count) |
| 44 | { |
| 45 | UNIMPLEMENTED(); |
| 46 | return gl::Error(GL_INVALID_OPERATION); |
| 47 | } |
| 48 | |
| 49 | gl::Error ContextNULL::drawArraysInstanced(GLenum mode, |
| 50 | GLint first, |
| 51 | GLsizei count, |
| 52 | GLsizei instanceCount) |
| 53 | { |
| 54 | UNIMPLEMENTED(); |
| 55 | return gl::Error(GL_INVALID_OPERATION); |
| 56 | } |
| 57 | |
| 58 | gl::Error ContextNULL::drawElements(GLenum mode, |
| 59 | GLsizei count, |
| 60 | GLenum type, |
| 61 | const GLvoid *indices, |
| 62 | const gl::IndexRange &indexRange) |
| 63 | { |
| 64 | UNIMPLEMENTED(); |
| 65 | return gl::Error(GL_INVALID_OPERATION); |
| 66 | } |
| 67 | |
| 68 | gl::Error ContextNULL::drawElementsInstanced(GLenum mode, |
| 69 | GLsizei count, |
| 70 | GLenum type, |
| 71 | const GLvoid *indices, |
| 72 | GLsizei instances, |
| 73 | const gl::IndexRange &indexRange) |
| 74 | { |
| 75 | UNIMPLEMENTED(); |
| 76 | return gl::Error(GL_INVALID_OPERATION); |
| 77 | } |
| 78 | |
| 79 | gl::Error ContextNULL::drawRangeElements(GLenum mode, |
| 80 | GLuint start, |
| 81 | GLuint end, |
| 82 | GLsizei count, |
| 83 | GLenum type, |
| 84 | const GLvoid *indices, |
| 85 | const gl::IndexRange &indexRange) |
| 86 | { |
| 87 | UNIMPLEMENTED(); |
| 88 | return gl::Error(GL_INVALID_OPERATION); |
| 89 | } |
| 90 | |
| 91 | CompilerImpl *ContextNULL::createCompiler() |
| 92 | { |
| 93 | UNIMPLEMENTED(); |
| 94 | return static_cast<CompilerImpl *>(0); |
| 95 | } |
| 96 | |
| 97 | ShaderImpl *ContextNULL::createShader(const gl::ShaderState &data) |
| 98 | { |
| 99 | UNIMPLEMENTED(); |
| 100 | return static_cast<ShaderImpl *>(0); |
| 101 | } |
| 102 | |
| 103 | ProgramImpl *ContextNULL::createProgram(const gl::ProgramState &data) |
| 104 | { |
| 105 | UNIMPLEMENTED(); |
| 106 | return static_cast<ProgramImpl *>(0); |
| 107 | } |
| 108 | |
| 109 | FramebufferImpl *ContextNULL::createFramebuffer(const gl::FramebufferState &data) |
| 110 | { |
| 111 | UNIMPLEMENTED(); |
| 112 | return static_cast<FramebufferImpl *>(0); |
| 113 | } |
| 114 | |
| 115 | TextureImpl *ContextNULL::createTexture(const gl::TextureState &state) |
| 116 | { |
| 117 | UNIMPLEMENTED(); |
| 118 | return static_cast<TextureImpl *>(0); |
| 119 | } |
| 120 | |
| 121 | RenderbufferImpl *ContextNULL::createRenderbuffer() |
| 122 | { |
| 123 | UNIMPLEMENTED(); |
| 124 | return static_cast<RenderbufferImpl *>(0); |
| 125 | } |
| 126 | |
| 127 | BufferImpl *ContextNULL::createBuffer() |
| 128 | { |
| 129 | UNIMPLEMENTED(); |
| 130 | return static_cast<BufferImpl *>(0); |
| 131 | } |
| 132 | |
| 133 | VertexArrayImpl *ContextNULL::createVertexArray(const gl::VertexArrayState &data) |
| 134 | { |
| 135 | UNIMPLEMENTED(); |
| 136 | return static_cast<VertexArrayImpl *>(0); |
| 137 | } |
| 138 | |
| 139 | QueryImpl *ContextNULL::createQuery(GLenum type) |
| 140 | { |
| 141 | UNIMPLEMENTED(); |
| 142 | return static_cast<QueryImpl *>(0); |
| 143 | } |
| 144 | |
| 145 | FenceNVImpl *ContextNULL::createFenceNV() |
| 146 | { |
| 147 | UNIMPLEMENTED(); |
| 148 | return static_cast<FenceNVImpl *>(0); |
| 149 | } |
| 150 | |
| 151 | FenceSyncImpl *ContextNULL::createFenceSync() |
| 152 | { |
| 153 | UNIMPLEMENTED(); |
| 154 | return static_cast<FenceSyncImpl *>(0); |
| 155 | } |
| 156 | |
| 157 | TransformFeedbackImpl *ContextNULL::createTransformFeedback(const gl::TransformFeedbackState &state) |
| 158 | { |
| 159 | UNIMPLEMENTED(); |
| 160 | return static_cast<TransformFeedbackImpl *>(0); |
| 161 | } |
| 162 | |
| 163 | SamplerImpl *ContextNULL::createSampler() |
| 164 | { |
| 165 | UNIMPLEMENTED(); |
| 166 | return static_cast<SamplerImpl *>(0); |
| 167 | } |
| 168 | |
| 169 | std::vector<PathImpl *> ContextNULL::createPaths(GLsizei range) |
| 170 | { |
| 171 | UNIMPLEMENTED(); |
| 172 | return std::vector<PathImpl *>(); |
| 173 | } |
| 174 | |
| 175 | } // namespace rx |