~ubuntu-branches/ubuntu/oneiric/nux/oneiric

« back to all changes in this revision

Viewing changes to NuxGraphics/NuxGraphics.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-06-22 17:16:16 UTC
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: james.westby@ubuntu.com-20110622171616-49405ntrtnxfcpjj
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "GLResource.h"
23
23
#include "FontTexture.h"
24
24
#include "NuxGraphics.h"
25
 
#include "IniFile.h"
26
25
#include "GLResourceManager.h"
27
26
#if defined(NUX_OS_WINDOWS)
28
27
  #include "GraphicsDisplay.h"
35
34
  void NuxGraphicsInitialize()
36
35
  {
37
36
    inlRegisterThreadLocalIndex (1, _TLS_GraphicsDisplay, NULL);
38
 
    inlRegisterThreadLocalIndex (2, _TLS_GpuDevice_, NULL);
39
37
 
40
38
#if defined(NUX_OS_LINUX)
41
39
    // Necessary in order to use gdk
45
43
    GNuxGraphicsResources.InitializeResources();
46
44
  }
47
45
 
48
 
  GraphicsDisplay *GetThreadGLWindow()
49
 
  {
50
 
    return GetDisplayDevice ();
51
 
  }
52
 
 
53
 
  GraphicsDisplay *GetDisplayDevice ()
 
46
  GraphicsDisplay* GetGraphicsDisplay()
54
47
  {
55
48
    return (GraphicsDisplay *) inlGetThreadLocalStorage (_TLS_GraphicsDisplay);
56
49
  }
57
 
 
58
 
  GpuDevice *GetThreadGLDeviceFactory () // Deprecated
59
 
  {
60
 
    return GetGpuDevice ();
61
 
  }
62
 
 
63
 
  GpuDevice *GetGpuDevice ()
64
 
  {
65
 
    return (GpuDevice *) inlGetThreadLocalStorage (_TLS_GpuDevice_);
66
 
  }
67
 
 
68
 
  GraphicsEngine *GetThreadGraphicsContext ()
69
 
  {
70
 
    GraphicsDisplay *glwindow = (GraphicsDisplay *) inlGetThreadLocalStorage (_TLS_GraphicsDisplay);
71
 
    return glwindow->GetGraphicsEngine ();
72
 
  }
73
 
 
74
50
}