Click here to Skip to main content
15,907,392 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: Is it possible to compute the blue channel? Pin
Tim Craig3-Nov-09 14:44
Tim Craig3-Nov-09 14:44 
GeneralRe: Is it possible to compute the blue channel? Pin
Chris Losinger15-Nov-09 6:33
professionalChris Losinger15-Nov-09 6:33 
GeneralRe: Is it possible to compute the blue channel? Pin
Sonhospa19-Nov-09 21:16
Sonhospa19-Nov-09 21:16 
GeneralRe: Is it possible to compute the blue channel? Pin
Chris Losinger20-Nov-09 4:26
professionalChris Losinger20-Nov-09 4:26 
QuestionHow to draw cross hair cursor in opengl while rotating camera ?? Pin
maheshbhoir.home30-Oct-09 20:25
maheshbhoir.home30-Oct-09 20:25 
AnswerRe: How to draw cross hair cursor in opengl while rotating camera ?? Pin
ARon_2-Nov-09 9:31
ARon_2-Nov-09 9:31 
GeneralRe: How to draw cross hair cursor in opengl while rotating camera ?? Pin
maheshbhoir.home2-Nov-09 18:17
maheshbhoir.home2-Nov-09 18:17 
GeneralRe: How to draw cross hair cursor in opengl while rotating camera ?? Pin
ARon_3-Nov-09 4:36
ARon_3-Nov-09 4:36 
I not sure what you are trying to do but this is how I draw an object(s) in space. Forgive me it I c#.

static public void RenderScence()
        {
            Object LockThis = new Object();
            lock (LockThis)
            {
                Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);

                #region Draw Scene From Camera View
                #region Set the Current Camera Matrix
                //  Get the Current Cameras View Transform and Load it in to OpenGl Projection Matrix
                Matrix_44 HTotal = CurrentCamera.HTotal;
                Gl.glMatrixMode(Gl.GL_PROJECTION);
                Gl.glLoadIdentity();
                //  Then I clear the ModelView Matrix as it is overriden by each Drawable Object
                Gl.glLoadMatrixf(HTotal.GetListValues());
                Gl.glMatrixMode(Gl.GL_MODELVIEW);
                Gl.glLoadIdentity();

                #endregion
                //  Draw each visible object
                foreach (ISpatialNode obj in WorldObjectList)
                    if (obj.IsVisible) obj.RenderOpenGL();
                #endregion

                Gl.glFinish();
            }
        }


Base on your description I would create a crosshair class and maintain it orientation and position in the world. When it is time to render the crosshair I would just loaded its Position and Rotation in to the ModelView matrix and then draw it as if it were in free space.

References.
My article on transforms easily adapted to c++.
Space and Matrix Transformations - Building a 3D Engine[^]

Others probably better
Interactive Techniques in Three-dimensional Scenes (Part 1): Moving 3D Objects with the Mouse using OpenGL 2.1[^]
A New Perspective on Viewing[^]
Arcball Module in C# - Tao.OpenGL[^]

ARon

GeneralRe: How to draw cross hair cursor in opengl while rotating camera ?? Pin
maheshbhoir.home3-Nov-09 17:50
maheshbhoir.home3-Nov-09 17:50 
Questioncollapsible regions ! Pin
amir-haghighi30-Oct-09 6:11
amir-haghighi30-Oct-09 6:11 
AnswerRe: collapsible regions ! Pin
enhzflep3-Nov-09 6:25
enhzflep3-Nov-09 6:25 
Questionplease Pin
Archy_Yu25-Oct-09 4:44
Archy_Yu25-Oct-09 4:44 
AnswerRe: please Pin
RichardM128-Oct-09 8:44
RichardM128-Oct-09 8:44 
AnswerRe: please Pin
Tim Craig29-Oct-09 15:35
Tim Craig29-Oct-09 15:35 
GeneralRe: please Pin
Archy_Yu29-Oct-09 16:50
Archy_Yu29-Oct-09 16:50 
GeneralRe: please Pin
Luc Pattyn29-Oct-09 17:38
sitebuilderLuc Pattyn29-Oct-09 17:38 
QuestionDirectx Pin
messages25-Oct-09 3:30
messages25-Oct-09 3:30 
AnswerRe: Directx Pin
Baltoro29-Oct-09 11:13
Baltoro29-Oct-09 11:13 
GeneralRe: Directx Pin
messages31-Oct-09 4:02
messages31-Oct-09 4:02 
GeneralRe: Directx Pin
Baltoro1-Nov-09 11:29
Baltoro1-Nov-09 11:29 
QuestionMy texture just didnot work! Anyone give a hand? Pin
Archy_Yu24-Oct-09 1:41
Archy_Yu24-Oct-09 1:41 
GeneralRe: My texture just didnot work! Anyone give a hand? Pin
IdUnknown26-Oct-09 3:22
IdUnknown26-Oct-09 3:22 
GeneralRe: My texture just didnot work! Anyone give a hand? Pin
Archy_Yu26-Oct-09 4:49
Archy_Yu26-Oct-09 4:49 
AnswerRe: My texture just didnot work! Anyone give a hand? Pin
Tim Craig26-Oct-09 7:41
Tim Craig26-Oct-09 7:41 
GeneralRe: My texture just didnot work! Anyone give a hand? Pin
Archy_Yu26-Oct-09 20:11
Archy_Yu26-Oct-09 20:11 

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.