OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
BaseRenderer Class Reference

#include <BaseRenderer.h>

Inheritance diagram for BaseRenderer:
Renderer NullRenderer OpenGLRenderer

Public Member Functions

 BaseRenderer (std::shared_ptr< GameConfig > config, DecalBuilder *decal_builder, SpellFxRenderer *spellfx, std::shared_ptr< ParticleEngine > particle_engine, Vis *vis)
 
virtual bool Initialize () override
 
virtual void TransformBillboardsAndSetPalettesODM () override
 
virtual void DrawSpriteObjects () override
 
virtual void PrepareDecorationsRenderList_ODM () override
 
virtual void MakeParticleBillboardAndPush (SoftwareBillboard *a2, GraphicsImage *texture, Color uDiffuse, int angle) override
 
virtual float GetGamma () override
 
virtual void DrawMasked (float u, float v, GraphicsImage *img, int color_dimming_level, Color mask=colorTable.White) override
 
virtual void DrawTextureGrayShade (float u, float v, GraphicsImage *a4) override
 
virtual void DrawTransparentRedShade (float u, float v, GraphicsImage *a4) override
 
virtual void DrawTransparentGreenShade (float u, float v, GraphicsImage *pTexture) override
 
virtual void ClearBlack () override
 
virtual void BillboardSphereSpellFX (SpellFX_Billboard *a1, Color diffuse) override
 
virtual void DrawMonsterPortrait (Recti rc, SpriteFrame *Portrait_Sprite, int Y_Offset) override
 
virtual void DrawSpecialEffectsQuad (GraphicsImage *texture, int palette) override
 
virtual void DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene () override
 
virtual void PresentBlackScreen () override
 
virtual std::vector< Actor * > getActorsInViewport (int pDepth) override
 
virtual void CreateZBuffer () override
 
virtual void ClearZBuffer () override
 
virtual void ZDrawTextureAlpha (float u, float v, GraphicsImage *pTexture, int zVal) override
 
bool Reinitialize (bool firstInit) override
 
virtual Sizei GetRenderDimensions () override
 
virtual Sizei GetPresentDimensions () override
 
- Public Member Functions inherited from Renderer
 Renderer (std::shared_ptr< GameConfig > config, DecalBuilder *decal_builder, SpellFxRenderer *spellfx, std::shared_ptr< ParticleEngine > particle_engine, Vis *vis)
 
virtual ~Renderer ()
 
virtual bool Initialize ()=0
 
virtual void ClearBlack ()=0
 
virtual void PresentBlackScreen ()=0
 
virtual RgbaImage ReadScreenPixels ()=0
 
virtual void ClearTarget (Color uColor)=0
 
virtual void Present ()=0
 
virtual bool InitializeFullscreen ()=0
 
virtual void CreateZBuffer ()=0
 
virtual void Release ()=0
 
virtual bool SwitchToWindow ()=0
 
virtual void BeginLines2D ()=0
 
virtual void EndLines2D ()=0
 
virtual void RasterLine2D (Pointi a, Pointi b, Color uColor32)=0
 
virtual void DrawLines (const RenderVertexD3D3 *vertices, int num_vertices)=0
 
virtual void ClearZBuffer ()=0
 
virtual void RestoreFrontBuffer ()=0
 
virtual void RestoreBackBuffer ()=0
 
virtual void BltBackToFontFast (int a2, int a3, Recti *a4)=0
 
virtual void BeginScene3D ()=0
 
virtual void MakeParticleBillboardAndPush (SoftwareBillboard *a2, GraphicsImage *texture, Color uDiffuse, int angle)=0
 
virtual float GetGamma ()=0
 
virtual void DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene ()=0
 
virtual void BillboardSphereSpellFX (SpellFX_Billboard *a1, Color diffuse)=0
 
virtual void TransformBillboardsAndSetPalettesODM ()=0
 
virtual void DrawProjectile (float srcX, float srcY, float a3, float a4, float dstX, float dstY, float a7, float a8, GraphicsImage *texture)=0
 
virtual TextureRenderId CreateTexture (RgbaImageView image)=0
 
virtual void DeleteTexture (TextureRenderId id)=0
 
virtual void UpdateTexture (TextureRenderId id, RgbaImageView image)=0
 
virtual void Update_Texture (GraphicsImage *texture)=0
 
virtual void BeginScene2D ()=0
 
virtual void ScreenFade (Color color, float t)=0
 
virtual void SetUIClipRect (const Recti &rect)=0
 
virtual void ResetUIClipRect ()=0
 
virtual void DrawTextureNew (float u, float v, GraphicsImage *img, Color colourmask32=colorTable.White)=0
 
virtual void DrawTextureCustomHeight (float u, float v, GraphicsImage *, int height)=0
 
virtual void DrawTextureOffset (int x, int y, int offset_x, int offset_y, GraphicsImage *)=0
 
virtual void DrawImage (GraphicsImage *, const Recti &rect, int paletteid=0, Color colourmask32=colorTable.White)=0
 
virtual void ZDrawTextureAlpha (float u, float v, GraphicsImage *pTexture, int zVal)=0
 
virtual void BlendTextures (int a2, int a3, GraphicsImage *a4, GraphicsImage *a5, int t, int start_opacity, int end_opacity)=0
 
virtual void TexturePixelRotateDraw (float u, float v, GraphicsImage *img, int time)=0
 
virtual void DrawMonsterPortrait (Recti rc, SpriteFrame *Portrait_Sprite, int Y_Offset)=0
 
virtual void DrawMasked (float u, float v, GraphicsImage *img, int color_dimming_level, Color mask=colorTable.White)=0
 
virtual void DrawTextureGrayShade (float u, float v, GraphicsImage *a4)=0
 
virtual void DrawTransparentRedShade (float u, float v, GraphicsImage *a4)=0
 
virtual void DrawTransparentGreenShade (float u, float v, GraphicsImage *pTexture)=0
 
virtual void BeginTextNew (GraphicsImage *main, GraphicsImage *shadow)=0
 
virtual void EndTextNew ()=0
 
virtual void DrawTextNew (int x, int y, int w, int h, float u1, float v1, float u2, float v2, int isshadow, Color colour)=0
 
virtual void FillRectFast (int uX, int uY, int uWidth, int uHeight, Color uColor32)=0
 
virtual void DrawOutdoorBuildings ()=0
 
virtual void DrawIndoorSky (int uNumVertices, int uFaceID=0)=0
 
virtual void DrawOutdoorSky ()=0
 
virtual void PrepareDecorationsRenderList_ODM ()=0
 
virtual void DrawSpriteObjects ()=0
 
virtual void DrawOutdoorTerrain ()=0
 
virtual bool AreRenderSurfacesOk ()=0
 
virtual RgbaImage MakeViewportScreenshot (int width, int height)=0
 
virtual RgbaImage MakeFullScreenshot ()=0
 
virtual std::vector< Actor * > getActorsInViewport (int pDepth)=0
 
virtual void BeginLightmaps ()=0
 
virtual void EndLightmaps ()=0
 
virtual void BeginLightmaps2 ()=0
 
virtual void EndLightmaps2 ()=0
 
virtual bool DrawLightmap (Lightmap *pLightmap, Vec3f *pColorMult, float z_bias)=0
 
virtual void BeginDecals ()=0
 
virtual void EndDecals ()=0
 
virtual void DrawDecal (Decal *pDecal, float z_bias)=0
 
virtual void DrawSpecialEffectsQuad (GraphicsImage *texture, int palette)=0
 
virtual void DrawFromSpriteSheet (Recti *pSrcRect, Pointi *pTargetPoint, int a3, int blend_mode)=0
 
virtual void DrawIndoorFaces ()=0
 
virtual void ReleaseTerrain ()=0
 
virtual void ReleaseBSP ()=0
 
virtual void DrawTwodVerts ()=0
 
virtual Sizei GetRenderDimensions ()=0
 
virtual Sizei GetPresentDimensions ()=0
 
virtual bool Reinitialize (bool firstInit=false)=0
 
virtual bool ReloadShaders ()=0
 
virtual void DoRenderBillboards_D3D ()=0
 
virtual void flushAndScale ()=0
 
virtual void swapBuffers ()=0
 
virtual void beginOverlays ()=0
 
virtual void endOverlays ()=0
 

Protected Member Functions

unsigned int Billboard_ProbablyAddToListAndSortByZOrder (float z)
 
void TransformBillboard (const SoftwareBillboard *a2, const RenderBillboard *pBillboard)
 

Protected Attributes

Sizei outputRender = {0, 0}
 
Sizei outputPresent = {0, 0}
 

Private Member Functions

void updateRenderDimensions ()
 

Additional Inherited Members

- Public Attributes inherited from Renderer
std::shared_ptr< GameConfigconfig = nullptr
 
int * pActiveZBuffer
 
Color uFogColor
 
int hd_water_current_frame
 
GraphicsImagehd_water_tile_anim [7]
 
RenderBillboardD3D pBillboardRenderListD3D [1000]
 
unsigned int uNumBillboardsToDraw
 
int drawcalls
 
DecalBuilderdecal_builder = nullptr
 
SpellFxRendererspell_fx_renderer = nullptr
 
std::shared_ptr< ParticleEngineparticle_engine = nullptr
 
Visvis = nullptr
 

Constructor & Destructor Documentation

◆ BaseRenderer()

BaseRenderer::BaseRenderer ( std::shared_ptr< GameConfig config,
DecalBuilder decal_builder,
SpellFxRenderer spellfx,
std::shared_ptr< ParticleEngine particle_engine,
Vis vis 
)
inline

Member Function Documentation

◆ Billboard_ProbablyAddToListAndSortByZOrder()

unsigned int BaseRenderer::Billboard_ProbablyAddToListAndSortByZOrder ( float  z)
protected

◆ BillboardSphereSpellFX()

void BaseRenderer::BillboardSphereSpellFX ( SpellFX_Billboard a1,
Color  diffuse 
)
overridevirtual

Implements Renderer.

◆ ClearBlack()

void BaseRenderer::ClearBlack ( )
overridevirtual

Implements Renderer.

◆ ClearZBuffer()

void BaseRenderer::ClearZBuffer ( )
overridevirtual

Implements Renderer.

◆ CreateZBuffer()

void BaseRenderer::CreateZBuffer ( )
overridevirtual

Implements Renderer.

◆ DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene()

void BaseRenderer::DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene ( )
overridevirtual

Implements Renderer.

◆ DrawMasked()

void BaseRenderer::DrawMasked ( float  u,
float  v,
GraphicsImage img,
int  color_dimming_level,
Color  mask = colorTable.White 
)
overridevirtual

Implements Renderer.

◆ DrawMonsterPortrait()

void BaseRenderer::DrawMonsterPortrait ( Recti  rc,
SpriteFrame Portrait_Sprite,
int  Y_Offset 
)
overridevirtual

Implements Renderer.

◆ DrawSpecialEffectsQuad()

void BaseRenderer::DrawSpecialEffectsQuad ( GraphicsImage texture,
int  palette 
)
overridevirtual

Implements Renderer.

◆ DrawSpriteObjects()

void BaseRenderer::DrawSpriteObjects ( )
overridevirtual

Implements Renderer.

◆ DrawTextureGrayShade()

void BaseRenderer::DrawTextureGrayShade ( float  u,
float  v,
GraphicsImage a4 
)
overridevirtual

Implements Renderer.

◆ DrawTransparentGreenShade()

void BaseRenderer::DrawTransparentGreenShade ( float  u,
float  v,
GraphicsImage pTexture 
)
overridevirtual

Implements Renderer.

◆ DrawTransparentRedShade()

void BaseRenderer::DrawTransparentRedShade ( float  u,
float  v,
GraphicsImage a4 
)
overridevirtual

Implements Renderer.

◆ getActorsInViewport()

std::vector< Actor * > BaseRenderer::getActorsInViewport ( int  pDepth)
overridevirtual

Implements Renderer.

◆ GetGamma()

float BaseRenderer::GetGamma ( )
overridevirtual

Implements Renderer.

◆ GetPresentDimensions()

Sizei BaseRenderer::GetPresentDimensions ( )
overridevirtual

Implements Renderer.

◆ GetRenderDimensions()

Sizei BaseRenderer::GetRenderDimensions ( )
overridevirtual

Implements Renderer.

◆ Initialize()

bool BaseRenderer::Initialize ( )
overridevirtual

Implements Renderer.

Reimplemented in NullRenderer, and OpenGLRenderer.

◆ MakeParticleBillboardAndPush()

void BaseRenderer::MakeParticleBillboardAndPush ( SoftwareBillboard a2,
GraphicsImage texture,
Color  uDiffuse,
int  angle 
)
overridevirtual

Implements Renderer.

◆ PrepareDecorationsRenderList_ODM()

void BaseRenderer::PrepareDecorationsRenderList_ODM ( )
overridevirtual

Implements Renderer.

◆ PresentBlackScreen()

void BaseRenderer::PresentBlackScreen ( )
overridevirtual

Implements Renderer.

◆ Reinitialize()

bool BaseRenderer::Reinitialize ( bool  firstInit)
overridevirtual

Implements Renderer.

Reimplemented in NullRenderer, and OpenGLRenderer.

◆ TransformBillboard()

void BaseRenderer::TransformBillboard ( const SoftwareBillboard a2,
const RenderBillboard pBillboard 
)
protected

◆ TransformBillboardsAndSetPalettesODM()

void BaseRenderer::TransformBillboardsAndSetPalettesODM ( )
overridevirtual

Implements Renderer.

◆ updateRenderDimensions()

void BaseRenderer::updateRenderDimensions ( )
private

◆ ZDrawTextureAlpha()

void BaseRenderer::ZDrawTextureAlpha ( float  u,
float  v,
GraphicsImage pTexture,
int  zVal 
)
overridevirtual

Implements Renderer.

Member Data Documentation

◆ outputPresent

Sizei BaseRenderer::outputPresent = {0, 0}
protected

◆ outputRender

Sizei BaseRenderer::outputRender = {0, 0}
protected

The documentation for this class was generated from the following files: