OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 25 matching lines...) Expand all Loading... |
36 return adoptRef(new WebGLProgram(ctx)); | 36 return adoptRef(new WebGLProgram(ctx)); |
37 } | 37 } |
38 | 38 |
39 WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx) | 39 WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx) |
40 : WebGLSharedObject(ctx) | 40 : WebGLSharedObject(ctx) |
41 , m_linkStatus(false) | 41 , m_linkStatus(false) |
42 , m_linkCount(0) | 42 , m_linkCount(0) |
43 , m_infoValid(true) | 43 , m_infoValid(true) |
44 { | 44 { |
45 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
46 setObject(ctx->webGraphicsContext3D()->createProgram()); | 46 setObject(ctx->webContext()->createProgram()); |
47 } | 47 } |
48 | 48 |
49 WebGLProgram::~WebGLProgram() | 49 WebGLProgram::~WebGLProgram() |
50 { | 50 { |
51 deleteObject(0); | 51 deleteObject(0); |
52 } | 52 } |
53 | 53 |
54 void WebGLProgram::deleteObjectImpl(blink::WebGraphicsContext3D* context3d, Plat
form3DObject obj) | 54 void WebGLProgram::deleteObjectImpl(blink::WebGraphicsContext3D* context3d, Plat
form3DObject obj) |
55 { | 55 { |
56 context3d->deleteProgram(obj); | 56 context3d->deleteProgram(obj); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 return; | 185 return; |
186 GLint linkStatus = 0; | 186 GLint linkStatus = 0; |
187 context->getProgramiv(object(), GL_LINK_STATUS, &linkStatus); | 187 context->getProgramiv(object(), GL_LINK_STATUS, &linkStatus); |
188 m_linkStatus = linkStatus; | 188 m_linkStatus = linkStatus; |
189 if (m_linkStatus) | 189 if (m_linkStatus) |
190 cacheActiveAttribLocations(context); | 190 cacheActiveAttribLocations(context); |
191 m_infoValid = true; | 191 m_infoValid = true; |
192 } | 192 } |
193 | 193 |
194 } | 194 } |
OLD | NEW |