Hey, i'm doing a basic problem generator for finding volume of prisms ect..
I want to use minib3d for the graphics and I have a few questions:
1. Will minib3d work in combinations with wxMax?
2. How can I draw the canvas correctly? It seems to clear all the gadgets I lay down..
here's my code so far... (notice how it gets rid of the New problem button)
I want to use minib3d for the graphics and I have a few questions:
1. Will minib3d work in combinations with wxMax?
2. How can I draw the canvas correctly? It seems to clear all the gadgets I lay down..
here's my code so far... (notice how it gets rid of the New problem button)
SuperStrict Framework wx.wxApp Import wx.wxFrame Import wx.wxGLCanvas Import wx.wxTimer Import wx.wxButton Import wx.wxPanel Import wx.wxglmax2D Const wxDEFAULT_NO_RESIZE:Int = wxSYSTEM_MENU | wxMINIMIZE_BOX | .. wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN | wxBORDER_STATIC ' run SetGraphicsDriver wxGLGraphicsDriver(),GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER New MyApp.run() Type MyApp Extends wxApp Field frame:MyFrame Method OnInit:Int() frame = MyFrame(New MyFrame.Create(Null,-1,"Mathematics - Measurements of 3d objects", 50, 50, 800, 600, wxDEFAULT_NO_RESIZE)) frame.show() Return True End Method End Type Type MyFrame Extends wxFrame Field canvas:MyCanvas Method OnInit() canvas = MyCanvas(New MyCanvas.Create(Self, -1, GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER, 0, 0, 350,600)) Local panel:wxPanel = wxPanel(New wxPanel.Create(Self, 0, 0, 800, 600 )) Local bNewQuestion:wxButton = New wxButton.Create(panel,wxID_Ok,"New problem!",500,410) ConnectAny(wxEVT_CLOSE, OnClose) End Method Function OnClose(event:wxEvent) MyFrame(event.parent).canvas.timer.Stop() event.Skip() End Function End Type Type MyCanvas Extends wxGLCanvas Field timer:wxTimer Method OnInit() timer = New wxTimer.Create(Self) ConnectAny(wxEVT_TIMER, OnTimer) timer.Start(16) End Method Function OnTimer(event:wxEvent) MyCanvas(event.parent).Refresh() End Function Method OnPaint(event:wxPaintEvent) SetGraphics CanvasGraphics2D( Self ) Flip End Method End Type