Jump to content
Posted 01 January 2013 - 10:44 AM
Posted 01 January 2013 - 11:17 AM
Well... what exactly are you seeing at the moment? Also, use the code tags to format your post for code.
Posted 01 January 2013 - 11:23 AM
Check this line :
glColor4f(1.0f, 0.0f, 0.0f, 0.0f);
How can you see anything when your alpha component is 0? Set it to 1 for opaque.
Posted 01 January 2013 - 11:53 AM
Posted 01 January 2013 - 12:03 PM
Posted 01 January 2013 - 12:13 PM
Posted 01 January 2013 - 12:21 PM
Posted 01 January 2013 - 12:36 PM
The triangle appears where I'd expect it on my computer based on your projection matrix, vertex data and the screen resolution I am running. Try setting your projection matrix to identity (i.e. comment out the gOrtho line in InitOpenGL) and change your polygon draw calls to the following:
glVertex3f(-1.0f, -1.0f, 0); glVertex3f(1.0f, -1.0f, 0); glVertex3f(0.0f, 1.0f, 0);
You should see a big red triangle covering the entire screen (regardless of resolution) like this:
Posted 01 January 2013 - 12:53 PM
Posted 01 January 2013 - 01:00 PM
Edited by fstim82, 01 January 2013 - 01:09 PM.
Posted 01 January 2013 - 02:04 PM
Last I checked when researching some Wordpress graphics was that the retina technology takes an image with double the resolution (200% of the original) and reduces it, so you have more pixels per inch (I guess that would mean 4 pixels in the space 1 pixel normally takes up).
Posted 01 January 2013 - 02:13 PM
Oh, I forgot to mention. Re: code tags. The correct usage is using square brackets rather than angle brackets, i.e.:
[code]type your code here[/code]
I wouldn't worry so much about it for your OP but it's useful to keep in mind for future posts as people with short attention spans (such as myself!) tend to zone out and hit the back button when confronted with a wall of unformatted code