Commit 6fefd21f authored by zmo@google.com's avatar zmo@google.com
Browse files

2011-01-24 Zhenyao Mo <zmo@google.com>

        Reviewed by Kenneth Russell.

        Style cleanup for WebGLRenderingContext
        https://bugs.webkit.org/show_bug.cgi?id=52352

        * html/canvas/WebGLBuffer.cpp:
        * html/canvas/WebGLBuffer.h:
        * html/canvas/WebGLObject.cpp:
        * html/canvas/WebGLProgram.cpp:
        * html/canvas/WebGLRenderbuffer.cpp:
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::create):
        (WebCore::WebGLRenderingContext::blendFunc):
        (WebCore::WebGLRenderingContext::createShader):
        (WebCore::WebGLRenderingContext::deleteBuffer):
        (WebCore::WebGLRenderingContext::deleteShader):
        (WebCore::WebGLRenderingContext::deleteTexture):
        (WebCore::WebGLRenderingContext::disableVertexAttribArray):
        (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
        (WebCore::WebGLRenderingContext::validateRenderingState):
        (WebCore::WebGLRenderingContext::enableVertexAttribArray):
        (WebCore::WebGLRenderingContext::getUniform):
        (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
        * html/canvas/WebGLRenderingContext.h:
        * html/canvas/WebGLShader.cpp:
        * html/canvas/WebGLTexture.cpp:
        * html/canvas/WebGLUniformLocation.cpp:
        * html/canvas/WebGLUniformLocation.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6429a177
2011-01-24 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
Style cleanup for WebGLRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=52352
* html/canvas/WebGLBuffer.cpp:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLObject.cpp:
* html/canvas/WebGLProgram.cpp:
* html/canvas/WebGLRenderbuffer.cpp:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::blendFunc):
(WebCore::WebGLRenderingContext::createShader):
(WebCore::WebGLRenderingContext::deleteBuffer):
(WebCore::WebGLRenderingContext::deleteShader):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::disableVertexAttribArray):
(WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
(WebCore::WebGLRenderingContext::validateRenderingState):
(WebCore::WebGLRenderingContext::enableVertexAttribArray):
(WebCore::WebGLRenderingContext::getUniform):
(WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLShader.cpp:
* html/canvas/WebGLTexture.cpp:
* html/canvas/WebGLUniformLocation.cpp:
* html/canvas/WebGLUniformLocation.h:
2011-01-24 Chris Marrin <cmarrin@apple.com>
 
Reviewed by Eric Seidel.
......@@ -34,7 +34,7 @@
#include "WebGLRenderingContext.h"
namespace WebCore {
PassRefPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContext* ctx)
{
return adoptRef(new WebGLBuffer(ctx));
......
......@@ -42,10 +42,10 @@ public:
static PassRefPtr<WebGLBuffer> create(WebGLRenderingContext*);
bool associateBufferData(GC3Dsizeiptr size);
bool associateBufferData(ArrayBuffer* array);
bool associateBufferData(ArrayBufferView* array);
bool associateBufferSubData(GC3Dintptr offset, ArrayBuffer* array);
bool associateBufferSubData(GC3Dintptr offset, ArrayBufferView* array);
bool associateBufferData(ArrayBuffer*);
bool associateBufferData(ArrayBufferView*);
bool associateBufferSubData(GC3Dintptr offset, ArrayBuffer*);
bool associateBufferSubData(GC3Dintptr offset, ArrayBufferView*);
GC3Dsizeiptr byteLength() const;
const ArrayBuffer* elementArrayBuffer() const { return m_elementArrayBuffer.get(); }
......
......@@ -32,7 +32,7 @@
#include "WebGLRenderingContext.h"
namespace WebCore {
WebGLObject::WebGLObject(WebGLRenderingContext* context)
: m_object(0)
, m_context(context)
......
......@@ -32,7 +32,7 @@
#include "WebGLRenderingContext.h"
namespace WebCore {
PassRefPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContext* ctx)
{
return adoptRef(new WebGLProgram(ctx));
......
......@@ -32,7 +32,7 @@
#include "WebGLRenderingContext.h"
namespace WebCore {
PassRefPtr<WebGLRenderbuffer> WebGLRenderbuffer::create(WebGLRenderingContext* ctx)
{
return adoptRef(new WebGLRenderbuffer(ctx));
......
......@@ -351,7 +351,7 @@ PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElemen
canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Could not create a WebGL context."));
return 0;
}
return new WebGLRenderingContext(canvas, context, attributes);
}
......@@ -575,7 +575,6 @@ void WebGLRenderingContext::bindBuffer(GC3Denum target, WebGLBuffer* buffer, Exc
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::bindFramebuffer(GC3Denum target, WebGLFramebuffer* buffer, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
......@@ -616,7 +615,6 @@ void WebGLRenderingContext::bindRenderbuffer(GC3Denum target, WebGLRenderbuffer*
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::bindTexture(GC3Denum target, WebGLTexture* texture, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
......@@ -684,7 +682,7 @@ void WebGLRenderingContext::blendFunc(GC3Denum sfactor, GC3Denum dfactor)
return;
m_context->blendFunc(sfactor, dfactor);
cleanupAfterGraphicsCall(false);
}
}
void WebGLRenderingContext::blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha)
{
......@@ -989,7 +987,7 @@ PassRefPtr<WebGLBuffer> WebGLRenderingContext::createBuffer()
addObject(o.get());
return o;
}
PassRefPtr<WebGLFramebuffer> WebGLRenderingContext::createFramebuffer()
{
if (isContextLost())
......@@ -1035,7 +1033,7 @@ PassRefPtr<WebGLShader> WebGLRenderingContext::createShader(GC3Denum type, Excep
m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
return 0;
}
RefPtr<WebGLShader> o = WebGLShader::create(this, type);
addObject(o.get());
return o;
......@@ -1053,7 +1051,7 @@ void WebGLRenderingContext::deleteBuffer(WebGLBuffer* buffer)
{
if (isContextLost() || !buffer)
return;
buffer->deleteObject();
if (!isGLES2Compliant()) {
......@@ -1111,7 +1109,7 @@ void WebGLRenderingContext::deleteShader(WebGLShader* shader)
{
if (isContextLost() || !shader)
return;
shader->deleteObject();
}
......@@ -1119,7 +1117,7 @@ void WebGLRenderingContext::deleteTexture(WebGLTexture* texture)
{
if (isContextLost() || !texture)
return;
texture->deleteObject();
if (m_framebufferBinding)
m_framebufferBinding->removeAttachment(texture);
......@@ -1167,7 +1165,6 @@ void WebGLRenderingContext::detachShader(WebGLProgram* program, WebGLShader* sha
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::disable(GC3Denum cap)
{
if (isContextLost() || !validateCapability(cap))
......@@ -1185,7 +1182,7 @@ void WebGLRenderingContext::disableVertexAttribArray(GC3Duint index, ExceptionCo
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return;
}
if (index < m_vertexAttribState.size())
m_vertexAttribState[index].enabled = false;
......@@ -1308,8 +1305,8 @@ bool WebGLRenderingContext::validateIndexArrayPrecise(GC3Dsizei count, GC3Denum
lastIndex = *p;
++p;
}
}
}
// Then set the last index in the index array and make sure it is valid.
numElementsRequired = lastIndex + 1;
return numElementsRequired > 0;
......@@ -1353,10 +1350,10 @@ bool WebGLRenderingContext::validateRenderingState(int numElementsRequired)
}
}
}
if (smallestNumElements == INT_MAX)
smallestNumElements = 0;
return numElementsRequired <= smallestNumElements;
}
......@@ -1512,12 +1509,12 @@ void WebGLRenderingContext::enableVertexAttribArray(GC3Duint index, ExceptionCod
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return;
}
if (index >= m_vertexAttribState.size())
m_vertexAttribState.resize(index + 1);
m_vertexAttribState[index].enabled = true;
m_context->enableVertexAttribArray(index);
cleanupAfterGraphicsCall(false);
}
......@@ -1530,7 +1527,6 @@ void WebGLRenderingContext::finish()
cleanupAfterGraphicsCall(true);
}
void WebGLRenderingContext::flush()
{
if (isContextLost())
......@@ -2243,7 +2239,7 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG
return WebGLGetInfo();
}
GC3Dint location = uniformLocation->location();
WebGLStateRestorer(this, false);
// FIXME: make this more efficient using WebGLUniformLocation and caching types in it
GC3Dint activeUniforms = 0;
......@@ -3748,7 +3744,7 @@ void WebGLRenderingContext::detachAndRemoveAllObjects()
HashSet<RefPtr<WebGLObject> >::iterator pend = m_canvasObjects.end();
for (HashSet<RefPtr<WebGLObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it)
(*it)->detachContext();
m_canvasObjects.clear();
}
......
......@@ -69,13 +69,13 @@ public:
virtual bool isAccelerated() const { return true; }
virtual bool paintsIntoCanvasBuffer() const;
void activeTexture(GC3Denum texture, ExceptionCode& ec);
void attachShader(WebGLProgram*, WebGLShader*, ExceptionCode& ec);
void bindAttribLocation(WebGLProgram*, GC3Duint index, const String& name, ExceptionCode& ec);
void bindBuffer(GC3Denum target, WebGLBuffer*, ExceptionCode& ec);
void bindFramebuffer(GC3Denum target, WebGLFramebuffer*, ExceptionCode& ec);
void bindRenderbuffer(GC3Denum target, WebGLRenderbuffer*, ExceptionCode& ec);
void bindTexture(GC3Denum target, WebGLTexture*, ExceptionCode& ec);
void activeTexture(GC3Denum texture, ExceptionCode&);
void attachShader(WebGLProgram*, WebGLShader*, ExceptionCode&);
void bindAttribLocation(WebGLProgram*, GC3Duint index, const String& name, ExceptionCode&);
void bindBuffer(GC3Denum target, WebGLBuffer*, ExceptionCode&);
void bindFramebuffer(GC3Denum target, WebGLFramebuffer*, ExceptionCode&);
void bindRenderbuffer(GC3Denum target, WebGLRenderbuffer*, ExceptionCode&);
void bindTexture(GC3Denum target, WebGLTexture*, ExceptionCode&);
void blendColor(GC3Dfloat red, GC3Dfloat green, GC3Dfloat blue, GC3Dfloat alpha);
void blendEquation(GC3Denum mode);
void blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha);
......@@ -94,7 +94,7 @@ public:
void clearDepth(GC3Dfloat);
void clearStencil(GC3Dint);
void colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha);
void compileShader(WebGLShader*, ExceptionCode& ec);
void compileShader(WebGLShader*, ExceptionCode&);
// void compressedTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Dsizei imageSize, const void* data);
// void compressedTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei GC3Dsizei height, GC3Denum format, GC3Dsizei imageSize, const void* data);
......@@ -131,8 +131,8 @@ public:
void enableVertexAttribArray(GC3Duint index, ExceptionCode&);
void finish();
void flush();
void framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, WebGLRenderbuffer*, ExceptionCode& ec);
void framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, WebGLTexture*, GC3Dint level, ExceptionCode& ec);
void framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, WebGLRenderbuffer*, ExceptionCode&);
void framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, WebGLTexture*, GC3Dint level, ExceptionCode&);
void frontFace(GC3Denum mode);
void generateMipmap(GC3Denum target);
......@@ -147,10 +147,10 @@ public:
WebGLGetInfo getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname, ExceptionCode&);
WebGLGetInfo getParameter(GC3Denum pname, ExceptionCode&);
WebGLGetInfo getProgramParameter(WebGLProgram*, GC3Denum pname, ExceptionCode&);
String getProgramInfoLog(WebGLProgram*, ExceptionCode& ec);
String getProgramInfoLog(WebGLProgram*, ExceptionCode&);
WebGLGetInfo getRenderbufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode&);
WebGLGetInfo getShaderParameter(WebGLShader*, GC3Denum pname, ExceptionCode& ec);
String getShaderInfoLog(WebGLShader*, ExceptionCode& ec);
WebGLGetInfo getShaderParameter(WebGLShader*, GC3Denum pname, ExceptionCode&);
String getShaderInfoLog(WebGLShader*, ExceptionCode&);
// TBD
// void glGetShaderPrecisionFormat (GC3Denum shadertype, GC3Denum precisiontype, GC3Dint* range, GC3Dint* precision);
......@@ -192,30 +192,30 @@ public:
void texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Dsizei width, GC3Dsizei height, GC3Dint border,
GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode&);
GC3Denum format, GC3Denum type, ArrayBufferView*, ExceptionCode&);
void texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Denum format, GC3Denum type, ImageData* pixels, ExceptionCode&);
GC3Denum format, GC3Denum type, ImageData*, ExceptionCode&);
void texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Denum format, GC3Denum type, HTMLImageElement* image, ExceptionCode&);
GC3Denum format, GC3Denum type, HTMLImageElement*, ExceptionCode&);
void texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Denum format, GC3Denum type, HTMLCanvasElement* canvas, ExceptionCode&);
GC3Denum format, GC3Denum type, HTMLCanvasElement*, ExceptionCode&);
void texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Denum format, GC3Denum type, HTMLVideoElement* video, ExceptionCode&);
GC3Denum format, GC3Denum type, HTMLVideoElement*, ExceptionCode&);
void texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param);
void texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param);
void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
GC3Dsizei width, GC3Dsizei height,
GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode&);
GC3Denum format, GC3Denum type, ArrayBufferView*, ExceptionCode&);
void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
GC3Denum format, GC3Denum type, ImageData* pixels, ExceptionCode&);
GC3Denum format, GC3Denum type, ImageData*, ExceptionCode&);
void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
GC3Denum format, GC3Denum type, HTMLImageElement* image, ExceptionCode&);
GC3Denum format, GC3Denum type, HTMLImageElement*, ExceptionCode&);
void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
GC3Denum format, GC3Denum type, HTMLCanvasElement* canvas, ExceptionCode&);
GC3Denum format, GC3Denum type, HTMLCanvasElement*, ExceptionCode&);
void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
GC3Denum format, GC3Denum type, HTMLVideoElement* video, ExceptionCode&);
GC3Denum format, GC3Denum type, HTMLVideoElement*, ExceptionCode&);
void uniform1f(const WebGLUniformLocation* location, GC3Dfloat x, ExceptionCode&);
void uniform1fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode&);
......@@ -334,9 +334,9 @@ public:
// If numElements <= 0, we only check if each enabled vertex attribute is bound to a buffer.
bool validateRenderingState(int numElements);
bool validateWebGLObject(WebGLObject* object);
bool validateWebGLObject(WebGLObject*);
PassRefPtr<Image> videoFrameToImage(HTMLVideoElement* video);
PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*);
RefPtr<GraphicsContext3D> m_context;
......@@ -457,19 +457,19 @@ public:
RefPtr<WebKitLoseContext> m_webkitLoseContext;
// Helpers for getParameter and others
WebGLGetInfo getBooleanParameter(GC3Denum pname);
WebGLGetInfo getBooleanArrayParameter(GC3Denum pname);
WebGLGetInfo getFloatParameter(GC3Denum pname);
WebGLGetInfo getIntParameter(GC3Denum pname);
WebGLGetInfo getUnsignedIntParameter(GC3Denum pname);
WebGLGetInfo getWebGLFloatArrayParameter(GC3Denum pname);
WebGLGetInfo getWebGLIntArrayParameter(GC3Denum pname);
WebGLGetInfo getBooleanParameter(GC3Denum);
WebGLGetInfo getBooleanArrayParameter(GC3Denum);
WebGLGetInfo getFloatParameter(GC3Denum);
WebGLGetInfo getIntParameter(GC3Denum);
WebGLGetInfo getUnsignedIntParameter(GC3Denum);
WebGLGetInfo getWebGLFloatArrayParameter(GC3Denum);
WebGLGetInfo getWebGLIntArrayParameter(GC3Denum);
void texImage2DBase(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Dsizei width, GC3Dsizei height, GC3Dint border,
GC3Denum format, GC3Denum type, void* pixels, ExceptionCode&);
void texImage2DImpl(GC3Denum target, GC3Dint level, GC3Denum internalformat,
GC3Denum format, GC3Denum type, Image* image,
GC3Denum format, GC3Denum type, Image*,
bool flipY, bool premultiplyAlpha, ExceptionCode&);
void texSubImage2DBase(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
GC3Dsizei width, GC3Dsizei height,
......@@ -546,7 +546,7 @@ public:
// Helper function to print warnings to console. Currently
// used only to warn about use of obsolete functions.
void printWarningToConsole(const String& message);
void printWarningToConsole(const String&);
// Helper function to validate input parameters for framebuffer functions.
// Generate GL error if parameters are illegal.
......@@ -562,20 +562,20 @@ public:
bool validateCapability(GC3Denum);
// Helper function to validate input parameters for uniform functions.
bool validateUniformParameters(const WebGLUniformLocation* location, Float32Array* v, GC3Dsizei mod);
bool validateUniformParameters(const WebGLUniformLocation* location, Int32Array* v, GC3Dsizei mod);
bool validateUniformParameters(const WebGLUniformLocation* location, void* v, GC3Dsizei size, GC3Dsizei mod);
bool validateUniformMatrixParameters(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, GC3Dsizei mod);
bool validateUniformMatrixParameters(const WebGLUniformLocation* location, GC3Dboolean transpose, void* v, GC3Dsizei size, GC3Dsizei mod);
bool validateUniformParameters(const WebGLUniformLocation*, Float32Array*, GC3Dsizei mod);
bool validateUniformParameters(const WebGLUniformLocation*, Int32Array*, GC3Dsizei mod);
bool validateUniformParameters(const WebGLUniformLocation*, void*, GC3Dsizei size, GC3Dsizei mod);
bool validateUniformMatrixParameters(const WebGLUniformLocation*, GC3Dboolean transpose, Float32Array*, GC3Dsizei mod);
bool validateUniformMatrixParameters(const WebGLUniformLocation*, GC3Dboolean transpose, void*, GC3Dsizei size, GC3Dsizei mod);
// Helper function to validate parameters for bufferData.
// Return the current bound buffer to target, or 0 if parameters are invalid.
WebGLBuffer* validateBufferDataParameters(GC3Denum target, GC3Denum usage);
// Helper functions for vertexAttribNf{v}.
void vertexAttribfImpl(GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3);
void vertexAttribfvImpl(GC3Duint index, Float32Array* v, GC3Dsizei expectedSize);
void vertexAttribfvImpl(GC3Duint index, GC3Dfloat* v, GC3Dsizei size, GC3Dsizei expectedSize);
void vertexAttribfImpl(GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat);
void vertexAttribfvImpl(GC3Duint index, Float32Array*, GC3Dsizei expectedSize);
void vertexAttribfvImpl(GC3Duint index, GC3Dfloat*, GC3Dsizei size, GC3Dsizei expectedSize);
// Helpers for simulating vertexAttrib0
void initVertexAttrib0();
......
......@@ -32,7 +32,7 @@
#include "WebGLRenderingContext.h"
namespace WebCore {
PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContext* ctx, GC3Denum type)
{
return adoptRef(new WebGLShader(ctx, type));
......
......@@ -33,7 +33,7 @@
#include "WebGLRenderingContext.h"
namespace WebCore {
PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext* ctx)
{
return adoptRef(new WebGLTexture(ctx));
......
......@@ -31,7 +31,7 @@
#include "WebGLUniformLocation.h"
namespace WebCore {
PassRefPtr<WebGLUniformLocation> WebGLUniformLocation::create(WebGLProgram* program, GC3Dint location)
{
return adoptRef(new WebGLUniformLocation(program, location));
......
......@@ -39,14 +39,14 @@ class WebGLUniformLocation : public RefCounted<WebGLUniformLocation> {
public:
virtual ~WebGLUniformLocation() { }
static PassRefPtr<WebGLUniformLocation> create(WebGLProgram* program, GC3Dint location);
static PassRefPtr<WebGLUniformLocation> create(WebGLProgram*, GC3Dint location);
WebGLProgram* program() const;
GC3Dint location() const;
protected:
WebGLUniformLocation(WebGLProgram* program, GC3Dint location);
WebGLUniformLocation(WebGLProgram*, GC3Dint location);
private:
RefPtr<WebGLProgram> m_program;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment