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

#include <OpenGLRenderer.h>

Inheritance diagram for OpenGLRenderer:
BaseRenderer Renderer

Public Member Functions

 OpenGLRenderer (std::shared_ptr< GameConfig > config, DecalBuilder *decal_builder, SpellFxRenderer *spellfx, std::shared_ptr< ParticleEngine > particle_engine, Vis *vis)
 
virtual ~OpenGLRenderer ()
 
virtual bool Initialize () override
 
virtual RgbaImage ReadScreenPixels () override
 
virtual void ClearTarget (Color uColor) override
 
virtual void Present () override
 
virtual bool InitializeFullscreen () override
 
virtual void Release () override
 
virtual bool SwitchToWindow () override
 
virtual void BeginLines2D () override
 
virtual void EndLines2D () override
 
virtual void RasterLine2D (Pointi a, Pointi b, Color uColor32) override
 
virtual void DrawLines (const RenderVertexD3D3 *vertices, int num_vertices) override
 
virtual void RestoreFrontBuffer () override
 
virtual void RestoreBackBuffer () override
 
virtual void BltBackToFontFast (int a2, int a3, Recti *pSrcRect) override
 
virtual void BeginScene3D () override
 
virtual void DrawProjectile (float srcX, float srcY, float a3, float a4, float dstX, float dstY, float a7, float a8, GraphicsImage *texture) override
 
virtual TextureRenderId CreateTexture (RgbaImageView image) override
 
virtual void DeleteTexture (TextureRenderId id) override
 
virtual void UpdateTexture (TextureRenderId id, RgbaImageView image) override
 
virtual void Update_Texture (GraphicsImage *texture) override
 
virtual void BeginScene2D () override
 
virtual void ScreenFade (Color color, float t) override
 
virtual void SetUIClipRect (const Recti &rect) override
 
virtual void ResetUIClipRect () override
 
virtual void DrawTextureNew (float u, float v, GraphicsImage *, Color colourmask=colorTable.White) override
 
virtual void DrawTextureCustomHeight (float u, float v, GraphicsImage *, int height) override
 
virtual void DrawTextureOffset (int x, int y, int offset_x, int offset_y, GraphicsImage *) override
 
virtual void DrawImage (GraphicsImage *, const Recti &rect, int paletteid=0, Color colourmask=colorTable.White) override
 
virtual void BlendTextures (int a2, int a3, GraphicsImage *a4, GraphicsImage *a5, int t, int start_opacity, int end_opacity) override
 
virtual void TexturePixelRotateDraw (float u, float v, GraphicsImage *img, int time) override
 
virtual void BeginTextNew (GraphicsImage *main, GraphicsImage *shadow) override
 
virtual void EndTextNew () override
 
virtual void DrawTextNew (int x, int y, int w, int h, float u1, float v1, float u2, float v2, int isshadow, Color colour) override
 
virtual void FillRectFast (int x, int y, int width, int height, Color color) override
 
virtual void DrawOutdoorBuildings () override
 
virtual void DrawIndoorSky (int uNumVertices, int uFaceID) override
 
virtual void DrawOutdoorSky () override
 
virtual void DrawOutdoorTerrain () override
 
virtual bool AreRenderSurfacesOk () override
 
virtual RgbaImage MakeViewportScreenshot (const int width, const int height) override
 
virtual RgbaImage MakeFullScreenshot () override
 
virtual void BeginLightmaps () override
 
virtual void EndLightmaps () override
 
virtual void BeginLightmaps2 () override
 
virtual void EndLightmaps2 () override
 
virtual bool DrawLightmap (Lightmap *pLightmap, Vec3f *pColorMult, float z_bias) override
 
virtual void BeginDecals () override
 
virtual void EndDecals () override
 
virtual void DrawDecal (Decal *pDecal, float z_bias) override
 
virtual void DrawFromSpriteSheet (Recti *pSrcRect, Pointi *pTargetPoint, int a3, int blend_mode) override
 
virtual void DrawIndoorFaces () override
 
virtual void ReleaseTerrain () override
 
virtual void ReleaseBSP () override
 
virtual void DrawTwodVerts () override
 
void DrawBillboards ()
 
virtual bool Reinitialize (bool firstInit) override
 
virtual bool ReloadShaders () override
 
virtual void flushAndScale () override
 
virtual void swapBuffers () override
 
virtual void beginOverlays () override
 
virtual void endOverlays () override
 
- Public Member Functions inherited from BaseRenderer
 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

virtual void DoRenderBillboards_D3D () override
 
void SetBillboardBlendOptions (RenderBillboardD3D::OpacityType a1)
 
void DrawOutdoorSkyPolygon (int numVertices, GraphicsImage *texture, int dimmingLevel)
 
void DrawIndoorSkyPolygon (int uNumVertices, GraphicsImage *texture, int dimmingLevel)
 
void DrawForcePerVerts ()
 
void SetFogParametersGL ()
 
void _initImGui ()
 
void _shutdownImGui ()
 
void _set_3d_projection_matrix ()
 
void _set_3d_modelview_matrix ()
 
void _set_ortho_projection (bool gameviewport=false)
 
void _set_ortho_modelview ()
 
- Protected Member Functions inherited from BaseRenderer
unsigned int Billboard_ProbablyAddToListAndSortByZOrder (float z)
 
void TransformBillboard (const SoftwareBillboard *a2, const RenderBillboard *pBillboard)
 

Protected Attributes

FrameLimiter _frameLimiter
 
glm::mat4 projmat = glm::mat4x4(1)
 
glm::mat4 viewmat = glm::mat4x4(1)
 
Recti clipRect
 
int GL_lastboundtex {}
 
int GPU_MAX_TEX_SIZE {}
 
int GPU_MAX_TEX_LAYERS {}
 
int GPU_MAX_TEX_UNITS {}
 
int GPU_MAX_UNIFORM_COMP {}
 
int GPU_MAX_TOTAL_TEXTURES {}
 
OpenGLShader terrainshader
 
OpenGLShader outbuildshader
 
OpenGLShader bspshader
 
OpenGLShader textshader
 
OpenGLShader lineshader
 
OpenGLShader twodshader
 
OpenGLShader billbshader
 
OpenGLShader decalshader
 
OpenGLShader forcepershader
 
GLuint terrainVBO {}
 
GLuint terrainVAO {}
 
GLuint terraintextures [8] {}
 
unsigned int numterraintexloaded [8] {}
 
unsigned int terraintexturesizes [8] {}
 
std::map< std::string, int > terraintexmap
 
GLuint outbuildVBO [16] {}
 
GLuint outbuildVAO [16] {}
 
GLuint outbuildtextures [16] {}
 
unsigned int numoutbuildtexloaded [16] {}
 
unsigned int outbuildtexturewidths [16] {}
 
unsigned int outbuildtextureheights [16] {}
 
std::map< std::string, int > outbuildtexmap
 
GLuint bspVBO [16] {}
 
GLuint bspVAO [16] {}
 
GLuint bsptextures [16] {}
 
unsigned int bsptexloaded [16] {}
 
unsigned int bsptexturewidths [16] {}
 
unsigned int bsptextureheights [16] {}
 
std::map< std::string, int > bsptexmap
 
GLuint textVBO {}
 
GLuint textVAO {}
 
GLuint texmain {}
 
GLuint texshadow {}
 
GLuint lineVBO {}
 
GLuint lineVAO {}
 
GLuint twodVBO {}
 
GLuint twodVAO {}
 
GLuint billbVBO {}
 
GLuint billbVAO {}
 
GLuint palbuf {}
 
GLuint paltex {}
 
GLuint decalVBO {}
 
GLuint decalVAO {}
 
GLuint forceperVBO {}
 
GLuint forceperVAO {}
 
Colorf fog
 
int fogstart {}
 
int fogmiddle {}
 
int fogend {}
 
float gamma {}
 
- Protected Attributes inherited from BaseRenderer
Sizei outputRender = {0, 0}
 
Sizei outputPresent = {0, 0}
 

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

◆ OpenGLRenderer()

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

◆ ~OpenGLRenderer()

OpenGLRenderer::~OpenGLRenderer ( )
virtual

Member Function Documentation

◆ _initImGui()

void OpenGLRenderer::_initImGui ( )
protected

◆ _set_3d_modelview_matrix()

void OpenGLRenderer::_set_3d_modelview_matrix ( )
protected

◆ _set_3d_projection_matrix()

void OpenGLRenderer::_set_3d_projection_matrix ( )
protected

◆ _set_ortho_modelview()

void OpenGLRenderer::_set_ortho_modelview ( )
protected

◆ _set_ortho_projection()

void OpenGLRenderer::_set_ortho_projection ( bool  gameviewport = false)
protected

◆ _shutdownImGui()

void OpenGLRenderer::_shutdownImGui ( )
protected

◆ AreRenderSurfacesOk()

bool OpenGLRenderer::AreRenderSurfacesOk ( )
overridevirtual

Implements Renderer.

◆ BeginDecals()

void OpenGLRenderer::BeginDecals ( )
overridevirtual

Implements Renderer.

◆ BeginLightmaps()

void OpenGLRenderer::BeginLightmaps ( )
overridevirtual

Implements Renderer.

◆ BeginLightmaps2()

void OpenGLRenderer::BeginLightmaps2 ( )
overridevirtual

Implements Renderer.

◆ BeginLines2D()

void OpenGLRenderer::BeginLines2D ( )
overridevirtual

Implements Renderer.

◆ beginOverlays()

void OpenGLRenderer::beginOverlays ( )
overridevirtual

Implements Renderer.

◆ BeginScene2D()

void OpenGLRenderer::BeginScene2D ( )
overridevirtual

Implements Renderer.

◆ BeginScene3D()

void OpenGLRenderer::BeginScene3D ( )
overridevirtual

Implements Renderer.

◆ BeginTextNew()

void OpenGLRenderer::BeginTextNew ( GraphicsImage main,
GraphicsImage shadow 
)
overridevirtual

Implements Renderer.

◆ BlendTextures()

void OpenGLRenderer::BlendTextures ( int  a2,
int  a3,
GraphicsImage a4,
GraphicsImage a5,
int  t,
int  start_opacity,
int  end_opacity 
)
overridevirtual

Implements Renderer.

◆ BltBackToFontFast()

void OpenGLRenderer::BltBackToFontFast ( int  a2,
int  a3,
Recti pSrcRect 
)
overridevirtual

Implements Renderer.

◆ ClearTarget()

void OpenGLRenderer::ClearTarget ( Color  uColor)
overridevirtual

Implements Renderer.

◆ CreateTexture()

TextureRenderId OpenGLRenderer::CreateTexture ( RgbaImageView  image)
overridevirtual

Implements Renderer.

◆ DeleteTexture()

void OpenGLRenderer::DeleteTexture ( TextureRenderId  id)
overridevirtual

Implements Renderer.

◆ DoRenderBillboards_D3D()

void OpenGLRenderer::DoRenderBillboards_D3D ( )
overrideprotectedvirtual

Implements Renderer.

◆ DrawBillboards()

void OpenGLRenderer::DrawBillboards ( )

◆ DrawDecal()

void OpenGLRenderer::DrawDecal ( Decal pDecal,
float  z_bias 
)
overridevirtual

Implements Renderer.

◆ DrawForcePerVerts()

void OpenGLRenderer::DrawForcePerVerts ( )
protected

◆ DrawFromSpriteSheet()

void OpenGLRenderer::DrawFromSpriteSheet ( Recti pSrcRect,
Pointi pTargetPoint,
int  a3,
int  blend_mode 
)
overridevirtual

Implements Renderer.

◆ DrawImage()

void OpenGLRenderer::DrawImage ( GraphicsImage img,
const Recti rect,
int  paletteid = 0,
Color  colourmask = colorTable.White 
)
overridevirtual

Implements Renderer.

◆ DrawIndoorFaces()

void OpenGLRenderer::DrawIndoorFaces ( )
overridevirtual

Implements Renderer.

◆ DrawIndoorSky()

void OpenGLRenderer::DrawIndoorSky ( int  uNumVertices,
int  uFaceID 
)
overridevirtual

Implements Renderer.

◆ DrawIndoorSkyPolygon()

void OpenGLRenderer::DrawIndoorSkyPolygon ( int  uNumVertices,
GraphicsImage texture,
int  dimmingLevel 
)
protected

◆ DrawLightmap()

bool OpenGLRenderer::DrawLightmap ( Lightmap *  pLightmap,
Vec3f pColorMult,
float  z_bias 
)
overridevirtual

Implements Renderer.

◆ DrawLines()

void OpenGLRenderer::DrawLines ( const RenderVertexD3D3 vertices,
int  num_vertices 
)
overridevirtual

Implements Renderer.

◆ DrawOutdoorBuildings()

void OpenGLRenderer::DrawOutdoorBuildings ( )
overridevirtual

Implements Renderer.

◆ DrawOutdoorSky()

void OpenGLRenderer::DrawOutdoorSky ( )
overridevirtual

Implements Renderer.

◆ DrawOutdoorSkyPolygon()

void OpenGLRenderer::DrawOutdoorSkyPolygon ( int  numVertices,
GraphicsImage texture,
int  dimmingLevel 
)
protected

◆ DrawOutdoorTerrain()

void OpenGLRenderer::DrawOutdoorTerrain ( )
overridevirtual

Implements Renderer.

◆ DrawProjectile()

void OpenGLRenderer::DrawProjectile ( float  srcX,
float  srcY,
float  a3,
float  a4,
float  dstX,
float  dstY,
float  a7,
float  a8,
GraphicsImage texture 
)
overridevirtual

Implements Renderer.

◆ DrawTextNew()

void OpenGLRenderer::DrawTextNew ( int  x,
int  y,
int  w,
int  h,
float  u1,
float  v1,
float  u2,
float  v2,
int  isshadow,
Color  colour 
)
overridevirtual

Implements Renderer.

◆ DrawTextureCustomHeight()

void OpenGLRenderer::DrawTextureCustomHeight ( float  u,
float  v,
GraphicsImage img,
int  height 
)
overridevirtual

Implements Renderer.

◆ DrawTextureNew()

void OpenGLRenderer::DrawTextureNew ( float  u,
float  v,
GraphicsImage tex,
Color  colourmask = colorTable.White 
)
overridevirtual

Implements Renderer.

◆ DrawTextureOffset()

void OpenGLRenderer::DrawTextureOffset ( int  x,
int  y,
int  offset_x,
int  offset_y,
GraphicsImage pTexture 
)
overridevirtual

Implements Renderer.

◆ DrawTwodVerts()

void OpenGLRenderer::DrawTwodVerts ( )
overridevirtual

Implements Renderer.

◆ EndDecals()

void OpenGLRenderer::EndDecals ( )
overridevirtual

Implements Renderer.

◆ EndLightmaps()

void OpenGLRenderer::EndLightmaps ( )
overridevirtual

Implements Renderer.

◆ EndLightmaps2()

void OpenGLRenderer::EndLightmaps2 ( )
overridevirtual

Implements Renderer.

◆ EndLines2D()

void OpenGLRenderer::EndLines2D ( )
overridevirtual

Implements Renderer.

◆ endOverlays()

void OpenGLRenderer::endOverlays ( )
overridevirtual

Implements Renderer.

◆ EndTextNew()

void OpenGLRenderer::EndTextNew ( )
overridevirtual

Implements Renderer.

◆ FillRectFast()

void OpenGLRenderer::FillRectFast ( int  x,
int  y,
int  width,
int  height,
Color  color 
)
overridevirtual

Implements Renderer.

◆ flushAndScale()

void OpenGLRenderer::flushAndScale ( )
overridevirtual

Implements Renderer.

◆ Initialize()

bool OpenGLRenderer::Initialize ( )
overridevirtual

Reimplemented from BaseRenderer.

◆ InitializeFullscreen()

bool OpenGLRenderer::InitializeFullscreen ( )
overridevirtual

Implements Renderer.

◆ MakeFullScreenshot()

RgbaImage OpenGLRenderer::MakeFullScreenshot ( )
overridevirtual

Implements Renderer.

◆ MakeViewportScreenshot()

RgbaImage OpenGLRenderer::MakeViewportScreenshot ( const int  width,
const int  height 
)
overridevirtual

Takes a screenshot of the game viewport, w/o the UI elements.

Parameters
widthRequired width
heightRequired height.
Returns
Taken screenshot image.

Implements Renderer.

◆ Present()

void OpenGLRenderer::Present ( )
overridevirtual

Implements Renderer.

◆ RasterLine2D()

void OpenGLRenderer::RasterLine2D ( Pointi  a,
Pointi  b,
Color  uColor32 
)
overridevirtual

Implements Renderer.

◆ ReadScreenPixels()

RgbaImage OpenGLRenderer::ReadScreenPixels ( )
overridevirtual

Implements Renderer.

◆ Reinitialize()

bool OpenGLRenderer::Reinitialize ( bool  firstInit)
overridevirtual

Reimplemented from BaseRenderer.

◆ Release()

void OpenGLRenderer::Release ( )
overridevirtual

Implements Renderer.

◆ ReleaseBSP()

void OpenGLRenderer::ReleaseBSP ( )
overridevirtual

Implements Renderer.

◆ ReleaseTerrain()

void OpenGLRenderer::ReleaseTerrain ( )
overridevirtual

Implements Renderer.

◆ ReloadShaders()

bool OpenGLRenderer::ReloadShaders ( )
overridevirtual

Implements Renderer.

◆ ResetUIClipRect()

void OpenGLRenderer::ResetUIClipRect ( )
overridevirtual

Implements Renderer.

◆ RestoreBackBuffer()

void OpenGLRenderer::RestoreBackBuffer ( )
overridevirtual

Implements Renderer.

◆ RestoreFrontBuffer()

void OpenGLRenderer::RestoreFrontBuffer ( )
overridevirtual

Implements Renderer.

◆ ScreenFade()

void OpenGLRenderer::ScreenFade ( Color  color,
float  t 
)
overridevirtual

Implements Renderer.

◆ SetBillboardBlendOptions()

void OpenGLRenderer::SetBillboardBlendOptions ( RenderBillboardD3D::OpacityType  a1)
protected

◆ SetFogParametersGL()

void OpenGLRenderer::SetFogParametersGL ( )
protected

◆ SetUIClipRect()

void OpenGLRenderer::SetUIClipRect ( const Recti rect)
overridevirtual

Implements Renderer.

◆ swapBuffers()

void OpenGLRenderer::swapBuffers ( )
overridevirtual

Implements Renderer.

◆ SwitchToWindow()

bool OpenGLRenderer::SwitchToWindow ( )
overridevirtual

Implements Renderer.

◆ TexturePixelRotateDraw()

void OpenGLRenderer::TexturePixelRotateDraw ( float  u,
float  v,
GraphicsImage img,
int  time 
)
overridevirtual

Implements Renderer.

◆ Update_Texture()

void OpenGLRenderer::Update_Texture ( GraphicsImage texture)
overridevirtual

Implements Renderer.

◆ UpdateTexture()

void OpenGLRenderer::UpdateTexture ( TextureRenderId  id,
RgbaImageView  image 
)
overridevirtual

Implements Renderer.

Member Data Documentation

◆ _frameLimiter

FrameLimiter OpenGLRenderer::_frameLimiter
protected

◆ billbshader

OpenGLShader OpenGLRenderer::billbshader
protected

◆ billbVAO

GLuint OpenGLRenderer::billbVAO {}
protected

◆ billbVBO

GLuint OpenGLRenderer::billbVBO {}
protected

◆ bspshader

OpenGLShader OpenGLRenderer::bspshader
protected

◆ bsptexloaded

unsigned int OpenGLRenderer::bsptexloaded[16] {}
protected

◆ bsptexmap

std::map<std::string, int> OpenGLRenderer::bsptexmap
protected

◆ bsptextureheights

unsigned int OpenGLRenderer::bsptextureheights[16] {}
protected

◆ bsptextures

GLuint OpenGLRenderer::bsptextures[16] {}
protected

◆ bsptexturewidths

unsigned int OpenGLRenderer::bsptexturewidths[16] {}
protected

◆ bspVAO

GLuint OpenGLRenderer::bspVAO[16] {}
protected

◆ bspVBO

GLuint OpenGLRenderer::bspVBO[16] {}
protected

◆ clipRect

Recti OpenGLRenderer::clipRect
protected

◆ decalshader

OpenGLShader OpenGLRenderer::decalshader
protected

◆ decalVAO

GLuint OpenGLRenderer::decalVAO {}
protected

◆ decalVBO

GLuint OpenGLRenderer::decalVBO {}
protected

◆ fog

Colorf OpenGLRenderer::fog
protected

◆ fogend

int OpenGLRenderer::fogend {}
protected

◆ fogmiddle

int OpenGLRenderer::fogmiddle {}
protected

◆ fogstart

int OpenGLRenderer::fogstart {}
protected

◆ forcepershader

OpenGLShader OpenGLRenderer::forcepershader
protected

◆ forceperVAO

GLuint OpenGLRenderer::forceperVAO {}
protected

◆ forceperVBO

GLuint OpenGLRenderer::forceperVBO {}
protected

◆ gamma

float OpenGLRenderer::gamma {}
protected

◆ GL_lastboundtex

int OpenGLRenderer::GL_lastboundtex {}
protected

◆ GPU_MAX_TEX_LAYERS

int OpenGLRenderer::GPU_MAX_TEX_LAYERS {}
protected

◆ GPU_MAX_TEX_SIZE

int OpenGLRenderer::GPU_MAX_TEX_SIZE {}
protected

◆ GPU_MAX_TEX_UNITS

int OpenGLRenderer::GPU_MAX_TEX_UNITS {}
protected

◆ GPU_MAX_TOTAL_TEXTURES

int OpenGLRenderer::GPU_MAX_TOTAL_TEXTURES {}
protected

◆ GPU_MAX_UNIFORM_COMP

int OpenGLRenderer::GPU_MAX_UNIFORM_COMP {}
protected

◆ lineshader

OpenGLShader OpenGLRenderer::lineshader
protected

◆ lineVAO

GLuint OpenGLRenderer::lineVAO {}
protected

◆ lineVBO

GLuint OpenGLRenderer::lineVBO {}
protected

◆ numoutbuildtexloaded

unsigned int OpenGLRenderer::numoutbuildtexloaded[16] {}
protected

◆ numterraintexloaded

unsigned int OpenGLRenderer::numterraintexloaded[8] {}
protected

◆ outbuildshader

OpenGLShader OpenGLRenderer::outbuildshader
protected

◆ outbuildtexmap

std::map<std::string, int> OpenGLRenderer::outbuildtexmap
protected

◆ outbuildtextureheights

unsigned int OpenGLRenderer::outbuildtextureheights[16] {}
protected

◆ outbuildtextures

GLuint OpenGLRenderer::outbuildtextures[16] {}
protected

◆ outbuildtexturewidths

unsigned int OpenGLRenderer::outbuildtexturewidths[16] {}
protected

◆ outbuildVAO

GLuint OpenGLRenderer::outbuildVAO[16] {}
protected

◆ outbuildVBO

GLuint OpenGLRenderer::outbuildVBO[16] {}
protected

◆ palbuf

GLuint OpenGLRenderer::palbuf {}
protected

◆ paltex

GLuint OpenGLRenderer::paltex {}
protected

◆ projmat

glm::mat4 OpenGLRenderer::projmat = glm::mat4x4(1)
protected

◆ terrainshader

OpenGLShader OpenGLRenderer::terrainshader
protected

◆ terraintexmap

std::map<std::string, int> OpenGLRenderer::terraintexmap
protected

◆ terraintextures

GLuint OpenGLRenderer::terraintextures[8] {}
protected

◆ terraintexturesizes

unsigned int OpenGLRenderer::terraintexturesizes[8] {}
protected

◆ terrainVAO

GLuint OpenGLRenderer::terrainVAO {}
protected

◆ terrainVBO

GLuint OpenGLRenderer::terrainVBO {}
protected

◆ texmain

GLuint OpenGLRenderer::texmain {}
protected

◆ texshadow

GLuint OpenGLRenderer::texshadow {}
protected

◆ textshader

OpenGLShader OpenGLRenderer::textshader
protected

◆ textVAO

GLuint OpenGLRenderer::textVAO {}
protected

◆ textVBO

GLuint OpenGLRenderer::textVBO {}
protected

◆ twodshader

OpenGLShader OpenGLRenderer::twodshader
protected

◆ twodVAO

GLuint OpenGLRenderer::twodVAO {}
protected

◆ twodVBO

GLuint OpenGLRenderer::twodVBO {}
protected

◆ viewmat

glm::mat4 OpenGLRenderer::viewmat = glm::mat4x4(1)
protected

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