#include <computed_string.h>
Inheritance diagram for NL3D::CRenderStringBuffer:
Definition at line 51 of file computed_string.h.
Public Member Functions | |
CRenderStringBuffer () | |
void | flush (IDriver &driver, CMaterial *fontMat) |
render and make empty the render string buffer. see CComputedString::render2DClip() | |
void | flushUnProjected (IDriver &driver, CMaterial *fontMat, bool zwrite) |
virtual | ~CRenderStringBuffer () |
Data Fields | |
uint | NumQuads |
CVertexBuffer | Vertices |
|
Definition at line 590 of file computed_string.cpp. References NumQuads, and NL3D::CVertexBuffer::setVertexFormat().
|
|
Definition at line 599 of file computed_string.cpp.
00600 { 00601 } |
|
render and make empty the render string buffer. see CComputedString::render2DClip()
Definition at line 605 of file computed_string.cpp. References NL3D::IDriver::activeVertexBuffer(), NL3D::IDriver::getWindowSize(), NumQuads, NL3D::IDriver::renderQuads(), NL3D::IDriver::setFrustum(), NL3D::IDriver::setupModelMatrix(), NL3D::IDriver::setupViewMatrix(), NL3D::CMaterial::setZFunc(), NL3D::CMaterial::setZWrite(), and uint32. Referenced by NL3D::CTextContextUser::flushRenderBuffer().
00606 { 00607 if(NumQuads==0) 00608 return; 00609 00610 // get window size 00611 uint32 wndWidth, wndHeight; 00612 driver.getWindowSize(wndWidth, wndHeight); 00613 00614 // **** setup driver context 00615 driver.setFrustum(0, (float)wndWidth, 0, (float)wndHeight, -1, 1, false); // resX/resY 00616 00617 // view matrix and model matrix <-> identity 00618 driver.setupViewMatrix (CMatrix::Identity); 00619 driver.setupModelMatrix (CMatrix::Identity); 00620 00621 // setup material 00622 fontMat->setZFunc (CMaterial::always); 00623 fontMat->setZWrite (false); 00624 00625 // setup vertices clipped 00626 driver.activeVertexBuffer (Vertices); 00627 00628 // *** rendering 00629 driver.renderQuads (*fontMat, 0, NumQuads ); 00630 00631 // *** reset 00632 NumQuads= 0; 00633 } |
|
render and make empty the render string buffer. see CComputedString::render2DProjected() The driver view and model matrices have to be setuped as material zbuffer flags by the user. This method only render string quads. Definition at line 637 of file computed_string.cpp. References NL3D::IDriver::activeVertexBuffer(), NumQuads, NL3D::IDriver::renderQuads(), NL3D::CMaterial::setZFunc(), and NL3D::CMaterial::setZWrite(). Referenced by NL3D::CTextContextUser::flushRenderBufferUnProjected().
00638 { 00639 if(NumQuads==0) 00640 return; 00641 00642 // setup material 00643 fontMat->setZFunc (CMaterial::lessequal); 00644 fontMat->setZWrite (zwrite); 00645 00646 // setup vertices clipped 00647 driver.activeVertexBuffer (Vertices); 00648 00649 // *** rendering 00650 driver.renderQuads (*fontMat, 0, NumQuads ); 00651 00652 // *** reset 00653 NumQuads= 0; 00654 } |
|
Definition at line 55 of file computed_string.h. Referenced by CRenderStringBuffer(), flush(), NL3D::CTextContextUser::flushRenderBuffer(), NL3D::CTextContextUser::flushRenderBufferUnProjected(), flushUnProjected(), NL3D::CComputedString::render2DClip(), and NL3D::CComputedString::render2DUnProjected(). |
|
Definition at line 54 of file computed_string.h. Referenced by NL3D::CComputedString::render2DClip(), and NL3D::CComputedString::render2DUnProjected(). |