#include <C4Draw.h>
Public Types | |
enum | DrawOperation { OP_POINTS , OP_TRIANGLES } |
enum | { DEFAULT_MESSAGE_COLOR = 0xffffffff } |
Public Member Functions | |
C4Draw ()=default | |
virtual | ~C4Draw () |
bool | Init (C4AbstractApp *pApp, unsigned int iXRes, unsigned int iYRes, unsigned int iMonitor) |
virtual void | Clear () |
virtual void | Default () |
virtual CStdGLCtx * | CreateContext (C4Window *, C4AbstractApp *) |
virtual bool | OnResolutionChanged (unsigned int iXRes, unsigned int iYRes)=0 |
bool | GetPrimaryClipper (int &rX1, int &rY1, int &rX2, int &rY2) |
bool | SetPrimaryClipper (int iX1, int iY1, int iX2, int iY2) |
bool | SubPrimaryClipper (int iX1, int iY1, int iX2, int iY2) |
C4Rect | GetClipRect () const |
C4Rect | GetOutRect () const |
bool | StorePrimaryClipper () |
bool | RestorePrimaryClipper () |
bool | NoPrimaryClipper () |
bool | ApplyPrimaryClipper (C4Surface *sfcSurface) |
bool | DetachPrimaryClipper (C4Surface *sfcSurface) |
virtual bool | UpdateClipper ()=0 |
bool | GetSurfaceSize (C4Surface *sfcSurface, int &iWdt, int &iHgt) |
void | Grayscale (C4Surface *sfcSfc, int32_t iOffset=0) |
void | LockingPrimary () |
void | PrimaryUnlocked () |
virtual bool | PrepareMaterial (StdMeshMatManager &mat_manager, StdMeshMaterialLoader &loader, StdMeshMaterial &mat)=0 |
virtual bool | PrepareRendering (C4Surface *sfcToSurface)=0 |
virtual bool | EnsureMainContextSelected ()=0 |
virtual bool | PrepareSpriteShader (C4Shader &shader, const char *name, int ssc, C4GroupSet *pGroups, const char *const *additionalDefines, const char *const *additionalSlices)=0 |
virtual void | BlitLandscape (C4Surface *sfcSource, float fx, float fy, C4Surface *sfcTarget, float tx, float ty, float wdt, float hgt) |
void | Blit8Fast (CSurface8 *sfcSource, int fx, int fy, C4Surface *sfcTarget, int tx, int ty, int wdt, int hgt) |
bool | Blit (C4Surface *sfcSource, float fx, float fy, float fwdt, float fhgt, C4Surface *sfcTarget, float tx, float ty, float twdt, float thgt, bool fSrcColKey=false, const C4BltTransform *pTransform=nullptr) |
bool | BlitUnscaled (C4Surface *sfcSource, float fx, float fy, float fwdt, float fhgt, C4Surface *sfcTarget, float tx, float ty, float twdt, float thgt, bool fSrcColKey=false, const C4BltTransform *pTransform=nullptr) |
bool | RenderMesh (StdMeshInstance &instance, C4Surface *sfcTarget, float tx, float ty, float twdt, float thgt, DWORD dwPlayerColor, C4BltTransform *pTransform) |
virtual void | PerformMesh (StdMeshInstance &instance, float tx, float ty, float twdt, float thgt, DWORD dwPlayerColor, C4BltTransform *pTransform)=0 |
bool | Blit8 (C4Surface *sfcSource, int fx, int fy, int fwdt, int fhgt, C4Surface *sfcTarget, int tx, int ty, int twdt, int thgt, bool fSrcColKey=false, const C4BltTransform *pTransform=nullptr) |
bool | BlitSimple (C4Surface *sfcSource, int fx, int fy, int fwdt, int fhgt, C4Surface *sfcTarget, int tx, int ty, int twdt, int thgt, bool fTransparency=true) |
bool | BlitSurface (C4Surface *sfcSurface, C4Surface *sfcTarget, int tx, int ty, bool fBlitBase) |
bool | BlitSurfaceTile (C4Surface *sfcSurface, C4Surface *sfcTarget, float iToX, float iToY, float iToWdt, float iToHgt, float iOffsetX, float iOffsetY, C4ShaderCall *shader_call) |
virtual void | FillBG (DWORD dwClr=0)=0 |
bool | TextOut (const char *szText, CStdFont &rFont, float fZoom, C4Surface *sfcDest, float iTx, float iTy, DWORD dwFCol=0xffffffff, BYTE byForm=ALeft, bool fDoMarkup=true) |
bool | StringOut (const char *szText, CStdFont &rFont, float fZoom, C4Surface *sfcDest, float iTx, float iTy, DWORD dwFCol=0xffffffff, BYTE byForm=ALeft, bool fDoMarkup=true) |
virtual void | PerformMultiPix (C4Surface *sfcTarget, const C4BltVertex *vertices, unsigned int n_vertices, C4ShaderCall *shader_call)=0 |
virtual void | PerformMultiLines (C4Surface *sfcTarget, const C4BltVertex *vertices, unsigned int n_vertices, float width, C4ShaderCall *shader_call)=0 |
virtual void | PerformMultiTris (C4Surface *sfcTarget, const C4BltVertex *vertices, unsigned int n_vertices, const C4BltTransform *pTransform, C4TexRef *pTex, C4TexRef *pOverlay, C4TexRef *pNormal, DWORD dwOverlayClrMod, C4ShaderCall *shader_call)=0 |
void | DrawBoxDw (C4Surface *sfcDest, int iX1, int iY1, int iX2, int iY2, DWORD dwClr) |
void | DrawBoxFade (C4Surface *sfcDest, float iX, float iY, float iWdt, float iHgt, DWORD dwClr1, DWORD dwClr2, DWORD dwClr3, DWORD dwClr4, C4ShaderCall *shader_call) |
void | DrawPatternedCircle (C4Surface *sfcDest, int x, int y, int r, BYTE col, C4Pattern &Pattern, CStdPalette &rPal) |
void | DrawFrameDw (C4Surface *sfcDest, int x1, int y1, int x2, int y2, DWORD dwClr, float width=1.0f) |
void | DrawQuadDw (C4Surface *sfcTarget, float *ipVtx, DWORD dwClr1, DWORD dwClr2, DWORD dwClr3, DWORD dwClr4, C4ShaderCall *shader_call) |
void | DrawPix (C4Surface *sfcDest, float tx, float ty, DWORD dwCol) |
void | DrawLineDw (C4Surface *sfcTarget, float x1, float y1, float x2, float y2, DWORD dwClr, float width=1.0f) |
void | DrawCircleDw (C4Surface *sfcTarget, float cx, float cy, float r, DWORD dwClr, float width=1.0f) |
void | SetGamma (float r, float g, float b, int32_t iRampIndex) |
void | ResetGamma () |
DWORD | ApplyGammaTo (DWORD dwClr) |
void | ActivateBlitModulation (DWORD dwWithClr) |
void | DeactivateBlitModulation () |
bool | GetBlitModulation (DWORD &rdwColor) |
void | SetBlitMode (DWORD dwBlitMode) |
void | ResetBlitMode () |
void | SetFoW (const C4FoWRegion *fow) |
const C4FoWRegion * | GetFoW () const |
void | SetZoom (float X, float Y, float Zoom) |
void | SetZoom (const ZoomData &zoom) |
void | GetZoom (ZoomData *r) |
void | ApplyZoom (float &X, float &Y) |
void | RemoveZoom (float &X, float &Y) |
void | SetMeshTransform (const StdMeshMatrix *Transform) |
void | SetPerspective (bool fSet) |
virtual bool | RestoreDeviceObjects ()=0 |
virtual bool | InvalidateDeviceObjects ()=0 |
virtual bool | DeviceReady ()=0 |
Public Attributes | |
C4AbstractApp * | pApp |
bool | Active |
float | gamma [C4MaxGammaRamps][3] |
float | gammaOut [3] |
int | MaxTexSize {0} |
C4ScriptUniform | scriptUniform |
float | Zoom |
Static Public Attributes | |
static constexpr int | COLOR_DEPTH = 32 |
static constexpr int | COLOR_DEPTH_BYTES = COLOR_DEPTH / 8 |
Protected Member Functions | |
bool | StringOut (const char *szText, C4Surface *sfcDest, float iTx, float iTy, DWORD dwFCol, BYTE byForm, bool fDoMarkup, C4Markup &Markup, CStdFont *pFont, float fZoom) |
bool | CreatePrimaryClipper (unsigned int iXRes, unsigned int iYRes) |
virtual bool | Error (const char *szMsg) |
Protected Attributes | |
float | fClipX1 |
float | fClipY1 |
float | fClipX2 |
float | fClipY2 |
float | fStClipX1 |
float | fStClipY1 |
float | fStClipX2 |
float | fStClipY2 |
int32_t | iClipX1 |
int32_t | iClipY1 |
int32_t | iClipX2 |
int32_t | iClipY2 |
bool | ClipAll |
bool | PrimaryLocked |
C4Surface * | RenderTarget |
bool | BlitModulated |
DWORD | BlitModulateClr |
DWORD | dwBlitMode |
const C4FoWRegion * | pFoW |
float | ZoomX |
float | ZoomY |
const StdMeshMatrix * | MeshTransform |
bool | fUsePerspective |
Friends | |
class | C4Surface |
class | C4TexRef |
class | C4Pattern |
|
default |
|
inlinevirtual |
|
inline |
Definition at line 188 of file C4Draw.h.
References BlitModulateClr, and BlitModulated.
Referenced by C4Sky::Draw(), C4GUI::Dialog::Draw(), C4GraphicsOverlay::Draw(), C4Landscape::Draw(), C4MouseControl::Draw(), C4GUI::Tabular::Sheet::DrawCaption(), C4Viewport::DrawMenu(), C4GraphicsOverlay::DrawPicture(), CStdFont::DrawText(), and C4Object::PrepareDrawing().
Definition at line 766 of file C4Draw.cpp.
References C4RGB, gammaOut, GetBlueValue, GetGreenValue, and GetRedValue.
bool C4Draw::ApplyPrimaryClipper | ( | C4Surface * | sfcSurface | ) |
Definition at line 227 of file C4Draw.cpp.
void C4Draw::ApplyZoom | ( | float & | X, |
float & | Y | ||
) |
Definition at line 778 of file C4Draw.cpp.
References X, Zoom, ZoomX, and ZoomY.
Referenced by Blit8Fast(), BlitUnscaled(), C4GUI::Window::Draw(), C4LandscapeRenderGL::Draw(), and C4GUI::Edit::DrawElement().
bool C4Draw::Blit | ( | C4Surface * | sfcSource, |
float | fx, | ||
float | fy, | ||
float | fwdt, | ||
float | fhgt, | ||
C4Surface * | sfcTarget, | ||
float | tx, | ||
float | ty, | ||
float | twdt, | ||
float | thgt, | ||
bool | fSrcColKey = false , |
||
const C4BltTransform * | pTransform = nullptr |
||
) |
Definition at line 301 of file C4Draw.cpp.
References BlitUnscaled(), and C4Surface::Scale.
Referenced by BlitLandscape(), BlitSimple(), BlitSurface(), C4FacetSurface::CopyFromSfcMaxSize(), C4Facet::Draw(), C4Object::Draw(), C4Object::DrawFaceImpl(), C4Facet::DrawFullScreen(), C4Facet::DrawT(), CStdFont::DrawText(), C4Object::DrawTopFace(), C4Facet::DrawX(), C4Facet::DrawXFloat(), C4Facet::DrawXR(), C4Facet::DrawXT(), C4MapFolderData::Load(), and C4Game::SaveGameTitle().
bool C4Draw::Blit8 | ( | C4Surface * | sfcSource, |
int | fx, | ||
int | fy, | ||
int | fwdt, | ||
int | fhgt, | ||
C4Surface * | sfcTarget, | ||
int | tx, | ||
int | ty, | ||
int | twdt, | ||
int | thgt, | ||
bool | fSrcColKey = false , |
||
const C4BltTransform * | pTransform = nullptr |
||
) |
Definition at line 418 of file C4Draw.cpp.
References BlitSimple(), C4Surface::BltPix(), C4Surface::Hgt, C4Surface::Lock(), C4BltTransform::SetAsInv(), C4BltTransform::SetMoveScale(), C4BltTransform::TransformPoint(), C4Surface::Unlock(), and C4Surface::Wdt.
Referenced by BlitUnscaled().
void C4Draw::Blit8Fast | ( | CSurface8 * | sfcSource, |
int | fx, | ||
int | fy, | ||
C4Surface * | sfcTarget, | ||
int | tx, | ||
int | ty, | ||
int | wdt, | ||
int | hgt | ||
) |
Definition at line 251 of file C4Draw.cpp.
References ApplyZoom(), DwTo4UB(), C4Surface::fPrimary, C4BltVertex::ftx, C4BltVertex::fty, CStdPalette::GetClr(), CSurface8::GetPix(), C4Surface::IsRenderTarget(), C4Surface::Lock(), PerformMultiPix(), CSurface8::pPal, C4Surface::Unlock(), and Zoom.
Referenced by C4Landscape::Draw().
|
virtual |
Definition at line 245 of file C4Draw.cpp.
References Blit().
bool C4Draw::BlitSimple | ( | C4Surface * | sfcSource, |
int | fx, | ||
int | fy, | ||
int | fwdt, | ||
int | fhgt, | ||
C4Surface * | sfcTarget, | ||
int | tx, | ||
int | ty, | ||
int | twdt, | ||
int | thgt, | ||
bool | fTransparency = true |
||
) |
Definition at line 463 of file C4Draw.cpp.
References Blit(), C4Surface::BltPix(), C4Surface::Hgt, Inside(), C4Surface::IsRenderTarget(), C4Surface::Lock(), C4Surface::Unlock(), and C4Surface::Wdt.
Referenced by Blit8().
bool C4Draw::BlitSurface | ( | C4Surface * | sfcSurface, |
C4Surface * | sfcTarget, | ||
int | tx, | ||
int | ty, | ||
bool | fBlitBase | ||
) |
Definition at line 511 of file C4Draw.cpp.
References Blit(), C4Surface::Hgt, C4Surface::pMainSfc, and C4Surface::Wdt.
Referenced by C4Surface::Copy().
bool C4Draw::BlitSurfaceTile | ( | C4Surface * | sfcSurface, |
C4Surface * | sfcTarget, | ||
float | iToX, | ||
float | iToY, | ||
float | iToWdt, | ||
float | iToHgt, | ||
float | iOffsetX, | ||
float | iOffsetY, | ||
C4ShaderCall * | shader_call | ||
) |
Definition at line 529 of file C4Draw.cpp.
References C4SF_Tileable, DwTo4UB(), C4BltVertex::ftx, C4BltVertex::fty, C4BltVertex::ftz, C4Surface::Hgt, C4Surface::IsRenderTarget(), PerformMultiTris(), C4Surface::texture, C4BltVertex::tx, C4BltVertex::ty, and C4Surface::Wdt.
Referenced by C4UpperBoard::Draw(), C4Sky::Draw(), C4Viewport::Draw(), C4GUI::FullscreenDialog::DrawElement(), and C4ViewportList::DrawFullscreenBackground().
bool C4Draw::BlitUnscaled | ( | C4Surface * | sfcSource, |
float | fx, | ||
float | fy, | ||
float | fwdt, | ||
float | fhgt, | ||
C4Surface * | sfcTarget, | ||
float | tx, | ||
float | ty, | ||
float | twdt, | ||
float | thgt, | ||
bool | fSrcColKey = false , |
||
const C4BltTransform * | pTransform = nullptr |
||
) |
Definition at line 309 of file C4Draw.cpp.
References ApplyZoom(), Blit8(), ClipAll, C4Surface::ClrByOwnerClr, DwTo4UB(), C4Surface::fPrimary, C4BltVertex::ftx, C4BltVertex::fty, C4TexRef::iSizeX, C4TexRef::iSizeY, C4Surface::IsRenderTarget(), C4BltTransform::mat, PerformMultiTris(), C4Surface::pMainSfc, C4Surface::pNormalSfc, PrepareRendering(), C4BltTransform::Set(), C4Surface::texture, C4BltVertex::tx, C4BltVertex::ty, Zoom, ZoomX, and ZoomY.
Referenced by Blit(), and C4Facet::DrawTUnscaled().
|
virtual |
Reimplemented in CStdGL.
Definition at line 184 of file C4Draw.cpp.
References Active, BlitModulated, dwBlitMode, and ResetGamma().
Referenced by CStdGL::Clear().
|
inlinevirtual |
|
protected |
Definition at line 501 of file C4Draw.cpp.
References SetPrimaryClipper(), StorePrimaryClipper(), and Zoom.
Referenced by Init(), and CStdGL::OnResolutionChanged().
|
inline |
Definition at line 189 of file C4Draw.h.
References BlitModulated.
Referenced by C4Sky::Draw(), C4GUI::Dialog::Draw(), C4GraphicsOverlay::Draw(), C4Landscape::Draw(), C4MouseControl::Draw(), C4ParticleList::Draw(), C4GUI::Tabular::Sheet::DrawCaption(), C4Viewport::DrawMenu(), C4GraphicsOverlay::DrawPicture(), CStdFont::DrawText(), and C4Object::FinishedDrawing().
|
virtual |
Reimplemented in CStdGL.
Definition at line 169 of file C4Draw.cpp.
References Active, BlitModulated, C4ScriptUniform::Clear(), ClipAll, dwBlitMode, fUsePerspective, MeshTransform, pFoW, RenderTarget, ResetGamma(), scriptUniform, Zoom, ZoomX, and ZoomY.
Referenced by CStdNoGfx::CStdNoGfx(), and CStdGL::Default().
bool C4Draw::DetachPrimaryClipper | ( | C4Surface * | sfcSurface | ) |
Definition at line 232 of file C4Draw.cpp.
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by C4TexRef::C4TexRef(), and C4Surface::Create().
Definition at line 840 of file C4Draw.cpp.
References DrawBoxFade(), C4Surface::IsRenderTarget(), C4Surface::Lock(), C4Surface::SetPixDw(), and C4Surface::Unlock().
Referenced by C4MessageBoard::Draw(), C4Def::Draw(), C4LoaderScreen::Draw(), C4Sky::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GUI::Screen::Draw(), C4GUI::FrameDecoration::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::GroupBox::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::DrawElement(), C4MenuItem::DrawElement(), C4StartupNetListEntry::DrawElement(), and C4GUI::Screen::DrawToolTip().
void C4Draw::DrawBoxFade | ( | C4Surface * | sfcDest, |
float | iX, | ||
float | iY, | ||
float | iWdt, | ||
float | iHgt, | ||
DWORD | dwClr1, | ||
DWORD | dwClr2, | ||
DWORD | dwClr3, | ||
DWORD | dwClr4, | ||
C4ShaderCall * | shader_call | ||
) |
Definition at line 824 of file C4Draw.cpp.
References DrawQuadDw().
Referenced by C4Sky::Draw(), and DrawBoxDw().
void C4Draw::DrawCircleDw | ( | C4Surface * | sfcTarget, |
float | cx, | ||
float | cy, | ||
float | r, | ||
DWORD | dwClr, | ||
float | width = 1.0f |
||
) |
Definition at line 618 of file C4Draw.cpp.
References DwTo4UB(), and PerformMultiLines().
Referenced by C4EditCursor::Draw().
void C4Draw::DrawFrameDw | ( | C4Surface * | sfcDest, |
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
DWORD | dwClr, | ||
float | width = 1.0f |
||
) |
Definition at line 635 of file C4Draw.cpp.
References DwTo4UB(), C4BltVertex::ftx, C4BltVertex::fty, and PerformMultiLines().
Referenced by C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4TransferZone::Draw(), C4Object::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::GroupBox::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::ComboBox::DrawElement(), C4Menu::DrawFrame(), and C4GUI::Screen::DrawToolTip().
void C4Draw::DrawLineDw | ( | C4Surface * | sfcTarget, |
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
DWORD | dwClr, | ||
float | width = 1.0f |
||
) |
Definition at line 608 of file C4Draw.cpp.
References DwTo4UB(), C4BltVertex::ftx, C4BltVertex::fty, and PerformMultiLines().
Referenced by C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4Object::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::HorizontalLine::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), and C4Chart::DrawElement().
void C4Draw::DrawPatternedCircle | ( | C4Surface * | sfcDest, |
int | x, | ||
int | y, | ||
int | r, | ||
BYTE | col, | ||
C4Pattern & | Pattern, | ||
CStdPalette & | rPal | ||
) |
Definition at line 669 of file C4Draw.cpp.
References DrawPix(), C4Surface::IsRenderTarget(), C4Surface::Lock(), C4Pattern::PatternClr(), C4Surface::SetPixDw(), and C4Surface::Unlock().
Definition at line 598 of file C4Draw.cpp.
References C4BltVertex::color, DwTo4UB(), C4BltVertex::ftx, C4BltVertex::fty, and PerformMultiPix().
Referenced by DrawPatternedCircle().
void C4Draw::DrawQuadDw | ( | C4Surface * | sfcTarget, |
float * | ipVtx, | ||
DWORD | dwClr1, | ||
DWORD | dwClr2, | ||
DWORD | dwClr3, | ||
DWORD | dwClr4, | ||
C4ShaderCall * | shader_call | ||
) |
Definition at line 653 of file C4Draw.cpp.
References DwTo4UB(), C4BltVertex::ftx, C4BltVertex::fty, and PerformMultiTris().
Referenced by DrawBoxFade(), and C4GUI::Tabular::DrawElement().
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by C4ViewportList::CloseViewport().
|
protectedvirtual |
Reimplemented in CStdGL.
Definition at line 494 of file C4Draw.cpp.
References C4AbstractApp::Error(), Log(), and pApp.
Referenced by CStdGL::Error(), and Init().
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by C4LoaderScreen::Draw().
|
inline |
Definition at line 190 of file C4Draw.h.
References BlitModulateClr, and BlitModulated.
Referenced by CStdFont::DrawText().
C4Rect C4Draw::GetClipRect | ( | ) | const |
Definition at line 724 of file C4Draw.cpp.
References C4Surface::Hgt, iClipX1, iClipX2, iClipY1, iClipY2, RenderTarget, and C4Surface::Wdt.
Referenced by C4LandscapeRenderGL::Draw(), CStdGL::PerformMesh(), CStdGL::SetupMultiBlt(), and CStdGL::UpdateClipper().
|
inline |
Definition at line 194 of file C4Draw.h.
References pFoW.
Referenced by C4Sky::Draw(), and C4Object::Draw().
C4Rect C4Draw::GetOutRect | ( | ) | const |
Definition at line 733 of file C4Draw.cpp.
References C4Surface::Hgt, RenderTarget, and C4Surface::Wdt.
Referenced by C4LandscapeRenderGL::Draw(), CStdGL::PerformMesh(), and CStdGL::SetupMultiBlt().
bool C4Draw::GetPrimaryClipper | ( | int & | rX1, |
int & | rY1, | ||
int & | rX2, | ||
int & | rY2 | ||
) |
Definition at line 716 of file C4Draw.cpp.
References fClipX1, fClipX2, fClipY1, and fClipY2.
Referenced by C4GUI::Window::Draw(), C4GUI::MultilineLabel::DrawElement(), and C4GUI::Edit::DrawElement().
bool C4Draw::GetSurfaceSize | ( | C4Surface * | sfcSurface, |
int & | iWdt, | ||
int & | iHgt | ||
) |
Definition at line 191 of file C4Draw.cpp.
References C4Surface::GetSurfaceSize().
|
inline |
Definition at line 197 of file C4Draw.h.
References ZoomData::X, ZoomData::Y, ZoomData::Zoom, Zoom, ZoomX, and ZoomY.
Referenced by C4MouseControl::Draw(), C4GUI::CMouse::Draw(), C4Game::DrawCrewOverheadText(), and ZoomDataStackItem::ZoomDataStackItem().
void C4Draw::Grayscale | ( | C4Surface * | sfcSfc, |
int32_t | iOffset = 0 |
||
) |
Definition at line 695 of file C4Draw.cpp.
References a, b, GetBlueValue, GetGreenValue, C4Surface::GetPixDw(), GetRedValue, C4Surface::Hgt, C4Surface::Lock(), RGBA(), C4Surface::SetPixDw(), C4Surface::Unlock(), and C4Surface::Wdt.
Referenced by C4FacetSurface::Grayscale().
bool C4Draw::Init | ( | C4AbstractApp * | pApp, |
unsigned int | iXRes, | ||
unsigned int | iYRes, | ||
unsigned int | iMonitor | ||
) |
Definition at line 809 of file C4Draw.cpp.
References C4Surface, CreatePrimaryClipper(), Error(), pApp, C4Window::pSurface, C4AbstractApp::pWindow, and RestoreDeviceObjects().
Referenced by DDrawInit().
|
inline |
bool C4Draw::NoPrimaryClipper | ( | ) |
Definition at line 237 of file C4Draw.cpp.
References SetPrimaryClipper().
Referenced by CStdGL::Clear(), C4Viewport::Draw(), C4Landscape::DrawChunks(), C4GUI::Edit::DrawElement(), and C4Landscape::P::MapToSurface().
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by C4Application::OnResolutionChanged().
|
pure virtual |
Implemented in CStdGL, and CStdNoGfx.
Referenced by RenderMesh().
|
pure virtual |
Implemented in CStdGL, and CStdNoGfx.
Referenced by C4PXSSystem::Draw(), DrawCircleDw(), DrawFrameDw(), C4Object::DrawLine(), DrawLineDw(), and C4EditCursor::DrawSelectMark().
|
pure virtual |
Implemented in CStdGL, and CStdNoGfx.
Referenced by Blit8Fast(), C4PXSSystem::Draw(), and DrawPix().
|
pure virtual |
Implemented in CStdGL, and CStdNoGfx.
Referenced by BlitSurfaceTile(), BlitUnscaled(), C4PXSSystem::Draw(), and DrawQuadDw().
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by StdMeshMatManager::Parse().
|
pure virtual |
Implemented in CStdGL, and CStdNoGfx.
Referenced by BlitUnscaled(), C4Viewport::Execute(), RenderMesh(), and StringOut().
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by C4Sky::Init().
|
inline |
void C4Draw::RemoveZoom | ( | float & | X, |
float & | Y | ||
) |
bool C4Draw::RenderMesh | ( | StdMeshInstance & | instance, |
C4Surface * | sfcTarget, | ||
float | tx, | ||
float | ty, | ||
float | twdt, | ||
float | thgt, | ||
DWORD | dwPlayerColor, | ||
C4BltTransform * | pTransform | ||
) |
Definition at line 397 of file C4Draw.cpp.
References StdMeshMatrix::Identity(), C4Surface::IsRenderTarget(), MeshTransform, PerformMesh(), PrepareRendering(), StdMeshInstance::ReorderFaces(), and StdMeshInstance::UpdateBoneTransforms().
Referenced by C4DefGraphics::Draw(), C4GraphicsOverlay::Draw(), and C4Object::DrawFaceImpl().
|
inline |
Definition at line 192 of file C4Draw.h.
References dwBlitMode.
Referenced by C4GraphicsOverlay::Draw(), C4ParticleList::Draw(), C4GUI::Tabular::Sheet::DrawCaption(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4EditCursor::DrawObject(), C4GraphicsOverlay::DrawPicture(), and C4Object::FinishedDrawing().
void C4Draw::ResetGamma | ( | ) |
Definition at line 754 of file C4Draw.cpp.
References gamma, and gammaOut.
Referenced by Clear(), Default(), and C4Game::SetDefaultGamma().
|
pure virtual |
bool C4Draw::RestorePrimaryClipper | ( | ) |
Definition at line 210 of file C4Draw.cpp.
References fStClipX1, fStClipX2, fStClipY1, fStClipY2, and SetPrimaryClipper().
Referenced by C4ScriptGuiWindow::DrawChildren(), C4GUI::WoodenLabel::DrawElement(), C4GUI::ComboBox::DrawElement(), C4MenuItem::DrawElement(), and C4FoWRegion::Render().
|
inline |
Definition at line 191 of file C4Draw.h.
References C4GFXBLIT_ALL, and dwBlitMode.
Referenced by C4GraphicsOverlay::Draw(), C4MouseControl::Draw(), C4GUI::Tabular::Sheet::DrawCaption(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4EditCursor::DrawObject(), C4GraphicsOverlay::DrawPicture(), and C4Object::PrepareDrawing().
|
inline |
Definition at line 193 of file C4Draw.h.
References pFoW.
Referenced by C4Viewport::Draw(), and C4Object::Draw().
void C4Draw::SetGamma | ( | float | r, |
float | g, | ||
float | b, | ||
int32_t | iRampIndex | ||
) |
Definition at line 738 of file C4Draw.cpp.
References b, gamma, and gammaOut.
Referenced by C4Game::SetDefaultGamma().
|
inline |
Definition at line 200 of file C4Draw.h.
References MeshTransform.
Referenced by C4DefGraphics::Draw(), C4GraphicsOverlay::Draw(), and C4Object::DrawFaceImpl().
|
inline |
Definition at line 201 of file C4Draw.h.
References fUsePerspective.
Referenced by C4DefGraphics::Draw().
bool C4Draw::SetPrimaryClipper | ( | int | iX1, |
int | iY1, | ||
int | iX2, | ||
int | iY2 | ||
) |
Definition at line 217 of file C4Draw.cpp.
References fClipX1, fClipX2, fClipY1, fClipY2, iClipX1, iClipX2, iClipY1, iClipY2, and UpdateClipper().
Referenced by CreatePrimaryClipper(), C4GUI::Window::Draw(), C4Viewport::Draw(), C4ScriptGuiWindow::DrawChildren(), C4GUI::WoodenLabel::DrawElement(), C4GUI::Edit::DrawElement(), NoPrimaryClipper(), RestorePrimaryClipper(), and SubPrimaryClipper().
|
inline |
Definition at line 196 of file C4Draw.h.
References SetZoom(), ZoomData::X, ZoomData::Y, and ZoomData::Zoom.
Referenced by SetZoom().
void C4Draw::SetZoom | ( | float | X, |
float | Y, | ||
float | Zoom | ||
) |
Definition at line 773 of file C4Draw.cpp.
References X, Zoom, ZoomX, and ZoomY.
Referenced by C4Viewport::Draw(), C4MouseControl::Draw(), C4GUI::CMouse::Draw(), C4Game::DrawCrewOverheadText(), C4Viewport::DrawMenu(), ZoomDataStackItem::ZoomDataStackItem(), and ZoomDataStackItem::~ZoomDataStackItem().
bool C4Draw::StorePrimaryClipper | ( | ) |
Definition at line 203 of file C4Draw.cpp.
References fClipX1, fClipX2, fClipY1, fClipY2, fStClipX1, fStClipX2, fStClipY1, and fStClipY2.
Referenced by CreatePrimaryClipper(), C4ScriptGuiWindow::DrawChildren(), C4GUI::WoodenLabel::DrawElement(), C4GUI::ComboBox::DrawElement(), C4MenuItem::DrawElement(), and C4FoWRegion::Render().
|
protected |
Definition at line 578 of file C4Draw.cpp.
References ACenter, ARight, ClipAll, CStdFont::DrawText(), PrepareRendering(), STDFONT_CENTERED, STDFONT_NOMARKUP, and STDFONT_RIGHTALGN.
bool C4Draw::StringOut | ( | const char * | szText, |
CStdFont & | rFont, | ||
float | fZoom, | ||
C4Surface * | sfcDest, | ||
float | iTx, | ||
float | iTy, | ||
DWORD | dwFCol = 0xffffffff , |
||
BYTE | byForm = ALeft , |
||
bool | fDoMarkup = true |
||
) |
Definition at line 570 of file C4Draw.cpp.
Referenced by C4MessageBoard::Draw(), C4LoaderScreen::Draw(), and TextOut().
bool C4Draw::SubPrimaryClipper | ( | int | iX1, |
int | iY1, | ||
int | iX2, | ||
int | iY2 | ||
) |
Definition at line 196 of file C4Draw.cpp.
References iClipX1, iClipX2, iClipY1, iClipY2, and SetPrimaryClipper().
Referenced by C4GUI::Window::Draw(), C4GUI::ComboBox::DrawElement(), and C4MenuItem::DrawElement().
bool C4Draw::TextOut | ( | const char * | szText, |
CStdFont & | rFont, | ||
float | fZoom, | ||
C4Surface * | sfcDest, | ||
float | iTx, | ||
float | iTy, | ||
DWORD | dwFCol = 0xffffffff , |
||
BYTE | byForm = ALeft , |
||
bool | fDoMarkup = true |
||
) |
Definition at line 561 of file C4Draw.cpp.
References CStdFont::GetLineHeight(), SCopySegmentEx(), and StringOut().
Referenced by C4UpperBoard::Draw(), C4LoaderScreen::Draw(), C4IDList::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::Tabular::Sheet::DrawCaption(), C4Game::DrawCrewOverheadText(), C4GUI::Label::DrawElement(), C4GUI::WoodenLabel::DrawElement(), C4GUI::MultilineLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::FacetButton::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ComboBox::DrawElement(), C4MenuItem::DrawElement(), C4ScoreboardDlg::DrawElement(), C4StartupMainDlg::DrawElement(), C4Chart::DrawElement(), C4Viewport::DrawMenu(), C4Viewport::DrawPlayerStartup(), C4Network2::DrawStatus(), C4GUI::Screen::DrawToolTip(), C4Facet::DrawValue(), and C4Facet::DrawValue2().
|
pure virtual |
Implemented in CStdNoGfx, and CStdGL.
Referenced by SetPrimaryClipper().
bool C4Draw::Active |
Definition at line 96 of file C4Draw.h.
Referenced by Clear(), Default(), CStdGL::InvalidateDeviceObjects(), CStdGL::PrepareRendering(), CStdGL::RestoreDeviceObjects(), C4GraphicsSystem::StartDrawing(), and CStdGL::UpdateClipper().
|
protected |
Definition at line 109 of file C4Draw.h.
Referenced by ActivateBlitModulation(), GetBlitModulation(), C4Surface::GetPixDw(), CStdGL::PerformMesh(), and CStdGL::SetupMultiBlt().
|
protected |
Definition at line 108 of file C4Draw.h.
Referenced by ActivateBlitModulation(), Clear(), DeactivateBlitModulation(), Default(), GetBlitModulation(), C4Surface::GetPixDw(), CStdGL::PerformMesh(), and CStdGL::SetupMultiBlt().
|
protected |
Definition at line 105 of file C4Draw.h.
Referenced by BlitUnscaled(), Default(), StringOut(), and CStdGL::UpdateClipper().
|
staticconstexpr |
Definition at line 89 of file C4Draw.h.
Referenced by C4Application::ApplyResolutionConstraints().
|
staticconstexpr |
Definition at line 90 of file C4Draw.h.
Referenced by C4TexRef::C4TexRef(), C4TexRef::Lock(), and C4TexRef::LockForUpdate().
|
protected |
Definition at line 110 of file C4Draw.h.
Referenced by C4Surface::BltPix(), Clear(), Default(), C4Surface::GetPixDw(), CStdGL::GetSpriteShader(), CStdGL::PerformMesh(), ResetBlitMode(), CStdGL::RestoreDeviceObjects(), SetBlitMode(), and CStdGL::SetupMultiBlt().
|
protected |
Definition at line 102 of file C4Draw.h.
Referenced by GetPrimaryClipper(), SetPrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 102 of file C4Draw.h.
Referenced by GetPrimaryClipper(), SetPrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 102 of file C4Draw.h.
Referenced by GetPrimaryClipper(), SetPrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 102 of file C4Draw.h.
Referenced by GetPrimaryClipper(), SetPrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 103 of file C4Draw.h.
Referenced by RestorePrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 103 of file C4Draw.h.
Referenced by RestorePrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 103 of file C4Draw.h.
Referenced by RestorePrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 103 of file C4Draw.h.
Referenced by RestorePrimaryClipper(), and StorePrimaryClipper().
|
protected |
Definition at line 114 of file C4Draw.h.
Referenced by Default(), CStdGL::PerformMesh(), and SetPerspective().
float C4Draw::gamma[C4MaxGammaRamps][3] |
Definition at line 97 of file C4Draw.h.
Referenced by C4Weather::CompileFunc(), ResetGamma(), and SetGamma().
float C4Draw::gammaOut[3] |
Definition at line 98 of file C4Draw.h.
Referenced by ApplyGammaTo(), C4LandscapeRenderGL::Draw(), ResetGamma(), SetGamma(), and CStdGL::SetupMultiBlt().
|
protected |
Definition at line 104 of file C4Draw.h.
Referenced by GetClipRect(), SetPrimaryClipper(), and SubPrimaryClipper().
|
protected |
Definition at line 104 of file C4Draw.h.
Referenced by GetClipRect(), SetPrimaryClipper(), and SubPrimaryClipper().
|
protected |
Definition at line 104 of file C4Draw.h.
Referenced by GetClipRect(), SetPrimaryClipper(), and SubPrimaryClipper().
|
protected |
Definition at line 104 of file C4Draw.h.
Referenced by GetClipRect(), SetPrimaryClipper(), and SubPrimaryClipper().
int C4Draw::MaxTexSize {0} |
Definition at line 99 of file C4Draw.h.
Referenced by C4FoWAmbient::CreateFromLandscape(), CStdGL::RestoreDeviceObjects(), and CStdNoGfx::RestoreDeviceObjects().
|
protected |
Definition at line 113 of file C4Draw.h.
Referenced by Default(), CStdGL::PerformMesh(), RenderMesh(), and SetMeshTransform().
C4AbstractApp* C4Draw::pApp |
Definition at line 95 of file C4Draw.h.
Referenced by CStdGL::CreateContext(), Error(), Init(), C4Surface::PageFlip(), CStdGL::PrepareRendering(), and CStdGL::RestoreDeviceObjects().
|
protected |
Definition at line 111 of file C4Draw.h.
Referenced by Default(), GetFoW(), CStdGL::PerformMesh(), SetFoW(), and CStdGL::SetupMultiBlt().
|
protected |
Definition at line 106 of file C4Draw.h.
Referenced by LockingPrimary(), and PrimaryUnlocked().
|
protected |
Definition at line 107 of file C4Draw.h.
Referenced by CStdGL::Clear(), CStdGL::CreateContext(), Default(), GetClipRect(), GetOutRect(), CStdGL::PrepareRendering(), CStdGL::RestoreDeviceObjects(), and CStdGL::UpdateClipper().
C4ScriptUniform C4Draw::scriptUniform |
Definition at line 100 of file C4Draw.h.
Referenced by Default(), C4Object::Draw(), C4LandscapeRenderGL::Draw(), C4Viewport::Execute(), and CStdGL::SetupMultiBlt().
float C4Draw::Zoom |
Definition at line 116 of file C4Draw.h.
Referenced by ApplyZoom(), Blit8Fast(), BlitUnscaled(), CreatePrimaryClipper(), Default(), C4LandscapeRenderGL::Draw(), GetZoom(), CStdGL::PerformMesh(), RemoveZoom(), CStdGL::SetupMultiBlt(), and SetZoom().
|
protected |
Definition at line 112 of file C4Draw.h.
Referenced by ApplyZoom(), BlitUnscaled(), Default(), GetZoom(), CStdGL::PerformMesh(), RemoveZoom(), CStdGL::SetupMultiBlt(), and SetZoom().
|
protected |
Definition at line 112 of file C4Draw.h.
Referenced by ApplyZoom(), BlitUnscaled(), Default(), GetZoom(), CStdGL::PerformMesh(), RemoveZoom(), CStdGL::SetupMultiBlt(), and SetZoom().