[Webkit-unassigned] [Bug 40746] WebGLShader now keeps track of its shader type
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 16 17:14:54 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40746
--- Comment #2 from Chris Marrin <cmarrin at apple.com> 2010-06-16 17:14:55 PST ---
(From update of attachment 58945)
> Index: WebCore/html/canvas/WebGLShader.cpp
> ===================================================================
> --- WebCore/html/canvas/WebGLShader.cpp (revision 60639)
> +++ WebCore/html/canvas/WebGLShader.cpp (working copy)
> @@ -40,6 +40,8 @@ PassRefPtr<WebGLShader> WebGLShader::cre
> WebGLShader::WebGLShader(WebGLRenderingContext* ctx, GraphicsContext3D::WebGLEnumType type)
> : CanvasObject(ctx)
> {
> + shaderType = type;
> +
> setObject(context()->graphicsContext3D()->createShader(type));
> }
>
> Index: WebCore/html/canvas/WebGLShader.h
> ===================================================================
> --- WebCore/html/canvas/WebGLShader.h (revision 60639)
> +++ WebCore/html/canvas/WebGLShader.h (working copy)
> @@ -41,6 +41,8 @@ namespace WebCore {
>
> private:
> WebGLShader(WebGLRenderingContext*, GraphicsContext3D::WebGLEnumType);
> +
> + GraphicsContext3D::WebGLEnumType shaderType;
>
> virtual void _deleteObject(Platform3DObject);
>
WebCore/html/canvas/WebGLShader.cpp:43
+ shaderType = type;
This can be initialized in the constructor, as in:
: CanvasObject(ctx)
, m_shaderType(type)
WebCore/html/canvas/WebGLShader.h:45
+ GraphicsContext3D::WebGLEnumType shaderType;
The convention is to name this m_shaderType
WebCore/html/canvas/WebGLShader.h:46
+
You should add an accessor:
GraphicsContext3D::WebGLEnumType shaderType () const { return m_shaderType; }
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list