48 Renderer* renderer = pipe->getRenderer();
53 if( !GLEW_ARB_shader_objects )
55 setError( ERROR_EVOLVE_ARB_SHADER_OBJECTS_MISSING );
58 if( !GLEW_EXT_blend_func_separate )
60 setError( ERROR_EVOLVE_EXT_BLEND_FUNC_SEPARATE_MISSING );
63 if( !GLEW_ARB_multitexture )
65 setError( ERROR_EVOLVE_ARB_MULTITEXTURE_MISSING );
69 glEnable( GL_SCISSOR_TEST );
71 glClear( GL_COLOR_BUFFER_BIT );
73 glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
77 if( !renderer->loadShaders( ))
79 setError( ERROR_EVOLVE_LOADSHADERS_FAILED );
90 # ifdef _WIN32 // final INSTALL_DIR is not known at compile time
91 static const std::string _logoTextureName =
92 std::string(
"../share/Equalizer/data/logo.rgb" );
94 static const std::string _logoTextureName = std::string( EQ_INSTALL_DIR ) +
95 std::string(
"share/Equalizer/data/logo.rgb" );
98 static const std::string _logoTextureName = std::string( EQ_SOURCE_DIR ) +
99 std::string(
"examples/eVolve/logo.rgb" );
103 void Window::_loadLogo()
105 if( !GLEW_ARB_texture_rectangle )
107 LBWARN <<
"Can't load overlay logo, GL_ARB_texture_rectangle not "
108 <<
"available" << std::endl;
113 _logoTexture = om->getEqTexture( _logoTextureName.c_str( ));
120 LBWARN <<
"Can't load overlay logo " << _logoTextureName << std::endl;
124 _logoTexture = om->newEqTexture( _logoTextureName.c_str(),
125 GL_TEXTURE_RECTANGLE_ARB );
126 LBASSERT( _logoTexture );
130 LBVERB <<
"Created logo texture of size " << _logoTexture->
getWidth() <<
"x"
131 << _logoTexture->
getHeight() << std::endl;
138 const FrameData& frameData = pipe->getFrameData();
141 if( frameData.useStatistics() && !channels.empty( ))
142 EQ_GL_CALL( channels.back()->drawStatistics( ));
bool upload(const Frame::Buffer buffer, util::Texture *texture, const Vector2i &position, ObjectManager *glObjects) const
Upload this image to the frame buffer or a texture.
virtual void swapBuffers()
Swap the front and back buffer of the window.
virtual bool configInit(const eq::uint128_t &initID)
Initialize this window.
const P * getPipe() const
int32_t getHeight() const
A facility class to manage OpenGL objects across shared contexts.
bool readImage(const std::string &filename, const Frame::Buffer buffer)
Read pixel data from an uncompressed rgb image file.
void deleteGLObjects(ObjectManager *om)
Delete all OpenGL objects allocated from the given object manager.
virtual bool configInit(const uint128_t &initID)
Initialize this window.
virtual bool configInitGL(const eq::uint128_t &initID)
Initialize the OpenGL state for this window.
ObjectManager * getObjectManager()
std::vector< Channel * > Channels
A vector of pointers to eq::Channel.
const Channels & getChannels() const
void setError(const int32_t error)
Set an error code why the last operation failed.
void setIAttribute(const IAttribute attr, const int32_t value)
Set a window attribute.
virtual void swapBuffers()
Swap the front and back buffer of the window.
const GLEWContext * glewGetContext() const
Get the GLEW context for this window.