#include <list>
#include <set>
-inline void arrow_draw( const Vector3& origin, const Vector3& direction_forward, const Vector3& direction_left, const Vector3& direction_up ){
+inline void arrow_draw( OpenGLBinding &GL, const Vector3& origin, const Vector3& direction_forward, const Vector3& direction_left, const Vector3& direction_up ){
Vector3 endpoint( vector3_added( origin, vector3_scaled( direction_forward, 32.0 ) ) );
Vector3 tip1( vector3_added( vector3_added( endpoint, vector3_scaled( direction_forward, -8.0 ) ), vector3_scaled( direction_up, -4.0 ) ) );
test.TestQuads( VertexPointer( reinterpret_cast<VertexPointer::pointer>( points ), sizeof( Vector3 ) ), IndexPointer( indices, 24 ), best );
}
-inline void aabb_draw_wire( const Vector3 points[8] ){
+inline void aabb_draw_wire( OpenGLBinding &GL, const Vector3 points[8] ){
unsigned int indices[26] = {
0, 1, 1, 2, 2, 3, 3, 0,
4, 5, 5, 6, 6, 7, 7, 4,
#endif
}
-inline void aabb_draw_flatshade( const Vector3 points[8] ){
+inline void aabb_draw_flatshade( OpenGLBinding &GL, const Vector3 points[8] ){
glBegin( GL_QUADS );
glNormal3fv( vector3_to_array( aabb_normals[0] ) );
glEnd();
}
-inline void aabb_draw_wire( const AABB& aabb ){
+inline void aabb_draw_wire( OpenGLBinding &GL, const AABB& aabb ){
Vector3 points[8];
aabb_corners( aabb, points );
- aabb_draw_wire( points );
+ aabb_draw_wire( GL, points );
}
-inline void aabb_draw_flatshade( const AABB& aabb ){
+inline void aabb_draw_flatshade( OpenGLBinding &GL, const AABB& aabb ){
Vector3 points[8];
aabb_corners( aabb, points );
- aabb_draw_flatshade( points );
+ aabb_draw_flatshade( GL, points );
}
-inline void aabb_draw_textured( const AABB& aabb ){
+inline void aabb_draw_textured( OpenGLBinding &GL, const AABB& aabb ){
Vector3 points[8];
aabb_corners( aabb, points );
glEnd();
}
-inline void aabb_draw_solid( const AABB& aabb, RenderStateFlags state ){
+inline void aabb_draw_solid( OpenGLBinding &GL, const AABB& aabb, RenderStateFlags state ){
if ( state & RENDER_TEXTURE ) {
- aabb_draw_textured( aabb );
+ aabb_draw_textured( GL, aabb );
}
else
{
- aabb_draw_flatshade( aabb );
+ aabb_draw_flatshade( GL, aabb );
}
}
-inline void aabb_draw( const AABB& aabb, RenderStateFlags state ){
+inline void aabb_draw( OpenGLBinding &GL, const AABB& aabb, RenderStateFlags state ){
if ( state & RENDER_FILL ) {
- aabb_draw_solid( aabb, state );
+ aabb_draw_solid( GL, aabb, state );
}
else
{
- aabb_draw_wire( aabb );
+ aabb_draw_wire( GL, aabb );
}
}
public:
RenderableSolidAABB( const AABB& aabb ) : m_aabb( aabb ){
}
-void render( RenderStateFlags state ) const {
- aabb_draw_solid( m_aabb, state );
+void render( OpenGLBinding &GL, RenderStateFlags state ) const {
+ aabb_draw_solid( GL, m_aabb, state );
}
};
public:
RenderableWireframeAABB( const AABB& aabb ) : m_aabb( aabb ){
}
-void render( RenderStateFlags state ) const {
- aabb_draw_wire( m_aabb );
+void render( OpenGLBinding &GL, RenderStateFlags state ) const {
+ aabb_draw_wire( GL, m_aabb );
}
};
notify();
}
-typedef MemberCaller1<KeyValue, const CopiedString&, &KeyValue::importState> UndoImportCaller;
+typedef MemberCaller<KeyValue, void(const CopiedString&), &KeyValue::importState> UndoImportCaller;
};
/// \brief An unsorted list of key/value pairs.
m_entityKeyValueChanged();
}
- typedef MemberCaller1<EntityKeyValues, const KeyValues&, &EntityKeyValues::importState> UndoImportCaller;
+ typedef MemberCaller<EntityKeyValues, void(const KeyValues&), &EntityKeyValues::importState> UndoImportCaller;
void attach( Observer& observer ){
ASSERT_MESSAGE( !m_observerMutex, "observer cannot be attached during iteration" );