ios7 - glDrawElements throwing EXC_BAD_ACCESS using VBO on OpenGL ES 3.0 -


This problem is driving me crazy reasons because it sounds like I'm working with iOS 7 and OpenGL ES 3.0 .

The types of variables are:

  float corner [24]; Unsigned minor index [24]; Unsigned four colors [32]; Unsigned int vboIds [3];   

It executes only once:

  shorts [0] = -0.5f; Corner [1] = -0.5 F; Corners [2] = 0.5 F; Meridian [3] = 0.5 F; Corner [4] = -0.5f; Meridian [5] = 0.5 F; Corner [6] = 0.5 F; Corner [7] = 0.5 F; Corners [8] = 0.5 F; Corner [9] = -0.5f; Corners [10] = 0.5 F; Corners [11] = 0.5 F; Meridian [12] = -0.5f; Meridian [13] = -0.5f; Corner [14] = -0.5f; Meridian [15] = 0.5 F; Corner [16] = -0.5f; Corners [17] = -0.5f; Corners [18] = 0.5 F; Corners [19] = 0.5 F; Corners [20] = -0.5f; Corners [21] = -0.5f; Meridian [22] = 0.5 F; Corner [23] = -0.5F; Index [0] = 0; Index [1] = 1; // front indicator [2] = 1; Index [3] = 2; Index [4] = 2; Index [5] = 3; Index [6] = 3; Index [7] = 0; Index [8] = 4; Index [9] = 5; // back index [10] = 5; Index [11] = 6; Index [12] = 6; Index [13] = 7; Index [14] = 7; Index [15] = 4; Index [16] = 0; Index [17] = 4; // side index [18] = 1; Index [1 9] = 5; Index [20] = 2; Index [21] = 6; Index [22] = 3; Index [23] = 7; (Size_t i = 0; i <8; ++ i) {color [i * 4 + 0] = (unsigned char) ((corks [i * 3 + 0] +0.5 * 255); color [i * 4 + 1] = (unsigned char) ((Courts [i * 3 + 1] +0.5 * 255); Color [i * 4 + 2] = (unsigned char) ((Courts [i * 3 + 2] + 0.5) * 255;) GL (GlynBuffers (3, VBOODS); GL (GL_ARRAIBUFFER, VBIIDS [0]); GL (GlobeFedata (GL_ARRAY_BUFFER, Sizef (float) ) * 24, meridian, GLSADTICDRAW); GL (Globenth Buffer (GL_ARRA) Ibiyueffiar, Vibiaiaidis [1])); GL (Globe Bfrdeta (Jiel_aararaaibiyueffiar, Saikof (Thief) * 32, color, Jielsaditiaiseediaradblu)), GL (Glibinthbfr (Jiel_elemeimaraarabiyueffiar, Vibiaiaidis [2])); GL (Globe Bfrdeta (Jiel_elemiaararaubififiar, Saijhf (Short) * 24, Index, GLSADATADDRAW);   

And it is always executed when rendering:

  GA (Glbinthbfr (Jiel_aararaaibiyueffiar, Vibiaidis [0])); GL (Gliveteks Attrib pointer (0, 3, Jiel_ Floatt, Jiel_fls, Saiff (float) * 3, 0)); GL (glEnableVertexAttribArray (0)); GL (Globenth Buffer (GL_ARRAIBUFFER, VBIIDS [1]); GL (glittex attrib pointers (1, 4, GL_ UNSIGNED_BYTE, GL_TRUU, Psychopharm (four) * 4, 0)); GL (glEnableVertexAttribArray (1)); GL (Glibindbuffer (GL_AllemeEmRRABFFER, VBIIDS [2])); GL (Glaudillimments (GL-LNS, 24, GL_NSNSIISHARAT, 0)); GL (glDisableVertexAttribArray (0)); GL (glDisableVertexAttribArray (1)); GL (Glibindbuffer (GL_ARRAIUFFER, 0)); GL (Globind Buffer (GL_LEMEERAUFFEF, 0));   

glDrawElements (...) is throwing an EXC_BAD_ACCESS (code = 1, address = 0x0) and I do not know why.

I resolved by inserting it:

  GL (Glenbuffers (3 , VBIDS)); GL (Glibindbuffer (GL_ARRAIBFFER, VBIIDS [0]); GL (GlobeFedata (GL_ARRAY_BUFFER, size (float) * 24, meridian, GLSADTICDRAW); GL (Globenth Buffer (GL_ARRAIBUFFER, VBIIDS [1]); GL (Globe BufferData (GL_ARRAIBUFFER, Psychophag (Thief) * 32, Color, GLSADTICDRAW); GL (Glibindbuffer (GL_AllemMRRABFFER, VBIIDS [2])); GL (GlobeFedata (GL_LEMEERAUBFEFER, Size (Short) * 24, Index, GLSADATADRAW);   

Instead of constructor inside an InitGL method.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -