OpenGL render control. More...
Classes | |
| class | GLFont |
| OpenGL 3D font creator. More... | |
| class | GLVBOModel |
| OpenGL Model created from vertex buffer objects. More... | |
| class | OpenCLDispSrc |
Public Types | |
| enum | MouseMoveMode { RotateModel, TranslateModel, Mouse3D, None, RotateModel, TranslateModel, Mouse3D, None } |
Mouse action when used to move the 3D Model. More... | |
| enum | MouseMoveMode { RotateModel, TranslateModel, Mouse3D, None, RotateModel, TranslateModel, Mouse3D, None } |
Mouse action when used to move the 3D Model. More... | |
Public Member Functions | |
| GLRender (System.Windows.Forms.Form ParentForm, bool CreateCLGLCtx, int DeviceNumber) | |
| Constructor. Adds a OpenGL Control to desired form. | |
| delegate void | Mouse3DEvent (object sender, MouseEventArgs e, Vector Mouse3DPos, float Mouse3DRadius) |
| Mouse 3D event. | |
| void | Fly (Vector Distance) |
| Function to advance view and allow "fly" simulations. | |
| void | Create3DMouseModel (float[] Color) |
| Creates a 3D Model for the mouse. | |
| void | Reset3DMousePos () |
| Resets 3D mouse position to center of view. | |
| void | Translate3DMouseXY (float x, float y, float dz) |
| Translates 3D mouse to a given Left - Top. | |
| void | Increment3DMousePos (float dx, float dy, float dz) |
| Increments current mouse position. | |
| void | ShowAllElements () |
| Undoes all hide operations and shows all elements. | |
| void | ReDraw () |
| Forces the control to redraw its contents. | |
| delegate void | VoidFunc () |
| Void function delegate. | |
| void | SetCenter (Vector NewCenter) |
| Sets center of camera and recalculates appropriate vectors. | |
| void | SetDistance (double Distance) |
| Sets the camera distance from the center of where it's looking. | |
| Vector | GetCenter () |
| Gets camera center (the center of where the camera is looking at). | |
| double | GetDistance () |
| Gets camera distance from the center. | |
| GLRender (System.Windows.Forms.Form ParentForm, bool CreateCLGLCtx, int DeviceNumber) | |
| Constructor. Adds a OpenGL Control to desired form. | |
| void | Fly (Vector Distance) |
| Function to advance view and allow "fly" simulations. | |
| void | Create3DMouseModel (float[] Color) |
| Creates a 3D Model for the mouse. | |
| void | Reset3DMousePos () |
| Resets 3D mouse position to center of view. | |
| void | Translate3DMouseXY (float x, float y, float dz) |
| Translates 3D mouse to a given Left - Top. | |
| void | Increment3DMousePos (float dx, float dy, float dz) |
| Increments current mouse position. | |
| void | ShowAllElements () |
| Undoes all hide operations and shows all elements. | |
| void | ReDraw () |
| Forces the control to redraw its contents. | |
| delegate void | VoidFunc () |
| Void function delegate. | |
| void | SetCenter (Vector NewCenter) |
| Sets center of camera and recalculates appropriate vectors. | |
| void | SetDistance (double Distance) |
| Sets the camera distance from the center of where it's looking. | |
| Vector | GetCenter () |
| Gets camera center (the center of where the camera is looking at). | |
| double | GetDistance () |
| Gets camera distance from the center. | |
Static Public Member Functions | |
| static void | ApplyTexture (Bitmap TextureBitmap, ref int ind) |
| Copies bitmap data to a OpenGL texture. | |
Public Attributes | |
| GLControl | GLCtrl |
| OpenGL control. | |
| MouseMoveMode | MouseMode = MouseMoveMode.RotateModel |
| Mouse rotation mode. | |
| float | zFar = 1000.0f |
| Far distance to clip at. | |
| float | zNear = 1.0f |
| Near distance to clip at. | |
| GLVBOModel | Mouse3D |
| Mouse 3D model. | |
| ToolStripStatusLabel | lblMouseToCenterDist |
| Show mouse to center distance in this label if not null. | |
| List< GLVBOModel > | Models = new List<GLVBOModel>() |
| List of OpenGL VBOs to draw. | |
| bool | StereoscopicDraw = false |
| Draw in stereographic projection? | |
| float | StereoDistance = 0.005f |
| Stereographic distance. | |
| float[] | ClearColor = new float[3] { 0.0f, 0.0f, 0.0f } |
| Background color. | |
| VoidFunc | PreDrawFunc |
| Function to be invoked prior to every drawing. | |
| bool | DrawAxes = true |
| Draw axes at center? | |
Events | |
| Mouse3DEvent | Mouse3DDown |
| Raised when user clicks mouse button in environment using Mouse3D mode. | |
| Mouse3DEvent | Mouse3DUp |
| Raised when user releases mouse button in environment using Mouse3D mode. | |
| Mouse3DEvent | Mouse3DMove |
| Raised when user moves 3D mouse in environment using Mouse3D mode. | |
OpenGL render control.
Mouse action when used to move the 3D Model.
Mouse action when used to move the 3D Model.
| OpenCLTemplate.CLGLInterop.GLRender.GLRender | ( | System.Windows.Forms.Form | ParentForm, | |
| bool | CreateCLGLCtx, | |||
| int | DeviceNumber | |||
| ) |
Constructor. Adds a OpenGL Control to desired form.
| ParentForm | OpenGL control parent form | |
| CreateCLGLCtx | Create OpenGL/OpenCL shared context? | |
| DeviceNumber | Index of device to use from ComputePlatform.Platforms[0].Devices. Use -1 for default |
| OpenCLTemplate.CLGLInterop.GLRender.GLRender | ( | System.Windows.Forms.Form | ParentForm, | |
| bool | CreateCLGLCtx, | |||
| int | DeviceNumber | |||
| ) |
Constructor. Adds a OpenGL Control to desired form.
| ParentForm | OpenGL control parent form | |
| CreateCLGLCtx | Create OpenGL/OpenCL shared context? | |
| DeviceNumber | Index of device to use from ComputePlatform.Platforms[0].Devices. Use -1 for default |
| static void OpenCLTemplate.CLGLInterop.GLRender.ApplyTexture | ( | Bitmap | TextureBitmap, | |
| ref int | ind | |||
| ) | [static] |
Copies bitmap data to a OpenGL texture.
| TextureBitmap | Bitmap to be copied to OpenGL memory | |
| ind | A valid OpenGL texture generated with GLGenTexture. If less than zero a new OpenGL texture is created and stored in ind |
| void OpenCLTemplate.CLGLInterop.GLRender.Create3DMouseModel | ( | float[] | Color | ) |
Creates a 3D Model for the mouse.
| Color | Desired color |
| void OpenCLTemplate.CLGLInterop.GLRender.Create3DMouseModel | ( | float[] | Color | ) |
Creates a 3D Model for the mouse.
| Color | Desired color |
| void OpenCLTemplate.CLGLInterop.GLRender.Fly | ( | Vector | Distance | ) |
Function to advance view and allow "fly" simulations.
| Distance | Distance to fly |
| void OpenCLTemplate.CLGLInterop.GLRender.Fly | ( | Vector | Distance | ) |
Function to advance view and allow "fly" simulations.
| Distance | Distance to fly |
| Vector OpenCLTemplate.CLGLInterop.GLRender.GetCenter | ( | ) |
Gets camera center (the center of where the camera is looking at).
| Vector OpenCLTemplate.CLGLInterop.GLRender.GetCenter | ( | ) |
Gets camera center (the center of where the camera is looking at).
| double OpenCLTemplate.CLGLInterop.GLRender.GetDistance | ( | ) |
Gets camera distance from the center.
| double OpenCLTemplate.CLGLInterop.GLRender.GetDistance | ( | ) |
Gets camera distance from the center.
| void OpenCLTemplate.CLGLInterop.GLRender.Increment3DMousePos | ( | float | dx, | |
| float | dy, | |||
| float | dz | |||
| ) |
Increments current mouse position.
| dx | Left relative value | |
| dy | Up relative value | |
| dz | Z (depth) relative value |
| void OpenCLTemplate.CLGLInterop.GLRender.Increment3DMousePos | ( | float | dx, | |
| float | dy, | |||
| float | dz | |||
| ) |
Increments current mouse position.
| dx | Left relative value | |
| dy | Up relative value | |
| dz | Z (depth) relative value |
| delegate void OpenCLTemplate.CLGLInterop.GLRender.Mouse3DEvent | ( | object | sender, | |
| MouseEventArgs | e, | |||
| Vector | Mouse3DPos, | |||
| float | Mouse3DRadius | |||
| ) |
Mouse 3D event.
| sender | Sender | |
| e | 2D events raised in this instance (picture X, Y and buttons) | |
| Mouse3DPos | Mouse 3D position | |
| Mouse3DRadius | Mouse 3D radius |
| void OpenCLTemplate.CLGLInterop.GLRender.ReDraw | ( | ) |
Forces the control to redraw its contents.
| void OpenCLTemplate.CLGLInterop.GLRender.ReDraw | ( | ) |
Forces the control to redraw its contents.
| void OpenCLTemplate.CLGLInterop.GLRender.Reset3DMousePos | ( | ) |
Resets 3D mouse position to center of view.
| void OpenCLTemplate.CLGLInterop.GLRender.Reset3DMousePos | ( | ) |
Resets 3D mouse position to center of view.
| void OpenCLTemplate.CLGLInterop.GLRender.SetCenter | ( | Vector | NewCenter | ) |
Sets center of camera and recalculates appropriate vectors.
| NewCenter | Desired center |
| void OpenCLTemplate.CLGLInterop.GLRender.SetCenter | ( | Vector | NewCenter | ) |
Sets center of camera and recalculates appropriate vectors.
| NewCenter | Desired center |
| void OpenCLTemplate.CLGLInterop.GLRender.SetDistance | ( | double | Distance | ) |
Sets the camera distance from the center of where it's looking.
| Distance | New distance |
| void OpenCLTemplate.CLGLInterop.GLRender.SetDistance | ( | double | Distance | ) |
Sets the camera distance from the center of where it's looking.
| Distance | New distance |
| void OpenCLTemplate.CLGLInterop.GLRender.ShowAllElements | ( | ) |
Undoes all hide operations and shows all elements.
| void OpenCLTemplate.CLGLInterop.GLRender.ShowAllElements | ( | ) |
Undoes all hide operations and shows all elements.
| void OpenCLTemplate.CLGLInterop.GLRender.Translate3DMouseXY | ( | float | x, | |
| float | y, | |||
| float | dz | |||
| ) |
Translates 3D mouse to a given Left - Top.
| x | Left relative value, 0 to 1 | |
| y | Up relative value, 0 to 1 | |
| dz | Z (depth) relative value |
| void OpenCLTemplate.CLGLInterop.GLRender.Translate3DMouseXY | ( | float | x, | |
| float | y, | |||
| float | dz | |||
| ) |
Translates 3D mouse to a given Left - Top.
| x | Left relative value, 0 to 1 | |
| y | Up relative value, 0 to 1 | |
| dz | Z (depth) relative value |
| delegate void OpenCLTemplate.CLGLInterop.GLRender.VoidFunc | ( | ) |
Void function delegate.
| delegate void OpenCLTemplate.CLGLInterop.GLRender.VoidFunc | ( | ) |
Void function delegate.
| float [] OpenCLTemplate.CLGLInterop.GLRender.ClearColor = new float[3] { 0.0f, 0.0f, 0.0f } |
Background color.
| bool OpenCLTemplate::CLGLInterop.GLRender::DrawAxes = true |
Draw axes at center?
OpenGL control.
| ToolStripStatusLabel OpenCLTemplate::CLGLInterop.GLRender::lblMouseToCenterDist |
Show mouse to center distance in this label if not null.
| List< GLVBOModel > OpenCLTemplate::CLGLInterop.GLRender::Models = new List<GLVBOModel>() |
List of OpenGL VBOs to draw.
Mouse 3D model.
| MouseMoveMode OpenCLTemplate::CLGLInterop.GLRender::MouseMode = MouseMoveMode.RotateModel |
Mouse rotation mode.
Function to be invoked prior to every drawing.
| float OpenCLTemplate::CLGLInterop.GLRender::StereoDistance = 0.005f |
Stereographic distance.
Draw in stereographic projection?
| float OpenCLTemplate::CLGLInterop.GLRender::zFar = 1000.0f |
Far distance to clip at.
| float OpenCLTemplate::CLGLInterop.GLRender::zNear = 1.0f |
Near distance to clip at.
| Mouse3DEvent OpenCLTemplate.CLGLInterop.GLRender.Mouse3DDown |
Raised when user clicks mouse button in environment using Mouse3D mode.
| Mouse3DEvent OpenCLTemplate.CLGLInterop.GLRender.Mouse3DMove |
Raised when user moves 3D mouse in environment using Mouse3D mode.
| Mouse3DEvent OpenCLTemplate.CLGLInterop.GLRender.Mouse3DUp |
Raised when user releases mouse button in environment using Mouse3D mode.
1.6.3