• Paladin of the Pegasos
    Paladin of the Pegasos
    Jupp3
    Posts: 1192 from 2003/2/24
    From: Helsinki, Finland
    Quote:

    eliot wrote:
    GL_DOUBLE

    Do you REALLY need double precision for what you're doing? It's using more memory, is slower, and can't say I'd see much benefits really...

    At least in the past, TinyGL has had some "issues" with some formats (glInt at least, I think?).
    Quote:


    glVertexPointer(3, GL_DOUBLE, sizeof(Vertex), NULL);
    glNormalPointer(GL_DOUBLE, 0, NULL);


    Just wondering why you use different stride values, aren't both tightly packed (so 0 will work)?

    Also, see previous comments regarding interleaved arrays.

    Also, a minor logical error here:
    Code:
    glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex) * o.normals.size(), o.normals.data(), GL_STATIC_DRAW);

    Shouldn't you use sizeof(Normal) here? Probably both are 3 doubles currently though...
  • »01.01.17 - 14:40
    Profile Visit Website