Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

WebGL example #101

@fracasula

Description

@fracasula

Hi,
I've written a basic scenario with some wonderful circles.
With canvas all works correctly, but if I try to replace the director.initialize() with director.initializeGL(), I receive the following errors and no data has been displayed:

WebGL: INVALID_VALUE: vertexAttribPointer: bad size, stride or offset
WebGL: INVALID_OPERATION: uniformMatrix4fv: location is not from current program

My code (commenting and uncommenting /var universe/ produce the same):

(function () {
    window.addEventListener(
        'load',
        function () {
            var director = new CAAT.Director().initializeGL(
                    800,
                    480
                ).setClear(!1),
                scene = director.createScene();

            /*var universe = new Universe(director, scene);
            universe.create();
            universe.populate();*/

            director.loop(60);
        },
        false);
})();

On the same browser, Chrome 23 on Ubuntu 12.10, Sumon WebGL runs, so WebGL with CAAT are supported by my environment.

So, is possible to read some "getting started" tutorial to have a basic webgl + caat app running?
I see here: http://labs.hyperandroid.com/static/CAAT-Samples/tutorials/t1.html

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions