Results 1 to 2 of 2

Thread: about draw a cube with diffeient matrix

  1. #1

    about draw a cube with diffeient matrix


    now i have a problem at drawing a cube with different matrix in function call glLoadMatrix.
    These are the codes i used:
    Code :
         * draw c cube*/
        // Recalculate the view frustrum
        TSize size;
        size = this->Size();
        TInt iScreenWidth=size.iWidth;
        TInt iScreenHeight=size.iHeight;
        glViewport( 0, 0, iScreenWidth, iScreenHeight );
        glMatrixMode( GL_PROJECTION );
        glClearDepthf( 1.0 );
        // Enable vertex arrays.
        glEnableClientState( GL_VERTEX_ARRAY );
        // Set array pointers.
        glVertexPointer( 3, GL_SHORT, 0, cubeVertices);
        glEnableClientState( GL_NORMAL_ARRAY );
    	//instead of gl_para,when this array which is like gl_para ,it works
              //float aa[16]={0.976065,-0.040603,0.213698,0.0,   
        		     // -0.006501,-0.987430,-0.157924,0.0,
        		     // 0.217424,0.152753,-0.964050,0.0,
        		    // -32.914699,22.961889,324.126868,1.0};
            glLoadMatrixf((float*)gl_para); //gl_para changes every time
            glDrawElements( GL_TRIANGLES, 36, GL_UNSIGNED_BYTE, cubeIndices );
        glDisable( GL_DEPTH_TEST );
        CCameraAppBaseContainer* instance=(CCameraAppBaseContainer*)this;
        /* Call eglSwapBuffers, which blit the graphics to the window */
        eglSwapBuffers( instance->iEglDisplay, instance->iEglSurface );

    when i use a fixed matrix , it works. when i use gl_para, it appears nothing. why? how can i use gl_para in right way?

  2. #2
    Senior Member
    Join Date
    May 2006

    Re: about draw a cube with diffeient matrix

    What is gl_para?
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum |

Similar Threads

  1. Matrix-Matrix multiply [HELP!]
    By AllanMSouza in forum OpenCL
    Replies: 0
    Last Post: 02-06-2013, 06:36 AM
  2. draw 3D cube
    By gandrakar in forum OpenGL ES
    Replies: 1
    Last Post: 06-14-2010, 02:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean