{"action":"created","issue":{"url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/108","labels_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/108/comments","events_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/108/events","html_url":"https://github.com/matus-chochlik/oglplus/issues/108","id":67039948,"number":108,"title":"Cannot access private member declared in class 'oglplus::Object<oglplus::BufferOps'","user":{"login":"jose-villegas","id":762582,"avatar_url":"https://avatars.githubusercontent.com/u/762582?v=3","gravatar_id":"","url":"https://api.github.com/users/jose-villegas","html_url":"https://github.com/jose-villegas","followers_url":"https://api.github.com/users/jose-villegas/followers","following_url":"https://api.github.com/users/jose-villegas/following{/other_user}","gists_url":"https://api.github.com/users/jose-villegas/gists{/gist_id}","starred_url":"https://api.github.com/users/jose-villegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jose-villegas/subscriptions","organizations_url":"https://api.github.com/users/jose-villegas/orgs","repos_url":"https://api.github.com/users/jose-villegas/repos","events_url":"https://api.github.com/users/jose-villegas/events{/privacy}","received_events_url":"https://api.github.com/users/jose-villegas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-08T03:26:05Z","updated_at":"2015-04-09T07:08:49Z","closed_at":null,"body":"I'm getting this error declaring a buffer object as a member in my class, for some reason this is only happening in a single class, I have buffers declared all over many classes in my current project but this is only happening for this class.\r\n\r\nThis is the file where I'm getting this error.\r\n\r\nYet the buffer objects in TerrainChunkGenerator don't give any problem, same with some other buffers I have declared in other classes\r\n\r\n```c++\r\nclass TerrainChunk\r\n{\r\n    private:\r\n        std::vector<glm::vec3> vertices;\r\n        std::vector<glm::vec3> normals;\r\n        std::vector<glm::vec2> texCoords;\r\n        // mesh data gpu buffers\r\n        std::array<Buffer, 4> buffer;\r\n    public:\r\n        TerrainChunk(std::vector<glm::vec3> &vertices,\r\n                     std::vector<glm::vec3> &normals,\r\n                     std::vector<glm::vec2> &texCoords);\r\n        // chunk num vertices = chunkSizeExponent ^ 2 + 1\r\n        ~TerrainChunk() {};\r\n        void bindBufferData(Program &program);\r\n        void bindBuffer(Program &program);\r\n};\r\n\r\nclass TerrainChunksGenerator\r\n{\r\n    private:\r\n        Context gl;\r\n        // avoid creating indices again if mesh has the same configuration\r\n        bool indicesCombinationGenerated = false;\r\n        // indices combinations for different lod levels\r\n        std::array<std::vector<unsigned int>, 3> indicesLoD;\r\n        std::array<Buffer, 3> indicesBuffer;\r\n    private:\r\n        bool chunksGenerated = false;\r\n        // helper for getting x, y from contiguos vectors\r\n        glm::vec3 &getVertex(int x, int y);\r\n        glm::vec2 &getTexCoord(int x, int y);\r\n        glm::vec3 &getNormal(int x, int y);\r\n        // mesh parameters data\r\n        unsigned int chunkSize;\r\n        unsigned int meshSize;\r\n        unsigned int meshSizeExponent;\r\n        unsigned int chunkSizeExponent;\r\n        unsigned int restartIndexToken;\r\n        // whole mesh data\r\n        std::vector<glm::vec3> vertices;\r\n        std::vector<glm::vec3> normals;\r\n        std::vector<glm::vec2> texCoords;\r\n        // collection of all mesh chunks\r\n        std::vector<std::vector<TerrainChunk>> meshChunks;\r\n    public:\r\n        // generates all terrain chunks\r\n        void generateChunks(std::vector<glm::vec3> &meshVertices,\r\n                            std::vector<glm::vec3> &meshNormals,\r\n                            std::vector<glm::vec2> &meshTexCoords,\r\n                            unsigned int meshSizeExponent,\r\n                            unsigned int chunkSizeExponent);\r\n        // uploads all the chunks buffer objects to the gpu\r\n        void bindBufferData(Program &program);\r\n\r\n        TerrainChunk &MeshChunk(int i, int j) { return meshChunks[i][j]; }\r\n        // creates indices combinations for\r\n        // 3 Level of Detail levels\r\n        void generateIndicesCombination();\r\n\r\n        TerrainChunksGenerator() {};\r\n        ~TerrainChunksGenerator();\r\n};\r\n```\r\n\r\nThis is using MSVC2013"},"comment":{"url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/comments/91132394","html_url":"https://github.com/matus-chochlik/oglplus/issues/108#issuecomment-91132394","issue_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/108","id":91132394,"user":{"login":"matus-chochlik","id":1516057,"avatar_url":"https://avatars.githubusercontent.com/u/1516057?v=3","gravatar_id":"","url":"https://api.github.com/users/matus-chochlik","html_url":"https://github.com/matus-chochlik","followers_url":"https://api.github.com/users/matus-chochlik/followers","following_url":"https://api.github.com/users/matus-chochlik/following{/other_user}","gists_url":"https://api.github.com/users/matus-chochlik/gists{/gist_id}","starred_url":"https://api.github.com/users/matus-chochlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matus-chochlik/subscriptions","organizations_url":"https://api.github.com/users/matus-chochlik/orgs","repos_url":"https://api.github.com/users/matus-chochlik/repos","events_url":"https://api.github.com/users/matus-chochlik/events{/privacy}","received_events_url":"https://api.github.com/users/matus-chochlik/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T07:08:49Z","updated_at":"2015-04-09T07:08:49Z","body":"Thanks! I'll have a look at the problem with the move constructor in Array."}}