Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PanosphereSphereTool.cpp
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
24 #ifdef _WIN32
25 #include "wx/msw/wrapwin.h"
26 #endif
27 #include "hugin_config.h"
28 #if defined HAVE_EPOXY && HAVE_EPOXY
29 #include <epoxy/gl.h>
30 #ifdef __WXMAC__
31 #include <OpenGL/glu.h>
32 #else
33 #include <GL/glu.h>
34 #endif
35 #else
36 #include <GL/glew.h>
37 #ifdef __WXMAC__
38 #include <OpenGL/gl.h>
39 #include <OpenGL/glu.h>
40 #else
41 #include <GL/gl.h>
42 #include <GL/glu.h>
43 #endif
44 #endif
45 #ifdef __APPLE__
46  #include <GLUT/glut.h>
47 #endif
48 
49 #include "PanosphereSphereTool.h"
50 
52 {
53  m_background_color = backgroundColour;
54 }
55 
57 {
60 }
61 
63 {
65  glDisable(GL_TEXTURE_2D);
66  glColor4f((float)m_background_color.Red() / 255, (float)m_background_color.Green() / 255, (float)m_background_color.Blue() / 255, 0.8f);
67 
68  glEnable(GL_BLEND);
69  glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
70  GLUquadric* gridb = gluNewQuadric();
71  gluSphere(gridb, 101,40,20);
72 
73  glEnable(GL_TEXTURE_2D);
74  glDisable(GL_BLEND);
75 
76  glMatrixMode(GL_MODELVIEW);
77 
78 }
79 
81 {
82 
83 }
84 
86 {
88 }
ViewState * GetViewStatePtr()
Definition: ToolHelper.cpp:305
void DisableTexture(bool maskOnly=false)
void BeforeDrawImagesBackEvent()
Draw using opengl anything before drawing the front face culled images.
void Activate()
Switch on a tool.
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition: Tool.h:102
TextureManager * GetTextureManager()
Definition: ViewState.h:104
PanosphereSphereTool(PanosphereOverviewToolHelper *helper, const wxColour backgroundColour)
void BeforeDrawImagesFrontEvent()
Draw using opengl anything before drawing the back face culled images.
void SetPreviewBackgroundColor(wxColour c)
sets the sphere background color