Problem with drawing on the screen in a 3d game

View previous topic View next topic Go down

Problem with drawing on the screen in a 3d game

Post  oioioi on Thu Apr 16, 2009 7:51 am

Sorry for the bad title, I try to draw in 2d on the screen like tutorial 6 but it isn't working
Code:
sio2WindowEnterLandscape3D();
...
sio2WindowLeaveLandscape3D();
      
sio2WindowEnter2D(sio2->_SIO2window, 0.0f, 1.0f);
sio2WindowEnterLandscape2D(sio2->_SIO2window);
{
   glTranslatef( sio2->_SIO2window->scl->x * 0.5f, sio2->_SIO2window->scl->y * 0.5f, 0.0f );
   sio2MaterialRender(crosshair);
   glEnableClientState(GL_TEXTURE_COORD_ARRAY);
   glEnableClientState(GL_VERTEX_ARRAY);
   glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
   glVertexPointer(2, GL_FLOAT, 0, vertexArray);
   glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
         
   sio2WindowDebugTouch(sio2->_SIO2window);
}
sio2WindowLeaveLandscape2D(sio2->_SIO2window);
sio2WindowLeave2D();

I can't see the quad(opengl lines) or the debug touch thing. I can't see any thing else in the tutorial 6 code

Thanks

oioioi

Posts : 136
Join date : 2008-12-02
Location : Norway

View user profile

Back to top Go down

Re: Problem with drawing on the screen in a 3d game

Post  zzajin on Fri Apr 17, 2009 2:29 pm

In version 1.3.3 I see a

sio2MaterialReset();


before the sio2WindowDebugTouch() call.

zzajin

Posts : 81
Join date : 2008-10-14

View user profile

Back to top Go down

Re: Problem with drawing on the screen in a 3d game

Post  oioioi on Sat Apr 18, 2009 7:03 am

Thanks! That worked great

oioioi

Posts : 136
Join date : 2008-12-02
Location : Norway

View user profile

Back to top Go down

Re: Problem with drawing on the screen in a 3d game

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum