Skip to content

Commit

Permalink
Windows: Fixed various issues (exports, GL context)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 4, 2013
1 parent 99f19d3 commit 6d4da2f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doomsday/libdeng2/include/de/core/memorylogsink.h
Expand Up @@ -29,7 +29,7 @@ namespace de {
/**
* Log sink that stores log entries in memory.
*/
class MemoryLogSink : public LogSink, public Lockable
class DENG2_PUBLIC MemoryLogSink : public LogSink, public Lockable
{
public:
MemoryLogSink(LogEntry::Level minimumLevel = LogEntry::DEBUG);
Expand Down
2 changes: 2 additions & 0 deletions doomsday/libgui/include/de/gui/canvas.h
Expand Up @@ -130,6 +130,8 @@ class LIBGUI_PUBLIC Canvas : public QGLWidget, public KeyEventSource, public Mou
*/
bool isMouseTrapped() const;

bool isGLReady() const;

/**
* Replaces the current audiences of this canvas with another canvas's
* audiences.
Expand Down
6 changes: 3 additions & 3 deletions doomsday/libgui/include/de/gui/font.h
Expand Up @@ -57,7 +57,7 @@ class LIBGUI_PUBLIC Font
* of text that contains style information (as escape sequences that start
* with the Esc ASCII code 0x1b).
*/
class RichFormat
class LIBGUI_PUBLIC RichFormat
{
public:
enum ContentStyle {
Expand Down Expand Up @@ -93,7 +93,7 @@ class LIBGUI_PUBLIC Font
* Interface for an object providing style information: fonts and
* colors.
*/
class IStyle
class LIBGUI_PUBLIC IStyle
{
public:
typedef Vector4ub Color;
Expand Down Expand Up @@ -158,7 +158,7 @@ class LIBGUI_PUBLIC Font
* @note Iterator::next() must be called before at least once after
* constructing the instance to move the iterator onto the first range.
*/
struct Iterator
struct LIBGUI_PUBLIC Iterator
{
RichFormat const &format;
int index;
Expand Down
8 changes: 8 additions & 0 deletions doomsday/libgui/include/de/gui/glentrypoints.h
Expand Up @@ -26,6 +26,14 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#ifdef min
# undef min
#endif

#ifdef max
# undef max
#endif

#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/wglext.h>
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libgui/include/de/gui/glshaderbank.h
Expand Up @@ -35,7 +35,7 @@ class GLProgram;
*
* Shaders and programs cannot be accessed until OpenGL is ready.
*/
class GLShaderBank : public InfoBank
class LIBGUI_PUBLIC GLShaderBank : public InfoBank
{
public:
GLShaderBank();
Expand Down
7 changes: 6 additions & 1 deletion doomsday/libgui/src/canvas.cpp
Expand Up @@ -229,6 +229,11 @@ bool Canvas::isMouseTrapped() const
return d->mouseGrabbed;
}

bool Canvas::isGLReady() const
{
return d->readyNotified;
}

void Canvas::copyAudiencesFrom(Canvas const &other)
{
audienceForGLReady = other.audienceForGLReady;
Expand Down Expand Up @@ -289,7 +294,7 @@ void Canvas::showEvent(QShowEvent* ev)
#ifdef WIN32
makeCurrent();
getAllOpenGLEntryPoints();
doneCurrent();
//doneCurrent();
#endif
QTimer::singleShot(1, this, SLOT(notifyReady()));
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libgui/src/canvaswindow.cpp
Expand Up @@ -105,7 +105,7 @@ DENG2_PIMPL(CanvasWindow)
i->canvasGLInit(*canvas);
}

canvas->doneCurrent();
//canvas->doneCurrent();
canvas->updateGL();

// Reacquire the focus.
Expand Down

0 comments on commit 6d4da2f

Please sign in to comment.