Jump to content
  • Advertisement

lj_archer

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

108 Neutral

About lj_archer

  • Rank
    Newbie
  1. lj_archer

    DrawElements failed in Mali400

    Actually, in this particular case, it is like to be his use of GL_UNSIGNED_INT, but the frank fact is that Mali400 shader compilers do not adhere to the OpenGL ES 2.0 standard and many things that run on other devices simply will not on Mali400. This was a major problem for us when porting our in-house engine, compounded by the fact that you can’t set breakpoints in Native Activity apps. Since I was not on that team I don’t remember the details, but it had to do with array access. Either array access was completely broken or buggy, or there were artificial restrictions on accessing arrays, such as that they could only be accessed with constants, not variables. So, in fact, it quite likely could have been specifically the Mali400 that was actually causing the problems. The Mali400 is capable of rendering some things, but they really did ship millions of devices that can’t render most things that work fine on other devices. This is why it just never pays to support Android. L. Spiro   Hi, L. Spiro,   Your reply is very usful. The Adreno, SGX have a good compatibility but Mali. I should pay more attention.   But this time is my fault. I am not read the opengl es spec carefully. Using UNSIGNED_INT cause this issue.   Thank you!!
  2. lj_archer

    DrawElements failed in Mali400

      Hi, adampetrone, Thank you!   I can render it successfully now. Just using UNSIGNED_SHORT instead of UNSIGNED_INT.   This is a great help !!!
  3. lj_archer

    DrawElements failed in Mali400

      Hi, Katie,   It was not the shader issue. Otherwise, it will be failed on other chip.   And it was failed because the wrong arguments of DrawElements. I should use UNSIGNED_SHORT instead of UNSIGNED_INT.   Thank you~~
  4. lj_archer

    DrawElements failed in Mali400

        Hi, Katie,   Thank you for your reply.   Here are my code snippet:   int nrow = 10; int ncol = 10; int nNum = (nrow+1)*(ncol+1); GLfloat* pVert = (GLfloat*)malloc(nNum*4*sizeof(GLfloat)); if( NULL==pVert ) return; memset(pVert, 0, nNum*4*sizeof(GLfloat)); float fw = 2.0f/nrow; float fh = 2.0f/ncol; int step = 0; for( int i=0; i<col+1; i++ ) { for( int j=0; j<row+1; j++ ) { pVert[step]=-1.0f+fw*j; pVert[step+1]=-1.0f+fh*i; pVert[step+2]=0.5f, pVert[step+3]=1.0f; step += 4; } } GLuint* pIndex = (GLuint*)malloc(nrow*ncol*6*sizeof(GLuint)); if( NULL == pIndex ) { free(pVert); return; } memset( pIndex, 0, nrow*ncol*6*sizeof(GLuint) ); step = 0; for( int i=0; i<ncol; i++ ) { for( int j=0; j<row; j++ ) { pIndex[step] = (row+1)*i+j; pIndex[step+1] = (row+1)*i+j+(row+1); pIndex[step+2] = (row+1)*i+j+1; pIndex[step+3] = (row+1)*i+j+(row+1); pIndex[step+4] = (row+1)*i+j+1; pIndex[step+5] = (row+1)*i+j+1+(row+1); step+=6; } }     and here are the render function:   glClearColor( 0.2f, 0.2f, 0.2f, 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glUseProgram( nProgram ); glVertexAttribPointer( nVert, 4, GL_FLOAT, GL_FALSE, 0, pVert ); glDrawElements( GL_TRIANGLES, nNum*3, GL_UNSIGNED_INT, pIndex ); glFlush(); vdkSwapEGL(&egl);     The shaders do nothing just gl_Position = "input position", gl_FragColor=vec4(1.0, 0.0, 0.0, 1.0);   The Mali400 GPU cannot render anything, but Adreno225 and SGX540 rendering what I expected.   Thank you~
  5. Hi, All   I am writing a simple application to draw some rectangle on the screen.    But it failed on Mali400 GPU. It works on our other phones, such as Adreno225, SGX540.   Can someone tell me what's wrong? Is the Mali400's issue??   Thanks.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!