mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
convert to dx
This commit is contained in:
parent
229ac3bcce
commit
d80b6bf93b
@ -16,7 +16,6 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "glxGraphicsPipe.h"
|
|
||||||
#include "graphicsWindow.h"
|
#include "graphicsWindow.h"
|
||||||
#include "graphicsChannel.h"
|
#include "graphicsChannel.h"
|
||||||
#include "graphicsLayer.h"
|
#include "graphicsLayer.h"
|
||||||
@ -29,6 +28,13 @@
|
|||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "clockObject.h"
|
#include "clockObject.h"
|
||||||
|
|
||||||
|
#ifdef USE_GLX
|
||||||
|
#include "glxGraphicsPipe.h"
|
||||||
|
#else
|
||||||
|
#include "wdxGraphicsPipe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// This program demonstrates creating a graphics window in Panda
|
// This program demonstrates creating a graphics window in Panda
|
||||||
// explicitly, without using ChanCfg as an interface wrapper.
|
// explicitly, without using ChanCfg as an interface wrapper.
|
||||||
// Normally we use ChanCfg to create the window and automatically set
|
// Normally we use ChanCfg to create the window and automatically set
|
||||||
@ -59,7 +65,13 @@ main(int argc, char *argv[]) {
|
|||||||
// know it's a weird way to pass parameters to an object.
|
// know it's a weird way to pass parameters to an object.
|
||||||
|
|
||||||
PipeSpecifier pipe_spec;
|
PipeSpecifier pipe_spec;
|
||||||
PT(GraphicsPipe) pipe = new glxGraphicsPipe(pipe_spec);
|
PT(GraphicsPipe) pipe;
|
||||||
|
|
||||||
|
#ifdef USE_GLX
|
||||||
|
pipe = new glxGraphicsPipe(pipe_spec);
|
||||||
|
#else
|
||||||
|
pipe = new wdxGraphicsPipe(pipe_spec);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Now create a window on that pipe.
|
// Now create a window on that pipe.
|
||||||
GraphicsWindow::Properties window_prop;
|
GraphicsWindow::Properties window_prop;
|
||||||
@ -68,7 +80,7 @@ main(int argc, char *argv[]) {
|
|||||||
window_prop._xsize = 640;
|
window_prop._xsize = 640;
|
||||||
window_prop._ysize = 480;
|
window_prop._ysize = 480;
|
||||||
window_prop._title = "Window";
|
window_prop._title = "Window";
|
||||||
//window_prop._fullscreen = true;
|
// window_prop._fullscreen = true;
|
||||||
|
|
||||||
PT(GraphicsWindow) window = pipe->make_window(window_prop);
|
PT(GraphicsWindow) window = pipe->make_window(window_prop);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user