Click here to Skip to main content
15,922,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Database connectivity ? Pin
vikas amin4-Nov-05 19:51
vikas amin4-Nov-05 19:51 
QuestionRe: Database connectivity ? Pin
shivditya4-Nov-05 20:12
shivditya4-Nov-05 20:12 
QuestionDoes OpenGL do alpha or not? Pin
Swinefeaster4-Nov-05 11:30
Swinefeaster4-Nov-05 11:30 
AnswerRe: Does OpenGL do alpha or not? Pin
Graham Shanks4-Nov-05 12:26
Graham Shanks4-Nov-05 12:26 
AnswerRe: Does OpenGL do alpha or not? Pin
El Corazon4-Nov-05 19:31
El Corazon4-Nov-05 19:31 
GeneralRe: Does OpenGL do alpha or not? Pin
vikas amin5-Nov-05 1:22
vikas amin5-Nov-05 1:22 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster7-Nov-05 8:55
Swinefeaster7-Nov-05 8:55 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon7-Nov-05 9:16
El Corazon7-Nov-05 9:16 
distance is distance is distance.... You can project the xyz data into viewer references, in which case you will get your depth as a valid number. Or you can just use the old distance formula d=sqrt(deltax*deltax+deltay*deltay+deltaz*deltaz).

however since all you need is a compare and sort, drop the sqrt. The square of the distance won't make one distance shorter than another.

The author is primarily referring to the fact that the programmer often has knowlege of what he is doing that the computer does not. So you can order your logic to provide the computer with an easier time. You generally do not have to depth sort opaque objects, draw them all and let the hardware z-buffer sort them out. So then you are left with your alpha transparent objects. Some of them you may already know their order.

When you have limited knowledge of what you are going to draw and when (or simply providing the power of flexibility), that is when you start getting into game-engines and scene-graphs. If you have n number of objects of unknown type, and unknown complexity as far as alpha-objects, you toss all n-objects onto a scene-graph and issue a scene-graph draw command. The scene-graph-API handles sorting, culling and other tasks that will have to be performed every time you draw (as objects move in relative position to each other and on their own axis -- a plane doing a barrel roll with a transparent glass canopy for example will generate a new z-sort every time).

www.openscenegraph.org[^] has one of many scene graphs (there are a dozen I could rattle off off the top of my head -- google on opengl scenegraph)
www.delta3d.org[^] has one of many gaming engines (based on openscenegraph API for a core), google will again turn up many more (some for a cost).

_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)


-- modified at 15:19 Monday 7th November, 2005
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster7-Nov-05 12:41
Swinefeaster7-Nov-05 12:41 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon7-Nov-05 13:57
El Corazon7-Nov-05 13:57 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster14-Nov-05 15:40
Swinefeaster14-Nov-05 15:40 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon14-Nov-05 17:08
El Corazon14-Nov-05 17:08 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster15-Nov-05 8:49
Swinefeaster15-Nov-05 8:49 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon15-Nov-05 16:17
El Corazon15-Nov-05 16:17 
QuestionLPSAFEARRAY issues Pin
Axonn Echysttas4-Nov-05 9:46
Axonn Echysttas4-Nov-05 9:46 
AnswerRe: LPSAFEARRAY issues Pin
Mircea Puiu4-Nov-05 23:31
Mircea Puiu4-Nov-05 23:31 
GeneralRe: LPSAFEARRAY issues Pin
Axonn Echysttas5-Nov-05 10:51
Axonn Echysttas5-Nov-05 10:51 
GeneralRe: LPSAFEARRAY issues Pin
Axonn Echysttas5-Nov-05 21:23
Axonn Echysttas5-Nov-05 21:23 
QuestionLinker Error Pin
Maskarat4-Nov-05 7:54
Maskarat4-Nov-05 7:54 
AnswerRe: Linker Error Pin
Blake Miller4-Nov-05 10:49
Blake Miller4-Nov-05 10:49 
GeneralRe: Linker Error Pin
Maskarat6-Nov-05 4:01
Maskarat6-Nov-05 4:01 
QuestionHelp me :What is wrong here???? Pin
Member 18584504-Nov-05 7:26
Member 18584504-Nov-05 7:26 
QuestionRe: Help me :What is wrong here???? Pin
David Crow4-Nov-05 7:51
David Crow4-Nov-05 7:51 
QuestionA different registry question - edit offline? Pin
charlieg4-Nov-05 7:24
charlieg4-Nov-05 7:24 
QuestionRe: A different registry question - edit offline? Pin
David Crow4-Nov-05 7:50
David Crow4-Nov-05 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.