OGL Error

Hi,

I get the following error when trying to create an OGL object in
wxPython-2.5.4:

  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 2923, in __init__
    EllipseShape.__init__(self, diameter, diameter)
  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 2814, in __init__
    Shape.__init__(self)
  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 277, in __init__
    region = ShapeRegion()
  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 2971, in __init__
    self._font = NormalFont
NameError: global name 'NormalFont' is not defined

Did anyone have this problem?

Sincerely,
JP

I never used ogl but it seams that NormalFont is a global variable set in
wx.lib.ogl.OGLInitialize()
so you should call that method prior to using ogl stuff
take a closer look at the OGL demo from the wxPython Demo around line 400 :wink:

Peter.

···

On Mon, 11 Apr 2005 17:59:36 +0300, João Vilela <jvilela@dcc.online.pt> wrote:

Hi,

I get the following error when trying to create an OGL object in
wxPython-2.5.4:

  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 2923, in __init__
    EllipseShape.__init__(self, diameter, diameter)
  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 2814, in __init__
    Shape.__init__(self)
  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 277, in __init__
    region = ShapeRegion()
  File
"/usr/local/lib/python2.4/site-packages/wx-2.5.4-gtk2-ansi/wx/lib/ogl/_basic.py",
line 2971, in __init__
    self._font = NormalFont
NameError: global name 'NormalFont' is not defined

Did anyone have this problem?