Drawing3d documented Class Library

OpenGlDevice Methods

The methods of the OpenGlDevice class are listed below. For a complete list of OpenGlDevice class members, see the OpenGlDevice Members topic.

Public Static (Shared) Methods

ClearFonts This list contains the fonts like . The contained entries are OpenGlDevice.FontEntry.
glActiveTextureARB Wählt die aktive Textureinheit.
glAttachObjectARB Bindet einen Shader an ein Programmobjekt.
glBindBuffer bind a named buffer object
glBindFramebufferEXT Binda a framebuffer to a framebuffer target
glBindRenderbufferEXT Bind a renderbuffer to a renderbuffer target
glBufferDataOverloaded. creates and initializes a buffer object's data store
glCheckFramebufferStatusEXT Checka the completeness status of a framebuffer
glColorPointer define an array of colors
glCompileShaderARB Kompiliert ein Shaderobjekt.
glCreateProgramObjectARB glCreateProgram erstellt ein leeres Programmobjekt und gibt ein Handle darauf zurück. Ein Programmobjekt ist ein Kontainerobjekt, an das Shaderobjekte gebunden werden können.
glCreateShaderObjectARB Erstellt ein Shaderobjekt.
glDeletebuffer delete named buffer objects
glDeleteFramebuffersEXT delete framebuffer objects
glDeleteObjectARB glDeleteObject gibt den Speicher und das Handle auf das durch Obj übergebene OpenGL Objekt frei. (Das Handle ist danach ungültig) Die Funktion macht damit den Effekt eines Aufrufs von glCreateShader oder glCreateProgram rückgängig.
glDeleteProgramARB Gibt ein Programmobjekt frei.
glDeleteRenderbuffersEXT Deletes renderbuffer objects
glDrawElementsOverloaded. render primitives from array data
glFramebufferRenderbufferEXT attach a renderbuffer as a logical buffer to the currently bound framebuffer object
glFramebufferTexture2DEXT attach a level of a texture object as a logical buffer to the currently bound framebuffer object
glgenbuffers Generates buffer object names
glGenerateMipmapEXT generate mipmaps for a specified texture target
glGenFramebuffersExt Generate framebuffer object names
glGenRenderbuffersEXT generate renderbuffer object names
glGetInfoLogARB Liefert einen Fehlerstring der zu einem Compile oder Linkerror gehört.
glGetObjectParameterivARB Validiert ein Programmobjekt.
glGetUniformLocationARB Returns the location of a uniform variable
glLinkProgramARB glLinkProgramARB - linkt die momentan an ein Programmobjekt gebundenen Shader, um daraus einen Satz ausführbarer Shader zu erstellen.
glNormalPointer define an array of normals
glRenderbufferStorageEXT Establisesh data storage, format and dimensions of a renderbuffer object's image
glShaderSourceARB Ersetzt den Quellcode eines Shaderobjektes.
glStencilExt sets front or back side.
glTexCoordPointer define an array of texture coordinates
glUniform1fARB Übergibt einen float Wert an den Shader.
glUniform1iARB Übergibt einen integer Wert an den Shader.
glUniform4fARB Übergibt einen 4D-Vektor an den Shader.
glUniformMatrix4fvARB Übergibt einen Matrix an den Shader.
glUseProgramObjectARB Startet das Programm.
glVertexPointer define an array of vertex data

Public Instance Methods

addLight (inherited from MNDevice) With this method you can add a Light.
BeginPaint Overrides the BeginPaint by adding the call to MakeCurrent to be sure to have the correct device.
BringToFront If you have some polygon, which have a z-fighting problem you can use this method to determe, which polygon is visible.
Changed (inherited from MNDevice) Call this method, if the outlook of the device has been changed. Refresh invokes every time a Painting, but the method Changed() waits for example if all mousevents are called. So it is better for the performance to call Changed.
CheckError This method shows a message box, if an OpenGl error ocurres. GL_INVALID_ENUM:An unacceptable value has been specified for an enumerated argument. The offending function has been ignored. GL_INVALID_VALUE : A numeric argument is out of range. The offending function has been ignored. GL_INVALID_OPERATION : The specified operation is not allowed in the current state. The offending function has been ignored. GL_STACK_OVERFLOW : This function would cause a stack overflow. The offending function has been ignored. GL_STACK_UNDERFLOW : This function would cause a stack underflow. The offending function has been ignored. GL_OUT_OF_MEMORY : There is not enough memory left to execute the function. The state of OpenGL has been left undefined.
ClearScreen Overrides the ClearScreen-method by calling OpenGl-methods.
ClipPlane Overrides the Clipplane, which install a Plane. All drawings behind this plane are clipped. There are 8 possible planes.
Close (inherited from MNDevice) Closes the device.
DeleteTexture Overrides the DeleteTexture and calls the releated OpenGl call.
DisableClipPlane Overrides this method and implements the OpenGl method Gl.glDisable(Gl.GL_CLIP_PLANE0 + id);
DisplayListFree Disposes a OpenGlDevice.DisplayList, which was created by getDisplayList.
DisplayListPlay Draws a display list into the device.
DoPaint Overrides the DoPaint method and looks that the device is the current by a call to MakeCurrent
drawCurveOverloaded. Overrides the base drawCurve-method and calls in the render mode the LineStrip method.
drawCurve (inherited from MNDevice)Overloaded. Draws a 3D-Curve.
DrawEntity Overrides the basic DrawEntity.method and call a MakeCurrent to be sure, that its the correct current device.
drawImageOverloaded. Overrides drawImage and calls the Gl.glDrawPixels- method.
drawImage (inherited from MNDevice)Overloaded. Draws an image at ProjectionBase-coordinates
drawLine (inherited from MNDevice) Draw a Line From A to B.
drawMesh Draws a Mesh.
drawPoint (inherited from MNDevice)Overloaded. Draws a point. The kind of drawing is described in pt. MNDevice.PointData
drawPolyCurve Overrides the basic MNDevice method and calls in rendermode a drawPolyLine with the interpolytionpoints of the CurveArray ca.
drawPolyLine Overrides the drawPolyLine and calls drawPolyPolyLine for only one entry in the Loca.
drawPolyPolyCurve (inherited from MNDevice) This primitive draw method draws a Loca. In case of PolygonMode = line, simple curves are drawn. If PolygonMode = Fill, then a filled area, bounded by curves, is drawn. The Loca must have the property that the entries are coherent curve arrays and additionally, there are no cross points. If this is done, the curve arrays, which lay in an other filled curve array is "drawn as hole". If it lays in a hole, the curvearray is filled drawn.
drawPolyPolyLineOverloaded. Overrides the drawPolyPolyLine-method and calls MNDevice.drawPolyLine(Loxyz,null)
drawSphere (inherited from MNDevice) Draws a sphere at (0,0,0) with "Radius"
drawSurface (inherited from MNDevice)Overloaded. Call the drawSurface-method with resolutions taken from the surface. See UResolution and VResolution.
drawText Overrides the method drawText and draws the text at a specified position with a given extrusion.
drawTextureOverloaded. Draws a rectangle at a position with a size and uses the given Texture value.
drawTexture (inherited from MNDevice)Overloaded. Draws a texture at a position.
drawTriangle Overrides the drawTriangle-method and implements them in terms of OpenGL.
EndPaint (inherited from MNDevice) The last call in the Paint-method is EndPaint. It fires the SwapBuffers-method
Equals (inherited from Object) 
FastRefresh (inherited from MNDevice) Copies the Background to the to Drawbuffer and invokes the OnPaintFloat-method. At least a SwapBuffers-call moves the drawbuffer to the screen. "Background" means in that context: All paintings, which are made in a drawmethod. The "Foreground" is painted in a drawFlo
FromScr (inherited from MNDevice)Overloaded. Calculates a Line from a Screen coordinate to the Camera.
getDisplayList Creates a new display list. As parameter you can set a draw method, which contains the the outfit of the display list.
GetGlyphOutLine (inherited from MNDevice) Returns a Loca for the Curves of a Char.
GetHashCode (inherited from Object) 
GetMaxBox (inherited from MNDevice)Overloaded. Gets a envelopping box for all elements rendered by the device.
GetOglModelMatrix Gets the OpenGl-modelmatrix by calling Gl.glGetDoublev(Gl.GL_MODELVIEW_MATRIX, out result). In general this is just the same as the ModelMatrix.
GetSmoothBase (inherited from MNDevice) Retrieves a Base, which lies on the catched object. The direction of the x-axes is given by the direction of a catched Direction, the z-axis is the normal of a catched Normal. The BaseOrigin is put to the nearestpoint to the point closest to the the catch object. If you draw this base, it smooths around the object, which lays under the cursor.
GetTextExtent Gets the extent of a string with the current font.
GetType (inherited from Object) 
LookAt (inherited from MNDevice) Sets the camera of the device.
MakeCurrent Overrides the basic MakeCurrent-method and calls wglMakeCurrent..
MouseUp (inherited from MNDevice) The device gets the MouseUp-event from the WinControl.
MulMatrix Overrides the basic MulMatrix and calls the related OpenGl-method glMultMatrixd This transformation is multiplied to the modelmatrix.
MulTextureMatrix Overrides the MulTextureMatrix and implements the related OpenGL method.
Paint Overrides the Paint-method to handle the painting in a OpenGL kind.
PopMatrixOverloaded. Overrides the PopMatrix by calling the glPopMatrix method-
PopMatrix (inherited from MNDevice)Overloaded. To save the ModelMatrix for a short time you can push it with PushMatrix and restore with PopMatrix.
popTag (inherited from MNDevice) Pops a tag, which was pushed with pushTag
PushMatrixOverloaded. Pushes a matrix, depending on MNDevice.MatrixKind, to the matrix stack.
PushMatrix (inherited from MNDevice)Overloaded. To save the ModelMatrix for a short time you can push them with PushMatrix and restore with PopMatrix
pushTag (inherited from MNDevice) Pushes a Tag to a Tag-stack. If the mouse hits a draw element the last tag is set into the HitItem. You can get it from the HitItemlistpopTag
Refresh (inherited from MNDevice) Refreshes the device.
removeLight (inherited from MNDevice) Removes a Light from the list Lights. Its the same as Lights.Remove(Light);
RenderToImage Render to a given bitmap. The method draw contaings the rendering. The size of the bitmap depends only on the capabilities of the graphiccard, because the rendering happens in a framebuffer.
RenderToTextureOverloaded. Calls RenderToTexture with the current Camera.
ResetShadow Bewirkt, dass die internen Displaylisten für die Darstellung von Schatten neu erzeugt werden. Diese Methode muss auch immer dann aufgerufen werden, wenn Shadow = true, aber ein neues Material oder eine neue Textur gesetzt werden.
Resize Overrides Resize and adds MakeCurrent and CheckError.
Rotate (inherited from MNDevice) Rotates the following drawings by a call to MulMatrix. Call before this PushMatrix and after the painting a PopMatrix
Select (inherited from MNDevice) Clears the HitItemlist and searches the draw elements, which are close to the point p. This means, that the distance to p is less then CatchDistance The method calls the Paintmethod of the device with RenderMode = RenderMode.Select.
SetAntiAliasing Sets or gets AntiAliasing for the scene.
setCulling Sets and gets the culling value. In case this is true, the back face of an object is omitted. The performances become better.
SetCurrentCursor (inherited from MNDevice) If the defaultcursor is null then the currentcursor will be taken.
SetDefaultCursor (inherited from MNDevice) Sets a defaultcursor.
SimulateMouseDown (inherited from MNDevice) By a call to this method you can simulate a mousedownclick. See also SimulateMouseMove
SimulateMouseMove (inherited from MNDevice) By a call to this method you can simulate a mousemove. See also SimulateMouseDown
SimulateMouseUp (inherited from MNDevice) By a call to this method you can simulate a mousedownclick. See also SimulateMouseMove
SolidConvexOverloaded. Overrides the SolidConvex-method and draws it in terms from OpenGl.
SolidConvex (inherited from MNDevice)Overloaded. Overloaded method from SolidConvex The value for the parameter TextureEnable is set to true.
SwapBuffers Override SwapBuffers by using SwapBuffersFast
ToScr (inherited from MNDevice)Overloaded. Calculates the screen coordinates of a 3d-Point p.
ToString (inherited from Object) 
Translate Translate the scene by a vector which is given by x,y and z.
UpDated (inherited from MNDevice) If you make any modifications in the component, you should first call
..Change some things
In this case the method Refresh will be called only one time. Internal a counter will be incremented for UpDating and decremented by UpDated. If he is 0 then Refresh is called. See UpDating
UpDating (inherited from MNDevice) If you make any modifications in the component you should first call
..Change some things
In this case the method Refresh will be called only one time. Internal a counter will be incremented for UpDating and decremented by UpDated. If it is 0 then Refresh is called. See UpDated
Use2Pot Calculates the texture sizes width and height as nearest potency of 2. In older versions of OpglenGl is this necessary.
Version Gets the OpenGlVersion as string.

Protected Instance Methods

CheckViewPort Overrides this method and moves the new Viewport to the OpenGl-engine
CopyFromSaveBuffer Copies a scene from the accumulation buffer to the drawbuffer. First the method CopyToSaveBuffer has to been called. A praeposition is that the PaintFloatEnable-property is true.
CopyToSaveBuffer Copies a scene from the drawbuffer to the accumulation buffer. With CopyFromSaveBuffer you can copy this drawings back to the drawbuffer. A praeposition is that the PaintFloatEnable-property is true.
CreateMaterial (inherited from MNDevice) This method is called from the constructur. For example the OpenGlDevice overrides them, to implement OglMaterial
Disposed (inherited from MNDevice) Overrides this method ans sets the WinControl-property to null.
Finalize (inherited from MNDevice)
getCulling Overides the base getCulling method and apply a OpenGL call. GetCulling is the get-method of the property Culling
GetGraphics (inherited from MNDevice) Getmethod of the property Graphics
getModelMatrix (inherited from MNDevice) protected getMethod for the ModelMatrix-property.
getProjectionMatrix (inherited from MNDevice) GetMethod of the ProjectionMatrix.
GetTextureMatrix Get method of TextureMatrix
getWorldHeight (inherited from MNDevice) Getmethod of the WorldHeight-property
getWorldWidth (inherited from MNDevice) GetMethod of the property WorldWidth
GraphicsPaint (inherited from MNDevice) After painting in the "normal" device, a call to GraphicsPaint is done.
IsReady Overrides the IsReady-method and checks, whether the OglContext is current or not.
KeyDown (inherited from MNDevice) This method is called from the EventServer when a key is clicked down.
KeyPress (inherited from MNDevice) This method is called from the EventServer, when a key is pressed.
KeyUp (inherited from MNDevice) This method is called from the EventServer when a key goes up.
LineStrip Overrides the LineStrip-method and implements them in terms of OpenGL.
MemberwiseClone (inherited from Object) 
MouseDown (inherited from MNDevice) The device gets the MouseDown-event from the WinControl.
MouseMove (inherited from MNDevice) The device gets the MouseMove - event from the WinControl.
newLight Overrides the newLight-method and returns a OpenGlDevice.OglLight.
RealizeTranslucent Overrides the method and returns an OglMaterial
SetClockWise Sets and gets the orientation of the front face. By default it is clockwise.
setFontName Overrides the setFontName-method. If no font named like that is loaded, the display lists will be generated for all characters OpenGlDevice.FontEntry. This ensures that a drawText-method, can play the text as displaylists..
SetGraphics (inherited from MNDevice) 
SetLighting Overrides the SetLighting-method by calling OpenGL-methods
setModelMatrix Overrides the setModelMatrix-method and implements this with Opengl-calls.
setPencolor Overrides the setPencolor and activate the OpenGL methods.
setPenStyle Overrides the setPenStyle-method and uses Gl.glLineStipple and Gl.glEnable(Gl.GL_LINE_STIPPLE);
SetPenWidth Overrides the SetPenWidth by calling GL.glLineWidth.
SetPolygonmode Overrides the related SetPolygonmode and sets the related OpenGl glPolygonMode call.
setProjectionMatrix Overrides the setProjectionMatrix-method and implements this with Opengl-calls.
SetRoot (inherited from MNDevice) The virtual settermethod of Root property.
setShadow (inherited from MNDevice) The protected Settermethod for the Shadow-property.
setTexture Overrides the setTexture-method to implement OpenGlCalls.
SetTextureMatrix Overrides the SetTextureMatrix-method and implements this with Opengl-calls.
SetViewPort (inherited from MNDevice) Setmethod of the property ViewPort"/>
SetWinControl Overrides the SetWinControl-Method and adds CheckError.
setZoomFactor (inherited from MNDevice) Setmethod of the property Zoomfactor
SizeChanged If the size of WinControl has changed this method will be called. the method is overriden and forces a refresh of the device.
TimeEvent (inherited from MNDevice) A protected method, which call OnTick,if is assigned.
UpDateMaterial Overrides the UpDateMaterial-method and moves the material properties to the OpenGL-engine.
ValidHandleCreated Overrides ValidHandleCreated and initializes some properties for the usage of OpenGl.
ValidHandleDestroyed This method is called, when ever an OpenGl-handle would be destroyed. In this method some destrucors for OpenGl are called.

See Also

OpenGlDevice Class | Drawing3d.Devices Namespace