22 #ifndef STARK_GFX_OPENGL_S_ACTOR_H 23 #define STARK_GFX_OPENGL_S_ACTOR_H 25 #include "engines/stark/gfx/renderentry.h" 26 #include "engines/stark/visual/actor.h" 28 #include "common/hashmap.h" 29 #include "common/hash-ptr.h" 31 #include "graphics/opengl/system_headers.h" 33 #if defined(USE_OPENGL_SHADERS) 44 class OpenGLSActorRenderer :
public VisualActor {
46 OpenGLSActorRenderer(OpenGLSDriver *gfx);
47 virtual ~OpenGLSActorRenderer();
49 void render(
const Math::Vector3d &position,
float direction,
const LightEntryArray &lights)
override;
58 FaceBufferMap _faceEBO;
61 void uploadVertices();
62 GLuint createModelVBO(
const Model *model);
63 GLuint createFaceEBO(
const Face *face);
64 void setBonePositionArrayUniform(
OpenGL::Shader *shader,
const char *uniform);
65 void setBoneRotationArrayUniform(
OpenGL::Shader *shader,
const char *uniform);
66 void setLightArrayUniform(
const LightEntryArray &lights);
68 void setShadowUniform(
const LightEntryArray &lights,
const Math::Vector3d &actorPosition, Math::Matrix3 worldToModelRot);
70 bool getPointLightContribution(LightEntry *light,
const Math::Vector3d &actorPosition,
71 Math::Vector3d &direction,
float weight = 1.0f);
72 bool getDirectionalLightContribution(LightEntry *light, Math::Vector3d &direction);
73 bool getSpotLightContribution(LightEntry *light,
const Math::Vector3d &actorPosition, Math::Vector3d &direction);
79 #endif // defined(USE_OPENGL_SHADERS) 81 #endif // STARK_GFX_OPENGL_S_ACTOR_H
Definition: renderbuffer.h:27