30#include "../common_ogl/openGL_includes.h"
31#include "../common_ogl/ogl_utils.h"
37 wxASSERT( t >= 0.0f );
41 const float u = 1.0f / 6.0f;
43 vertexPointer[0] =
SFVEC3F( ( -3.0f + t ) * u, -2.0f * u, 0.0f );
44 vertexPointer[1] =
SFVEC3F( ( -3.0f + t ) * u, 2.0f * u, 0.0f );
45 vertexPointer[2] =
SFVEC3F( ( -1.0f + t ) * u, 0.0f * u, 0.0f );
47 vertexPointer[3] =
SFVEC3F( -2.0f * u, ( -3.0f + t ) * u, 0.0f );
48 vertexPointer[4] =
SFVEC3F( 2.0f * u, ( -3.0f + t ) * u, 0.0f );
49 vertexPointer[5] =
SFVEC3F( 0.0f * u, ( -1.0f + t ) * u, 0.0f );
51 vertexPointer[6] =
SFVEC3F( ( 3.0f - t ) * u, -2.0f * u, 0.0f );
52 vertexPointer[7] =
SFVEC3F( ( 3.0f - t ) * u, 2.0f * u, 0.0f );
53 vertexPointer[8] =
SFVEC3F( ( 1.0f - t ) * u, 0.0f * u, 0.0f );
55 vertexPointer[9] =
SFVEC3F( 2.0f * u, ( 3.0f - t ) * u, 0.0f );
56 vertexPointer[10] =
SFVEC3F( -2.0f * u, ( 3.0f - t ) * u, 0.0f );
57 vertexPointer[11] =
SFVEC3F( 0.0f * u, ( 1.0f - t ) * u, 0.0f );
59 glDisableClientState( GL_TEXTURE_COORD_ARRAY );
60 glDisableClientState( GL_COLOR_ARRAY );
61 glDisableClientState( GL_NORMAL_ARRAY );
62 glEnableClientState( GL_VERTEX_ARRAY );
63 glVertexPointer( 3, GL_FLOAT, 0, vertexPointer );
66 glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
68 glDrawArrays( GL_TRIANGLES, 0, 4 * 3 );
70 glDisable( GL_BLEND );
72 glDisableClientState( GL_VERTEX_ARRAY );
78 wxASSERT( aScale >= 0.0f );
79 wxASSERT( t >= 0.0f );
86 glDisable( GL_LIGHTING );
87 glDisable( GL_DEPTH_TEST );
88 glDisable( GL_CULL_FACE );
91 glMatrixMode( GL_PROJECTION );
94 glMatrixMode( GL_MODELVIEW );
98 glEnable( GL_COLOR_MATERIAL );
99 glColor4f( 0.0f, 1.0f, 0.0f, 0.75f - t * 0.75f );
102 glTranslatef( lookAtPos.x, lookAtPos.y, lookAtPos.z );
104 glScalef( aScale, aScale, aScale );
108 glScalef( 1.0f - t, 1.0f - t, 1.0f - t );
109 glColor4f( 0.0f, 1.0f, 0.0f, 0.8f - t );
112 glRotatef( t * 90.0f, 0.0f, 0.0f, 1.0f );
117 glRotatef( -t * 90.0f, 0.0f, 0.0f, 1.0f );
125 wxASSERT( aScale >= 0.0f );
127 glDisable( GL_LIGHTING );
128 glDisable( GL_DEPTH_TEST );
129 glDisable( GL_CULL_FACE );
132 glMatrixMode( GL_PROJECTION );
135 glMatrixMode( GL_MODELVIEW );
139 glEnable( GL_COLOR_MATERIAL );
140 glColor4f( 0.0f, 0.667f, 0.902f, 0.75f );
145 glPointSize( 16.0f );
146 glEnable( GL_POINT_SMOOTH );
147 glHint( GL_POINT_SMOOTH_HINT, GL_NICEST );
149 glEnable( GL_BLEND );
150 glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
152 glScalef( aScale, aScale, aScale );
155 glBegin( GL_POINTS );
156 glVertex3f( 0, 0, 0 );
159 glDisable( GL_BLEND );
160 glDisable( GL_POINT_SMOOTH );
const glm::mat4 & GetProjectionMatrix() const
const glm::mat4 & GetViewMatrix() const
const SFVEC3F & GetLookAtPos_T1() const
SFVEC3F m_3dmousePivotPos
void render3dmousePivot(float aScale)
Render the 3dmouse pivot cursor.
void render_pivot(float t, float aScale)
Render the pivot cursor.
static void pivot_render_triangles(float t)