WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 41380
40746
WebGLShader now keeps track of its shader type
https://bugs.webkit.org/show_bug.cgi?id=40746
Summary
WebGLShader now keeps track of its shader type
Paul Sawaya
Reported
2010-06-16 16:43:47 PDT
Created
attachment 58945
[details]
WebGLShader now keeps track of its shader type WebGLShader needs to keep track of which type of shader it is (vertex, or fragment) to prepare for future enhancements to WebGL.
Attachments
WebGLShader now keeps track of its shader type
(980 bytes, patch)
2010-06-16 16:43 PDT
,
Paul Sawaya
cmarrin
: review-
Details
Formatted Diff
Diff
Added accessor, and made other code style changes as requested
(1.29 KB, patch)
2010-06-17 11:03 PDT
,
Paul Sawaya
sam
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kenneth Russell
Comment 1
2010-06-16 16:57:14 PDT
Comment on
attachment 58945
[details]
WebGLShader now keeps track of its shader type WebCore/html/canvas/WebGLShader.h:45 + GraphicsContext3D::WebGLEnumType shaderType; To conform to the WebKit style guide this should be "m_shaderType". WebCore/html/canvas/WebGLShader.cpp:43 + shaderType = type; This can be initialized in the initializer list: e.g. : CanvasObject(ctx) , m_shaderType(type)
Chris Marrin
Comment 2
2010-06-16 17:14:55 PDT
Comment on
attachment 58945
[details]
WebGLShader now keeps track of its shader type
> 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; }
Paul Sawaya
Comment 3
2010-06-17 11:03:10 PDT
Created
attachment 59015
[details]
Added accessor, and made other code style changes as requested
Sam Weinig
Comment 4
2010-06-17 22:02:14 PDT
Comment on
attachment 59015
[details]
Added accessor, and made other code style changes as requested
> WebGLShader::WebGLShader(WebGLRenderingContext* ctx, GraphicsContext3D::WebGLEnumType type) > - : CanvasObject(ctx) > + : CanvasObject(ctx), m_shaderType(type)
The ", m_shaderType(type)" should be on its own line. This change is also missing a ChangeLog. Please read
http://webkit.org/coding/contributing.html
for more information on how to do this.
Zhenyao Mo
Comment 5
2010-07-03 16:19:05 PDT
Sorry I didn't see this bug before. The feature is actually implemented in another bug:
https://bugs.webkit.org/show_bug.cgi?id=41380
. *** This bug has been marked as a duplicate of
bug 41380
***
Daniel Bates
Comment 6
2010-07-23 22:18:14 PDT
Comment on
attachment 59015
[details]
Added accessor, and made other code style changes as requested Clearing commit-queue flag to get this out of the commit-queue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug