Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / CAn u mix opengl code with this

Author
Message
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 27th Aug 2011 00:41
For example I tied. it complied but nothing showed up.

glBegin(GL_QUADS); // Draw A Quad
glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left
glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glEnd();

Go through yourself at a wall.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Aug 2011 18:57
AGK sets an orthogonal projection matrix that means you have to use the virtual width and height as the current bounds of the screen.

Mobile devices use OpenGL ES which has a few limitations, glBegin() and glEnd() aren't supported and glDrawArrays() must be used instead. Also GL_QUADS is deprecated and I don't think it's supported on mobile devices.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 5th Sep 2011 04:24
Just for the casual forum reader, please don't let this code scare you. AppGameKit Tier 2 will never ask you to know how to code OpenGL!! That is not to say you cannot use OpenGL or another other native SDK, just be prepared to force your app down a single platform distribution route. If you stick with the universal Tier 2 command set of AppGameKit, your app will compile on ALL the platforms we support without modification.

I drink tea, and in my spare time I write software.

Login to post a reply

Server time is: 2024-11-21 16:25:33
Your offset time is: 2024-11-21 16:25:33