Closed Bug 571078 Opened 14 years ago Closed 14 years ago

fix attribute validation

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Assigned: vlad)

Details

Attachments

(1 file)

This patch implements the attribute validation strategy described in 

https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html#6.2

The fixes allow us to pass gl-enable-vertex-attrib.html.
Attached patch patchSplinter Review
Erm, *this* fixes the above.
Attachment #450211 - Flags: review?(bjacob)
Attachment #450211 - Flags: review?(bjacob) → review+
Just one compile error: in GetActiveAttrib, you need:

+    WebGLProgram *prog;

and there are a couple of new warnings in ValidateBuffers():

WebGLContextValidate.cpp
/home/bjacob/mozilla-central/content/canvas/src/WebGLContextValidate.cpp: In member function ‘PRBool mozilla::WebGLContext::ValidateBuffers(PRUint32)’:
/home/bjacob/mozilla-central/content/canvas/src/WebGLContextValidate.cpp:89: warning: comparison between signed and unsigned integer expressions
/home/bjacob/mozilla-central/content/canvas/src/WebGLContextValidate.cpp:91: warning: comparison between signed and unsigned integer expressions

corresponding to this code:

    NS_ASSERTION(currentProgram == mCurrentProgram->GLName(),
                 "WebGL: current program doesn't agree with GL state");
    if (currentProgram != mCurrentProgram->GLName())
        return PR_FALSE;
Ah whoops, looks like I forgot to qrefresh after I fixed those.

http://hg.mozilla.org/mozilla-central/rev/7b15545cf9aa
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: