Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: command_buffer/service/cross/gl/texture_gl.h

Issue 234002: More work in Command Buffers... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // A 2D texture resource for GL. 101 // A 2D texture resource for GL.
102 class Texture2DGL : public TextureGL { 102 class Texture2DGL : public TextureGL {
103 public: 103 public:
104 Texture2DGL(unsigned int levels, 104 Texture2DGL(unsigned int levels,
105 texture::Format format, 105 texture::Format format,
106 bool enable_render_surfaces, 106 bool enable_render_surfaces,
107 unsigned int flags, 107 unsigned int flags,
108 unsigned int width, 108 unsigned int width,
109 unsigned int height, 109 unsigned int height,
110 GLuint gl_texture) 110 GLuint gl_texture)
111 : TextureGL(texture::TEXTURE_2D, 111 : TextureGL(texture::kTexture2d,
112 levels, 112 levels,
113 format, 113 format,
114 enable_render_surfaces, 114 enable_render_surfaces,
115 flags, 115 flags,
116 gl_texture), 116 gl_texture),
117 width_(width), 117 width_(width),
118 height_(height) {} 118 height_(height) {}
119 119
120 // Creates a 2D texture resource. 120 // Creates a 2D texture resource.
121 static Texture2DGL *Create(unsigned int width, 121 static Texture2DGL *Create(unsigned int width,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 class Texture3DGL : public TextureGL { 162 class Texture3DGL : public TextureGL {
163 public: 163 public:
164 Texture3DGL(unsigned int levels, 164 Texture3DGL(unsigned int levels,
165 texture::Format format, 165 texture::Format format,
166 bool enable_render_surfaces, 166 bool enable_render_surfaces,
167 unsigned int flags, 167 unsigned int flags,
168 unsigned int width, 168 unsigned int width,
169 unsigned int height, 169 unsigned int height,
170 unsigned int depth, 170 unsigned int depth,
171 GLuint gl_texture) 171 GLuint gl_texture)
172 : TextureGL(texture::TEXTURE_2D, 172 : TextureGL(texture::kTexture3d,
173 levels, 173 levels,
174 format, 174 format,
175 enable_render_surfaces, 175 enable_render_surfaces,
176 flags, 176 flags,
177 gl_texture), 177 gl_texture),
178 width_(width), 178 width_(width),
179 height_(height), 179 height_(height),
180 depth_(depth) {} 180 depth_(depth) {}
181 181
182 // Creates a 3D texture resource. 182 // Creates a 3D texture resource.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 // A cube map texture resource for GL. 225 // A cube map texture resource for GL.
226 class TextureCubeGL : public TextureGL { 226 class TextureCubeGL : public TextureGL {
227 public: 227 public:
228 TextureCubeGL(unsigned int levels, 228 TextureCubeGL(unsigned int levels,
229 texture::Format format, 229 texture::Format format,
230 bool render_surface_enabled, 230 bool render_surface_enabled,
231 unsigned int flags, 231 unsigned int flags,
232 unsigned int side, 232 unsigned int side,
233 GLuint gl_texture) 233 GLuint gl_texture)
234 : TextureGL(texture::TEXTURE_CUBE, 234 : TextureGL(texture::kTextureCube,
235 levels, 235 levels,
236 format, 236 format,
237 render_surface_enabled, 237 render_surface_enabled,
238 flags, 238 flags,
239 gl_texture), 239 gl_texture),
240 side_(side) {} 240 side_(side) {}
241 241
242 // Creates a cube map texture resource. 242 // Creates a cube map texture resource.
243 static TextureCubeGL *Create(unsigned int side, 243 static TextureCubeGL *Create(unsigned int side,
244 unsigned int levels, 244 unsigned int levels,
(...skipping 30 matching lines...) Expand all
275 275
276 private: 276 private:
277 unsigned int side_; 277 unsigned int side_;
278 DISALLOW_COPY_AND_ASSIGN(TextureCubeGL); 278 DISALLOW_COPY_AND_ASSIGN(TextureCubeGL);
279 }; 279 };
280 280
281 } // namespace command_buffer 281 } // namespace command_buffer
282 } // namespace o3d 282 } // namespace o3d
283 283
284 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_GL_TEXTURE_GL_H_ 284 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_GL_TEXTURE_GL_H_
OLDNEW
« no previous file with comments | « command_buffer/service/cross/gl/states_gl.cc ('k') | command_buffer/service/cross/gl/texture_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698