Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CGraphicsGL.cpp File Reference
#include "CGraphicsGL.hpp"
#include "core/color.hpp"
#include "core/memOps.hpp"
#include "core/utils.hpp"
#include "math/CGeometry.hpp"
#include "math/CMatrix4x4.hpp"
#include "ui/graphics/IImageManager.hpp"
#include "ui/openGL/CTextureGL.hpp"
#include "utils/stringUtils.hpp"
#include <GL/gl.h>
#include <climits>
#include <cmath>
#include <unordered_map>
Include dependency graph for CGraphicsGL.cpp:

Functions

static GLvoid prvHandleError (GLenum errorCode)
 
static GLvoid prvCombineCallback (const GLdouble coords[3], GLdouble **dataOut)
 
static bool prv_isSameMaterial (const std::shared_ptr< CGraphicsGL::SPrvLayer > &layer, const iv::ui::graphics::Material *material)
 
static bool existOnlyOneMaterial (const std::vector< std::shared_ptr< CGraphicsGL::SPrvLayer > > &layers, const iv::ui::graphics::Material *material, uint64_t *index)
 
static bool prv_isNameMaterial (const std::shared_ptr< CGraphicsGL::SPrvLayer > &layer, const std::string &nameMaterial)
 
static bool prv_isLayer (const std::shared_ptr< CGraphicsGL::SPrvLayer > &layer, const std::string &nameMaterial)
 
static bool existOnlyOneNameMaterial (const std::vector< std::shared_ptr< CGraphicsGL::SPrvLayer > > &layers, const std::string &nameMaterial)
 
static void prvApplyPriority (iv::ui::graphics::Material::ePriority priority)
 
static std::shared_ptr< CGraphicsGL::SPrvLayergetOnlyOneLayer (const std::vector< std::shared_ptr< CGraphicsGL::SPrvLayer > > &layers, const std::string &layerName)
 
static GLenum prvTypeLightGL (IGraphics::ELightType typeLight)
 
static void prvEnableClient (const float *arrayVertex, const float *arrayNormals, const float *arrayTextCoordOpt, const float *rgbaOpt)
 
static void prvDisableClient (const float *arrayTextCoordOpt, const float *rgbaOpt)
 
static void prvBandTriangles (GLenum typePrimitive, const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex)
 
static void prvSetColorRGBA (iv::types::color argb)
 
static GLint getTextureWidth (GLuint idTexture)
 
static GLint getTextureHeight (GLuint idTexture)
 
static void prvDrawRectangleWithTexture (GLuint idTexture, iv::types::color currentColorARGB, double xCornerLeftDown, double yCornerLeftDown, std::optional< double > widthOpt, std::optional< double > heightOpt)
 
static void prvGetSizeWorldToPixel (const GLdouble modelMatrix[16], double xWorld, double yWorld, double *xWindow, double *yWindow)
 
static void prvDrawTextGL (const std::string &text, double x, double y, double heightText, unsigned char justify, iv::types::color colorARGB, const CFontManagerCairo *fontManager, std::map< CGraphicsGL::TextureInfo, std::list< iv::types::textureId > > &unusedCreatedTextures)
 
static bool prvIsLevelDetailHigh (IGraphics::EDetailLevel levelDetail)
 
static void prvStyleDraw (IGraphics::EDetailLevel levelDetail, GLenum *drawStyle, GLenum *normals)
 
static void prvPrepareQuadruple (GLUquadricObj *quadruple, IGraphics::EDetailLevel levelDetail)
 
static void prvNumSlideAndStacks (IGraphics::EDetailLevel levelDetail, uint64_t *numSlide, uint64_t *numStacks)
 
static void prvQuadWithNormal (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4, double Nx, double Ny, double Nz)
 
static bool prv_existBlockText (const std::vector< std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > > &textLoads, const std::string &text, double heightFont, iv::ui::eTextWeight textWeight, std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > &textLoadsFound)
 
static bool prv_isIdBlock (const std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > &blockText, const uint32_t idBlock)
 
static bool prv_ExistIdBlock (uint32_t idBlockText, const std::vector< std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > > &textLoaded, uint64_t *indBlock)
 

Variables

static const float kPrvSizeLinesMin = 2.
 

Function Documentation

◆ existOnlyOneMaterial()

static bool existOnlyOneMaterial ( const std::vector< std::shared_ptr< CGraphicsGL::SPrvLayer > > & layers,
const iv::ui::graphics::Material * material,
uint64_t * index )
static

◆ existOnlyOneNameMaterial()

static bool existOnlyOneNameMaterial ( const std::vector< std::shared_ptr< CGraphicsGL::SPrvLayer > > & layers,
const std::string & nameMaterial )
static

◆ getOnlyOneLayer()

static std::shared_ptr< CGraphicsGL::SPrvLayer > getOnlyOneLayer ( const std::vector< std::shared_ptr< CGraphicsGL::SPrvLayer > > & layers,
const std::string & layerName )
static

◆ getTextureHeight()

static GLint getTextureHeight ( GLuint idTexture)
static

◆ getTextureWidth()

static GLint getTextureWidth ( GLuint idTexture)
static

◆ prv_existBlockText()

static bool prv_existBlockText ( const std::vector< std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > > & textLoads,
const std::string & text,
double heightFont,
iv::ui::eTextWeight textWeight,
std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > & textLoadsFound )
static

◆ prv_ExistIdBlock()

static bool prv_ExistIdBlock ( uint32_t idBlockText,
const std::vector< std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > > & textLoaded,
uint64_t * indBlock )
static

◆ prv_isIdBlock()

static bool prv_isIdBlock ( const std::shared_ptr< CGraphicsGL::SPrvTextBlockGL > & blockText,
const uint32_t idBlock )
static

◆ prv_isLayer()

static bool prv_isLayer ( const std::shared_ptr< CGraphicsGL::SPrvLayer > & layer,
const std::string & nameMaterial )
static

◆ prv_isNameMaterial()

static bool prv_isNameMaterial ( const std::shared_ptr< CGraphicsGL::SPrvLayer > & layer,
const std::string & nameMaterial )
static

◆ prv_isSameMaterial()

static bool prv_isSameMaterial ( const std::shared_ptr< CGraphicsGL::SPrvLayer > & layer,
const iv::ui::graphics::Material * material )
static

◆ prvApplyPriority()

static void prvApplyPriority ( iv::ui::graphics::Material::ePriority priority)
static

◆ prvBandTriangles()

static void prvBandTriangles ( GLenum typePrimitive,
const float * points,
const float * normals,
const float * textureOpt,
const float * rgbaOpt,
uint64_t numPoints,
const uint32_t * indVertex,
uint64_t numVertex )
static

◆ prvCombineCallback()

static GLvoid prvCombineCallback ( const GLdouble coords[3],
GLdouble ** dataOut )
static

◆ prvDisableClient()

static void prvDisableClient ( const float * arrayTextCoordOpt,
const float * rgbaOpt )
static

◆ prvDrawRectangleWithTexture()

static void prvDrawRectangleWithTexture ( GLuint idTexture,
iv::types::color currentColorARGB,
double xCornerLeftDown,
double yCornerLeftDown,
std::optional< double > widthOpt,
std::optional< double > heightOpt )
static

◆ prvDrawTextGL()

static void prvDrawTextGL ( const std::string & text,
double x,
double y,
double heightText,
unsigned char justify,
iv::types::color colorARGB,
const CFontManagerCairo * fontManager,
std::map< CGraphicsGL::TextureInfo, std::list< iv::types::textureId > > & unusedCreatedTextures )
static

◆ prvEnableClient()

static void prvEnableClient ( const float * arrayVertex,
const float * arrayNormals,
const float * arrayTextCoordOpt,
const float * rgbaOpt )
static

◆ prvGetSizeWorldToPixel()

static void prvGetSizeWorldToPixel ( const GLdouble modelMatrix[16],
double xWorld,
double yWorld,
double * xWindow,
double * yWindow )
static

◆ prvHandleError()

static GLvoid prvHandleError ( GLenum errorCode)
static

◆ prvIsLevelDetailHigh()

static bool prvIsLevelDetailHigh ( IGraphics::EDetailLevel levelDetail)
static

◆ prvNumSlideAndStacks()

static void prvNumSlideAndStacks ( IGraphics::EDetailLevel levelDetail,
uint64_t * numSlide,
uint64_t * numStacks )
static

◆ prvPrepareQuadruple()

static void prvPrepareQuadruple ( GLUquadricObj * quadruple,
IGraphics::EDetailLevel levelDetail )
static

◆ prvQuadWithNormal()

static void prvQuadWithNormal ( double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3,
double x4,
double y4,
double z4,
double Nx,
double Ny,
double Nz )
static

◆ prvSetColorRGBA()

static void prvSetColorRGBA ( iv::types::color argb)
static

◆ prvStyleDraw()

static void prvStyleDraw ( IGraphics::EDetailLevel levelDetail,
GLenum * drawStyle,
GLenum * normals )
static

◆ prvTypeLightGL()

static GLenum prvTypeLightGL ( IGraphics::ELightType typeLight)
static

Variable Documentation

◆ kPrvSizeLinesMin

const float kPrvSizeLinesMin = 2.
static