blob: ca6ef6f2e4ff1d595db7c67b7d9b017b69f93ad8 [file] [log] [blame]
Kenneth Waters1545e112010-01-14 13:20:44 -08001/* Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
4
5#include "gles2_stub.h"
6
7#include <GLES2/gl2.h>
8
9static const char* kExtensions = "";
10static const char* kRenderer = "OpenGL-ES 2.0 stub";
11static const char* kShadingLanguageVersion = "OpenGL ES GLSL ES 1.0";
12static const char* kVendor = "Chromium OS";
13static const char* kVersion = "OpenGL ES 2.0";
14
15#define GL_CONTEXT() (&glContext)
16
17static GlContext glContext = {1};
18
19GLuint glCreateProgram() {
20 GlContext* gl = GL_CONTEXT();
21 return gl->next_name_++;
22}
23
24GLuint glCreateShader(GLenum type) {
25 GlContext* gl = GL_CONTEXT();
26 return gl->next_name_++;
27}
28
29GLenum glGetError() {
30 return GL_NO_ERROR;
31}
32
33const GLubyte* glGetString(GLenum name) {
34 switch (name) {
35 case GL_EXTENSIONS:
36 return (GLubyte*)kExtensions;
37 case GL_RENDERER:
38 return (GLubyte*)kRenderer;
39 case GL_SHADING_LANGUAGE_VERSION:
40 return (GLubyte*)kShadingLanguageVersion;
41 case GL_VENDOR:
42 return (GLubyte*)kVendor;
43 case GL_VERSION:
44 return (GLubyte*)kVersion;
45 default:
46 return (GLubyte*)"";
47 }
48}
49
50/* Auto-Generated Entry Points */
51$AutoStubs
52