mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
tweaks to pipe interface
This commit is contained in:
parent
62cebed480
commit
cec554627e
@ -40,6 +40,21 @@ wdxGraphicsPipe7::
|
||||
~wdxGraphicsPipe7() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wdxGraphicsPipe7::get_interface_name
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the name of the rendering interface
|
||||
// associated with this GraphicsPipe. This is used to
|
||||
// present to the user to allow him/her to choose
|
||||
// between several possible GraphicsPipes available on a
|
||||
// particular platform, so the name should be meaningful
|
||||
// and unique for a given platform.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string wdxGraphicsPipe7::
|
||||
get_interface_name() const {
|
||||
return "DirectX7";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wdxGraphicsPipe7::pipe_constructor
|
||||
// Access: Public, Static
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
wdxGraphicsPipe7();
|
||||
virtual ~wdxGraphicsPipe7();
|
||||
|
||||
virtual string get_interface_name() const;
|
||||
static PT(GraphicsPipe) pipe_constructor();
|
||||
|
||||
protected:
|
||||
|
@ -58,6 +58,21 @@ wdxGraphicsPipe8::
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wdxGraphicsPipe8::get_interface_name
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the name of the rendering interface
|
||||
// associated with this GraphicsPipe. This is used to
|
||||
// present to the user to allow him/her to choose
|
||||
// between several possible GraphicsPipes available on a
|
||||
// particular platform, so the name should be meaningful
|
||||
// and unique for a given platform.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string wdxGraphicsPipe8::
|
||||
get_interface_name() const {
|
||||
return "DirectX7";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wdxGraphicsPipe8::pipe_constructor
|
||||
// Access: Public, Static
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
wdxGraphicsPipe8();
|
||||
virtual ~wdxGraphicsPipe8();
|
||||
|
||||
virtual string get_interface_name() const;
|
||||
static PT(GraphicsPipe) pipe_constructor();
|
||||
|
||||
protected:
|
||||
@ -61,7 +62,6 @@ private:
|
||||
private:
|
||||
HINSTANCE _hDDrawDLL;
|
||||
HINSTANCE _hD3D8_DLL;
|
||||
bool _is_valid;
|
||||
|
||||
typedef LPDIRECT3D8 (WINAPI *Direct3DCreate8_ProcPtr)(UINT SDKVersion);
|
||||
typedef HRESULT (WINAPI * LPDIRECTDRAWCREATEEX)(GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter);
|
||||
|
@ -544,26 +544,15 @@ make_window_framework() {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PandaFramework::
|
||||
make_default_pipe() {
|
||||
// We use the GraphicsPipe factory to make us a renderable pipe
|
||||
// without knowing exactly what kind of pipes we have available. We
|
||||
// don't care, so long as we can render to it interactively.
|
||||
|
||||
// This depends on the shared library or libraries (DLL's to you
|
||||
// Windows folks) that have been loaded in at runtime from the
|
||||
// load-display Configrc variable.
|
||||
// load-display and/or aux-display Configrc variables.
|
||||
GraphicsPipeSelection *selection = GraphicsPipeSelection::get_global_ptr();
|
||||
selection->resolve_modules();
|
||||
|
||||
nout << "Known pipe types:" << endl;
|
||||
int num_pipe_types = selection->get_num_pipe_types();
|
||||
for (int i = 0; i < num_pipe_types; i++) {
|
||||
nout << " " << selection->get_pipe_type(i) << "\n";
|
||||
}
|
||||
|
||||
selection->print_pipe_types();
|
||||
_default_pipe = selection->make_default_pipe();
|
||||
|
||||
if (_default_pipe == (GraphicsPipe*)NULL) {
|
||||
nout << "No interactive pipe is available! Check your Configrc!\n";
|
||||
nout << "No graphics pipe is available! Check your Configrc!\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,21 @@ glxGraphicsPipe::
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: glxGraphicsPipe::get_interface_name
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the name of the rendering interface
|
||||
// associated with this GraphicsPipe. This is used to
|
||||
// present to the user to allow him/her to choose
|
||||
// between several possible GraphicsPipes available on a
|
||||
// particular platform, so the name should be meaningful
|
||||
// and unique for a given platform.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string glxGraphicsPipe::
|
||||
get_interface_name() const {
|
||||
return "OpenGL";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: glxGraphicsPipe::pipe_constructor
|
||||
// Access: Public, Static
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
glxGraphicsPipe(const string &display = string());
|
||||
virtual ~glxGraphicsPipe();
|
||||
|
||||
virtual string get_interface_name() const;
|
||||
static PT(GraphicsPipe) pipe_constructor();
|
||||
|
||||
INLINE Display *get_display() const;
|
||||
|
@ -39,6 +39,21 @@ wglGraphicsPipe::
|
||||
~wglGraphicsPipe() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wglGraphicsPipe::get_interface_name
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the name of the rendering interface
|
||||
// associated with this GraphicsPipe. This is used to
|
||||
// present to the user to allow him/her to choose
|
||||
// between several possible GraphicsPipes available on a
|
||||
// particular platform, so the name should be meaningful
|
||||
// and unique for a given platform.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string wglGraphicsPipe::
|
||||
get_interface_name() const {
|
||||
return "OpenGL";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wglGraphicsPipe::pipe_constructor
|
||||
// Access: Public, Static
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
wglGraphicsPipe();
|
||||
virtual ~wglGraphicsPipe();
|
||||
|
||||
virtual string get_interface_name() const;
|
||||
static PT(GraphicsPipe) pipe_constructor();
|
||||
|
||||
protected:
|
||||
|
Loading…
x
Reference in New Issue
Block a user