virtual void draw3DLine(const core::vector3df& start,\r
const core::vector3df& end, SColor color = SColor(255,255,255,255)) =0;\r
\r
- //! Draws a 3d triangle.\r
- /** This method calls drawVertexPrimitiveList for some triangles.\r
- This method works with all drivers because it simply calls\r
- drawVertexPrimitiveList, but it is hence not very fast.\r
- Note that the triangle is drawn using the current\r
- transformation matrix and material. So if you need to draw it\r
- independently of the current transformation, use\r
- \code\r
- driver->setMaterial(someMaterial);\r
- driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);\r
- \endcode\r
- for some properly set up material before drawing the triangle.\r
- \param triangle The triangle to draw.\r
- \param color Color of the line. */\r
- virtual void draw3DTriangle(const core::triangle3df& triangle,\r
- SColor color = SColor(255,255,255,255)) =0;\r
-\r
//! Draws a 3d axis aligned box.\r
/** This method simply calls draw3DLine for the edges of the\r
box. Note that the box is drawn using the current transformation\r
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,\r
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0;\r
\r
- //! Draws a set of 2d images, using a color and the alpha channel of the texture.\r
- /** The images are drawn beginning at pos and concatenated in\r
- one line. All drawings are clipped against clipRect (if != 0).\r
- The subtextures are defined by the array of sourceRects and are\r
- chosen by the indices given.\r
- \param texture Texture to be drawn.\r
- \param pos Upper left 2d destination position where the image\r
- will be drawn.\r
- \param sourceRects Source rectangles of the texture (based on it's OriginalSize)\r
- \param indices List of indices which choose the actual\r
- rectangle used each time.\r
- \param kerningWidth Offset to Position on X\r
- \param clipRect Pointer to rectangle on the screen where the\r
- image is clipped to.\r
- If this pointer is 0 then the image is not clipped.\r
- \param color Color with which the image is drawn.\r
- Note that the alpha component is used. If alpha is other than\r
- 255, the image will be transparent.\r
- \param useAlphaChannelOfTexture: If true, the alpha channel of\r
- the texture is used to draw the image. */\r
- virtual void draw2DImageBatch(const video::ITexture* texture,\r
- const core::position2d<s32>& pos,\r
- const core::array<core::rect<s32> >& sourceRects,\r
- const core::array<s32>& indices,\r
- s32 kerningWidth=0,\r
- const core::rect<s32>* clipRect=0,\r
- SColor color=SColor(255,255,255,255),\r
- bool useAlphaChannelOfTexture=false) =0;\r
-\r
//! Draws a set of 2d images, using a color and the alpha channel of the texture.\r
/** All drawings are clipped against clipRect (if != 0).\r
The subtextures are defined by the array of sourceRects and are\r
SColor colorLeftDown, SColor colorRightDown,\r
const core::rect<s32>* clip =0) =0;\r
\r
- //! Draws the outline of a 2D rectangle.\r
- /** \param pos Position of the rectangle.\r
- \param color Color of the rectangle to draw. The alpha component\r
- specifies how transparent the rectangle outline will be. */\r
- virtual void draw2DRectangleOutline(const core::recti& pos,\r
- SColor color=SColor(255,255,255,255)) =0;\r
-\r
//! Draws a 2d line.\r
/** In theory both start and end will be included in coloring.\r
BUG: Currently d3d ignores the last pixel\r
const core::position2d<s32>& end,\r
SColor color=SColor(255,255,255,255)) =0;\r
\r
- //! Draws a pixel.\r
- /** \param x The x-position of the pixel.\r
- \param y The y-position of the pixel.\r
- \param color Color of the pixel to draw. */\r
- virtual void drawPixel(u32 x, u32 y, const SColor& color) =0;\r
-\r
- //! Draws a non filled concyclic regular 2d polygon.\r
- /** This method can be used to draw circles, but also\r
- triangles, tetragons, pentagons, hexagons, heptagons, octagons,\r
- enneagons, decagons, hendecagons, dodecagon, triskaidecagons,\r
- etc. I think you'll got it now. And all this by simply\r
- specifying the vertex count. Welcome to the wonders of\r
- geometry.\r
- \param center Position of center of circle (pixels).\r
- \param radius Radius of circle in pixels.\r
- \param color Color of the circle.\r
- \param vertexCount Amount of vertices of the polygon. Specify 2\r
- to draw a line, 3 to draw a triangle, 4 for tetragons and a lot\r
- (>10) for nearly a circle. */\r
- virtual void draw2DPolygon(core::position2d<s32> center,\r
- f32 radius,\r
- video::SColor color=SColor(100,255,255,255),\r
- s32 vertexCount=10) =0;\r
-\r
- //! Draws a shadow volume into the stencil buffer.\r
- /** To draw a stencil shadow, do this: First, draw all geometry.\r
- Then use this method, to draw the shadow volume. Then, use\r
- IVideoDriver::drawStencilShadow() to visualize the shadow.\r
- Please note that the code for the opengl version of the method\r
- is based on free code sent in by Philipp Dortmann, lots of\r
- thanks go to him!\r
- \param triangles Array of 3d vectors, specifying the shadow\r
- volume.\r
- \param zfail If set to true, zfail method is used, otherwise\r
- zpass.\r
- \param debugDataVisible The debug data that is enabled for this\r
- shadow node\r
- */\r
- virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0) =0;\r
-\r
- //! Fills the stencil shadow with color.\r
- /** After the shadow volume has been drawn into the stencil\r
- buffer using IVideoDriver::drawStencilShadowVolume(), use this\r
- to draw the color of the shadow.\r
- Please note that the code for the opengl version of the method\r
- is based on free code sent in by Philipp Dortmann, lots of\r
- thanks go to him!\r
- \param clearStencilBuffer Set this to false, if you want to\r
- draw every shadow with the same color, and only want to call\r
- drawStencilShadow() once after all shadow volumes have been\r
- drawn. Set this to true, if you want to paint every shadow with\r
- its own color.\r
- \param leftUpEdge Color of the shadow in the upper left corner\r
- of screen.\r
- \param rightUpEdge Color of the shadow in the upper right\r
- corner of screen.\r
- \param leftDownEdge Color of the shadow in the lower left\r
- corner of screen.\r
- \param rightDownEdge Color of the shadow in the lower right\r
- corner of screen. */\r
- virtual void drawStencilShadow(bool clearStencilBuffer=false,\r
- video::SColor leftUpEdge = video::SColor(255,0,0,0),\r
- video::SColor rightUpEdge = video::SColor(255,0,0,0),\r
- video::SColor leftDownEdge = video::SColor(255,0,0,0),\r
- video::SColor rightDownEdge = video::SColor(255,0,0,0)) =0;\r
-\r
//! Draws a mesh buffer\r
/** \param mb Buffer to draw */\r
virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) =0;\r