KiCad PCB EDA Suite
Loading...
Searching...
No Matches
render_3d_opengl.cpp File Reference
#include <cstdint>
#include <gal/opengl/kiglew.h>
#include "plugins/3dapi/xv3d_types.h"
#include "render_3d_opengl.h"
#include "opengl_utils.h"
#include "common_ogl/ogl_utils.h"
#include <board.h>
#include <footprint.h>
#include <3d_math.h>
#include <glm/geometric.hpp>
#include <math/util.h>
#include <utility>
#include <vector>
#include <wx/log.h>
#include <base_units.h>

Go to the source code of this file.

Macros

#define UNITS3D_TO_UNITSPCB   ( pcbIUScale.IU_PER_MM )
 Scale conversion from 3d model units to pcb units.
 
#define DELETE_AND_FREE(ptr)
 
#define DELETE_AND_FREE_MAP(map)
 

Functions

void init_lights ()
 
static SFVEC4F premultiplyAlpha (const SFVEC4F &aInput)
 

Macro Definition Documentation

◆ DELETE_AND_FREE

#define DELETE_AND_FREE (   ptr)
Value:
{ \
delete ptr; \
ptr = nullptr; \
} \

◆ DELETE_AND_FREE_MAP

#define DELETE_AND_FREE_MAP (   map)
Value:
{ \
for( auto& [ layer, ptr ] : map ) \
delete ptr; \
\
map.clear(); \
}

◆ UNITS3D_TO_UNITSPCB

#define UNITS3D_TO_UNITSPCB   ( pcbIUScale.IU_PER_MM )

Scale conversion from 3d model units to pcb units.

Definition at line 47 of file render_3d_opengl.cpp.

Function Documentation

◆ init_lights()

void init_lights ( )

Definition at line 355 of file render_3d_opengl.cpp.

References SphericalToCartesian().

Referenced by RENDER_3D_OPENGL::initializeOpenGL().

◆ premultiplyAlpha()

static SFVEC4F premultiplyAlpha ( const SFVEC4F aInput)
inlinestatic

Definition at line 449 of file render_3d_opengl.cpp.

Referenced by RENDER_3D_OPENGL::Redraw().