x64, OSWindow

7 views
Skip to first unread message

canjiang-ren

unread,
Oct 31, 2009, 2:09:11 AM10/31/09
to G3D Users
Hello,

1.
I got many compile error on vs2008 x64 at vista, something like 'eax'
in System.h line 452 undeclared.

2.
can we add a weak window interface between RenderDevice and OSWindow?
at the current version, we use factory pattern to decide to create sdl
or win32 window, but how about something like qt?
Even if we can inherit from OSWindow using qt implement, for example:
class QWindow : public G3D::OSWindow, the QWindow is duplicated with
QGLWidget, right?

so, i think it is better to decompose the OSWindow from RenderDevice,
using a weak window interface to get window width/height and swap
buffer. than the clean RenderDevice can be use in QGLWidget as gl
renderer.
for example:

class IWindow {
int width();
int height();
void swapGLBuffer();
};

class OSWindow: public IWindow {} ;
class QWindow: public IWindow{
pointer to QGLWidget;
};

renderDevice->init(new QWindow(this));

Morgan McGuire

unread,
Nov 5, 2009, 12:39:50 PM11/5/09
to g3d-...@googlegroups.com
I got many compile error on vs2008 x64 at vista, something like 'eax'
in System.h line 452 undeclared.

This is under Windows Vista x64 on an intel 64-bit processor?
 

2.
can we add a weak window interface between RenderDevice and OSWindow?
at the current version, we use factory pattern to decide to create sdl
or win32 window, but how about something like qt?
Even if we can inherit from OSWindow using qt implement, for example:
class QWindow : public G3D::OSWindow, the QWindow is duplicated with
QGLWidget, right?

so, i think it is better to decompose the OSWindow from RenderDevice,
using a weak window interface to get window width/height and swap
buffer. than the clean RenderDevice can be use in QGLWidget as gl
renderer.
for example:

class IWindow {
 int width();
 int height();
 void swapGLBuffer();
};

class OSWindow: public IWindow {} ;
class QWindow: public IWindow{
 pointer to QGLWidget;
};


I'm thinking about this.  In Java it would be a great idea; in C++ there's some concern about going down the direction of multiple inheritance by mixing in lots of interfaces.  I don't think we're going to change it for 8.0, but RenderDevice is currently under re-design and I'll add this into that discussion.

-m

 
renderDevice->init(new QWindow(this));


Reply all
Reply to author
Forward
0 new messages