# ERROR: VertexAttribPointer data is inaccessible

**URL:** <https://forums.imgtec.com/t/error-vertexattribpointer-data-is-inaccessible/2561>\
**Category:** PowerVR Insider\
**Tags:** pvrtrace\
**Created:** [November 14, 2017, 9:24am UTC](https://forums.imgtec.com/t/error-vertexattribpointer-data-is-inaccessible/2561 "2017-11-14T09:24:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roulio77](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@roulio77](https://forums.imgtec.com/u/roulio77)\
**Post date:** [November 14, 2017, 9:24am UTC](https://forums.imgtec.com/t/error-vertexattribpointer-data-is-inaccessible/2561/1 "2017-11-14T09:24:35Z")

</div>

I have an OpenGL ES 3.0 application running on windows. I’m developing with Visual Studio. The render output is corrupted and although eglGetError does not show any problem I get the following error in stdout when I’m using PVRTrace:

> [@](#):
>
> ERROR: VertexAttribPointer data is inaccessible as we failed to obtain a valid pointer for the indices.

I already checked the trace and could not find anything wrong. Can you please tell me what this error message exactly means? e.g. is the indexbuffer pointer not valid or is the VertexAttribPointer index incorrect??  
the pvrtrace.can be downloaded here: [http://www.roulio.com/NativeWeb.exe.pvrtrace.zip](http://www.roulio.com/NativeWeb.exe.pvrtrace.zip)

What I do is I create a VAO fill it with VBO and IBO. The VBO is an interleaved vertex array. You can see the details in the trace.  
The vertex looks like this:  
[scode lang=“C++”] class DLL API3DVertex  
{  
public:  
API3DVECTOR4 Position;  
API3DVECTOR4 Normal;  
API3DVECTOR4 TexCoords;  
}[/scode]

where an API3DVECTOR4 consists of 4 floats.

Any help is appreciated!  
Ulrich

---

<div class="post-metadata">

**Author:** ![CarlosSarria](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/carlossarria/32/263_2.png) [@CarlosSarria](https://forums.imgtec.com/u/CarlosSarria)\
**Post date:** [November 14, 2017, 3:13pm UTC](https://forums.imgtec.com/t/error-vertexattribpointer-data-is-inaccessible/2561/2 "2017-11-14T15:13:18Z")

</div>

Hi Ulrich,

It is difficult to know what is going wrong. PVRTrace was unable to get valid index data. When I opened the trace in PVRTraceGUI it shows some application errors. It seems that two of the shaders are failing compilation. Maybe the IBO problem is just a side effect.  
The error is on this line  
vec4 color = texture (color\_map, st).rgba_dot(normal.xyz, lightDir);  
which needs to be like this  
vec4 color = texture(color\_map, st.xy).rgba_dot(normal.xyz, lightDir);

Regards.

Carlos.

---

<div class="post-metadata">

**Author:** ![roulio77](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@roulio77](https://forums.imgtec.com/u/roulio77)\
**Post date:** [November 15, 2017, 8:20am UTC](https://forums.imgtec.com/t/error-vertexattribpointer-data-is-inaccessible/2561/3 "2017-11-15T08:20:03Z")

</div>

Hi Carlos.

Thanks for the quick reply. I could fix this ES version by binding also the ibo before drawing(besides the VAO). But actually this should not be necessary in my eyes, as the VAO should also keep the ibo? e.g. I have a plain OpenGL Test application where this is working as expected. Sadly, I can only use GLES3.0 maybe it will work in 3.1?

Thanks a lot for your help anyway!
