In it's simplest form (this is a bit of a hack), call the drawCodedScene, do your reading back, then call the drawScene after clearing the COLOR_BITS.
What you want to do is not call the...
Type: Posts; User: scratt
In it's simplest form (this is a bit of a hack), call the drawCodedScene, do your reading back, then call the drawScene after clearing the COLOR_BITS.
What you want to do is not call the...
My approach to doing this would be to simply draw it to the existing backbuffer, do my picking, and then overwrite that with the scene I actually want to view and then swap buffers...
There's a...
I am not sure how complex your geometry is, but to be frank you are much better doing ray - intersection picking on the CPU side, and allowing your GPU to get on with the job of drawing a scene....
On the newer devices i.e. iPhone 3GS and iPod 3rd Gen (32 & 64MB) the GPU is GLES2.0 and supports shaders.
Older devices do not support shaders.
I've found that the shader capability on the...
Of course you can. It may not be "best" coding practice, but it is often done.
I presume the OP just put what he thought was relevant from both files, or was experimenting.
I'm not sure where...
Probably in the .cpp (or .mm) file and not the .h, which is what I presume is listed above.
Well glOrtho will work the same way.
I just type the 2D as a bad habit, sorry!
I presume you're on some kind of PowerVR chip. The iPhone perhaps?
Basically what you are doing is what I...
Why not use glOrtho2D and make a matrix which maps the pixels of the screen one to one with your matrix. i.e. Use the screen dimensions for glOrtho2D.
Then construct the geometry with the vertices...
Your question is very very unclear.
If you are trying to get a 3D object (or even a 2D object) to behave like it's a 3D one in an Ortho projection then it's not going to work.
If you want the...
There is a full example here :
https://devforums.apple.com/message/23282#23282
Sure, if you rendered to a texture attached to an FBO, all you need to do is map that texture to a QUAD constructed from a 4 element triangle strip, and draw the QUAD to the screen.
Why not grab one of the widely available EAGLView classes from Apple, or an engine like Oolong.
Pretty much all you need to know is in those files.
The whys and wherefores of what happens when you click your mouse can't really be determined from the code you've posted. I suspect it's something to do with the GLUT screen refresh as it sounds like...
For 2D the dimensions in glOrtho should match that of your viewport and then you have a one to one relationship between screen pixels and your 2D coordinates.
Is that what you need?
Track it from a static position or follow it like a chase camera?
The principal is the same except if you have a fixed position to "watch" from that will simply go into the first coordinate in...
I use points and geometry shaders as a replacement for Point Sprites in these cases, as Dark Photon suggests.
Surely you have your "objects's" position in your code somewhere? If your object is a square drawn with GL_POINTS then your object's position could be the center of that square, or the position of...
Gosh! You mean GPU manufacturers are the first to have the new drivers done! Wow! Oh.. wait.. You are literally comparing Apples with Oranges. Pardon the pun.
So Janitorial (and anyone else) I am...
Not quite sure about the resizing, but glut needs to be told to redraw stuff on certain actions, or at a designated refresh rate. It doesn't just keep drawing your view. So it is probably related to...
Wrong again. I am saying it's not a huge issue and there are reasons that I understand and appreciate as to why it has not been implemented fully yet.
Absolutely. Moaning and whinging in...
The problem with Point Sprites is they are kind of a half way house between real geometry and a 2D blit. To affect point size in shaders you need to ape the OpenGL GL_POINT_DISTANCE_ATTENUATION...
I just checked the link and it works fine. :) Not sure what you mean about "not using glFrustum", but it sounds like you need to do a little background reading generally.
Here is a direct link :...
I didn't argue it was a good thing.
What's more, without Apple in the OpenGL camp supporting more than one distinct platform, and various flavours of silicon & API, the "ecosystem" as you refer...
Alfonse, I am not going to debate you any more. You contradict yourself in your last three posts. And even contradict yourself within the last post all by itself.
One thing I will point out is...
Alfonse I really think you need to go read some Apple docs as you are way off base with some of your assertions. Geometry shaders have been exposed on hardware that is capable for a long long time....