Open3D (C++ API)  0.18.0+252c867
Public Member Functions | Protected Member Functions | Protected Attributes
open3d::visualization::glsl::TexturePhongShader Class Referenceabstract

#include <TexturePhongShader.h>

Inheritance diagram for open3d::visualization::glsl::TexturePhongShader:
open3d::visualization::glsl::ShaderWrapper open3d::visualization::glsl::TexturePhongShaderForTriangleMesh

Public Member Functions

 ~TexturePhongShader () override
 
- Public Member Functions inherited from open3d::visualization::glsl::ShaderWrapper
virtual ~ShaderWrapper ()
 
 ShaderWrapper (const ShaderWrapper &)=delete
 
ShaderWrapperoperator= (const ShaderWrapper &)=delete
 
bool Render (const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view)
 
void InvalidateGeometry ()
 
const std::string & GetShaderName () const
 
void PrintShaderWarning (const std::string &message) const
 

Protected Member Functions

 TexturePhongShader (const std::string &name)
 
bool Compile () final
 
void Release () final
 
bool BindGeometry (const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view) final
 
bool RenderGeometry (const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view) final
 
void UnbindGeometry () final
 
virtual bool PrepareRendering (const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view)=0
 
virtual bool PrepareBinding (const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view, std::vector< Eigen::Vector3f > &points, std::vector< Eigen::Vector3f > &normals, std::vector< Eigen::Vector2f > &uvs)=0
 
void SetLighting (const ViewControl &view, const RenderOption &option)
 
- Protected Member Functions inherited from open3d::visualization::glsl::ShaderWrapper
 ShaderWrapper (const std::string &name)
 
bool ValidateShader (GLuint shader_index)
 
bool ValidateProgram (GLuint program_index)
 
bool CompileShaders (const char *const vertex_shader_code, const char *const geometry_shader_code, const char *const fragment_shader_code)
 
void ReleaseProgram ()
 
void SetShaderName (const std::string &shader_name)
 

Protected Attributes

GLuint vertex_position_
 
GLuint vertex_uv_
 
GLuint vertex_normal_
 
GLuint MVP_
 
GLuint V_
 
GLuint M_
 
GLuint light_position_world_
 
GLuint light_color_
 
GLuint light_diffuse_power_
 
GLuint light_specular_power_
 
GLuint light_specular_shininess_
 
GLuint light_ambient_
 
GLuint diffuse_texture_
 
int num_materials_
 
std::vector< int > array_offsets_
 
std::vector< GLsizei > draw_array_sizes_
 
std::vector< GLuint > vertex_position_buffers_
 
std::vector< GLuint > vertex_uv_buffers_
 
std::vector< GLuint > vertex_normal_buffers_
 
std::vector< GLuint > diffuse_texture_buffers_
 
gl_util::GLMatrix4f light_position_world_data_
 
gl_util::GLMatrix4f light_color_data_
 
gl_util::GLVector4f light_diffuse_power_data_
 
gl_util::GLVector4f light_specular_power_data_
 
gl_util::GLVector4f light_specular_shininess_data_
 
gl_util::GLVector4f light_ambient_data_
 
- Protected Attributes inherited from open3d::visualization::glsl::ShaderWrapper
GLuint vertex_shader_ = 0
 
GLuint geometry_shader_ = 0
 
GLuint fragment_shader_ = 0
 
GLuint program_ = 0
 
GLenum draw_arrays_mode_ = GL_POINTS
 
GLsizei draw_arrays_size_ = 0
 
bool compiled_ = false
 
bool bound_ = false
 

Constructor & Destructor Documentation

◆ ~TexturePhongShader()

open3d::visualization::glsl::TexturePhongShader::~TexturePhongShader ( )
inlineoverride

◆ TexturePhongShader()

open3d::visualization::glsl::TexturePhongShader::TexturePhongShader ( const std::string &  name)
inlineprotected

Member Function Documentation

◆ BindGeometry()

bool open3d::visualization::glsl::TexturePhongShader::BindGeometry ( const geometry::Geometry geometry,
const RenderOption option,
const ViewControl view 
)
finalprotectedvirtual

◆ Compile()

bool open3d::visualization::glsl::TexturePhongShader::Compile ( )
finalprotectedvirtual

Function to compile shader In a derived class, this must be declared as final, and called from the constructor.

Implements open3d::visualization::glsl::ShaderWrapper.

◆ PrepareBinding()

virtual bool open3d::visualization::glsl::TexturePhongShader::PrepareBinding ( const geometry::Geometry geometry,
const RenderOption option,
const ViewControl view,
std::vector< Eigen::Vector3f > &  points,
std::vector< Eigen::Vector3f > &  normals,
std::vector< Eigen::Vector2f > &  uvs 
)
protectedpure virtual

◆ PrepareRendering()

virtual bool open3d::visualization::glsl::TexturePhongShader::PrepareRendering ( const geometry::Geometry geometry,
const RenderOption option,
const ViewControl view 
)
protectedpure virtual

◆ Release()

void open3d::visualization::glsl::TexturePhongShader::Release ( )
finalprotectedvirtual

Function to release resource In a derived class, this must be declared as final, and called from the destructor.

Implements open3d::visualization::glsl::ShaderWrapper.

◆ RenderGeometry()

bool open3d::visualization::glsl::TexturePhongShader::RenderGeometry ( const geometry::Geometry geometry,
const RenderOption option,
const ViewControl view 
)
finalprotectedvirtual

◆ SetLighting()

void open3d::visualization::glsl::TexturePhongShader::SetLighting ( const ViewControl view,
const RenderOption option 
)
protected

◆ UnbindGeometry()

void open3d::visualization::glsl::TexturePhongShader::UnbindGeometry ( )
finalprotectedvirtual

Field Documentation

◆ array_offsets_

std::vector<int> open3d::visualization::glsl::TexturePhongShader::array_offsets_
protected

◆ diffuse_texture_

GLuint open3d::visualization::glsl::TexturePhongShader::diffuse_texture_
protected

◆ diffuse_texture_buffers_

std::vector<GLuint> open3d::visualization::glsl::TexturePhongShader::diffuse_texture_buffers_
protected

◆ draw_array_sizes_

std::vector<GLsizei> open3d::visualization::glsl::TexturePhongShader::draw_array_sizes_
protected

◆ light_ambient_

GLuint open3d::visualization::glsl::TexturePhongShader::light_ambient_
protected

◆ light_ambient_data_

gl_util::GLVector4f open3d::visualization::glsl::TexturePhongShader::light_ambient_data_
protected

◆ light_color_

GLuint open3d::visualization::glsl::TexturePhongShader::light_color_
protected

◆ light_color_data_

gl_util::GLMatrix4f open3d::visualization::glsl::TexturePhongShader::light_color_data_
protected

◆ light_diffuse_power_

GLuint open3d::visualization::glsl::TexturePhongShader::light_diffuse_power_
protected

◆ light_diffuse_power_data_

gl_util::GLVector4f open3d::visualization::glsl::TexturePhongShader::light_diffuse_power_data_
protected

◆ light_position_world_

GLuint open3d::visualization::glsl::TexturePhongShader::light_position_world_
protected

◆ light_position_world_data_

gl_util::GLMatrix4f open3d::visualization::glsl::TexturePhongShader::light_position_world_data_
protected

◆ light_specular_power_

GLuint open3d::visualization::glsl::TexturePhongShader::light_specular_power_
protected

◆ light_specular_power_data_

gl_util::GLVector4f open3d::visualization::glsl::TexturePhongShader::light_specular_power_data_
protected

◆ light_specular_shininess_

GLuint open3d::visualization::glsl::TexturePhongShader::light_specular_shininess_
protected

◆ light_specular_shininess_data_

gl_util::GLVector4f open3d::visualization::glsl::TexturePhongShader::light_specular_shininess_data_
protected

◆ M_

GLuint open3d::visualization::glsl::TexturePhongShader::M_
protected

◆ MVP_

GLuint open3d::visualization::glsl::TexturePhongShader::MVP_
protected

◆ num_materials_

int open3d::visualization::glsl::TexturePhongShader::num_materials_
protected

◆ V_

GLuint open3d::visualization::glsl::TexturePhongShader::V_
protected

◆ vertex_normal_

GLuint open3d::visualization::glsl::TexturePhongShader::vertex_normal_
protected

◆ vertex_normal_buffers_

std::vector<GLuint> open3d::visualization::glsl::TexturePhongShader::vertex_normal_buffers_
protected

◆ vertex_position_

GLuint open3d::visualization::glsl::TexturePhongShader::vertex_position_
protected

◆ vertex_position_buffers_

std::vector<GLuint> open3d::visualization::glsl::TexturePhongShader::vertex_position_buffers_
protected

◆ vertex_uv_

GLuint open3d::visualization::glsl::TexturePhongShader::vertex_uv_
protected

◆ vertex_uv_buffers_

std::vector<GLuint> open3d::visualization::glsl::TexturePhongShader::vertex_uv_buffers_
protected

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