summaryrefslogtreecommitdiff
path: root/test/simple/simple.c
diff options
context:
space:
mode:
authorscuri <scuri>2010-06-21 22:55:10 +0000
committerscuri <scuri>2010-06-21 22:55:10 +0000
commit37a92b86d13e89d0dcec92be6d23ceced29dbc36 (patch)
treefaff61ef668379212b4ed948934533c3f2fe308b /test/simple/simple.c
parenta124216ee05a5d63ea8fcdafcd050ad1fadf0b09 (diff)
*** empty log message ***
Diffstat (limited to 'test/simple/simple.c')
-rw-r--r--test/simple/simple.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/simple/simple.c b/test/simple/simple.c
index 6f7a4cb..a15a242 100644
--- a/test/simple/simple.c
+++ b/test/simple/simple.c
@@ -29,6 +29,7 @@
#include "cddebug.h"
#include "wd.h"
#include "cdgdiplus.h"
+#include "cdgl.h"
#include "simple.h"
@@ -473,6 +474,28 @@ int SimpleDrawImageRGB(void)
return 0;
}
+#ifdef USE_OPENGL
+int SimpleDrawGL(void)
+{
+ char StrData[100];
+ int w, h;
+ double w_mm, h_mm;
+ cdActivate(curCanvas);
+ cdGetCanvasSize(&w, &h, &w_mm, &h_mm);
+
+ sprintf(StrData, "%dx%d %g", w, h, ((double)w/w_mm));
+
+ if (dbCanvas) cdKillCanvas(dbCanvas);
+
+ dbCanvas = cdCreateCanvas(CD_GL, StrData);
+
+ curCanvas = dbCanvas;
+ SimpleDrawRepaint();
+
+ return 0;
+}
+#endif
+
int SimpleDrawSimulate(void)
{
cdActivate(curCanvas);