I am try to devlop a class the make a wxFrame have wxGLCanvas through a class function and having to problems, 1 in wxWidgets and one in general.
first problem:
I need to pass a name for the GLCanvas this is how you normal defina a GLCanvas:
wxGLCanvas * MyGLCanvas = new wxGLCanvas(frame, -1, wxPoint(0,0), wxSize(200,200), wxSUNKEN_BORDER, _("some text"));
what i need to do is something so that in the parameter on of the functioin i can define what i will call the wxGLCanvas ( in this case MyGLCanvas), how would i do that?
second problem:
I am getting this error:
Deleting intermediate files and output files for project 'Stromgage 3D Game Engine - Win32 Debug'.
--------------------Configuration: Stromgage 3D Game Engine - Win32 Debug--------------------
Compiling...
PrecompiledHeaders.cpp
Compiling...
GameWindow.cpp
MainApp.cpp
GLCanvas.cpp
C:\Stromgage 3D Game Engine\Stromgage 3D Game Engine\GLCanvas.cpp(8) : error C2664: '__thiscall wxGLCanvas::wxGLCanvas(class wxWindow *,int,const class wxPoint &,const class wxSize &,long,const class wxString &,int *,const class wxPalette &)' : cann
ot convert parameter 1 from 'class wxWindow' to 'class wxWindow *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Generating Code...
Error executing cl.exe.
Stromgage 3D Game Engine.exe - 1 error(s), 0 warning(s)
with this code
GLCanvas.h:
#ifndef GLCANVAS_H
#define GLCANVAS_H
#include "PrecompiledHeaders.h"
#include <wx/glcanvas.h>
class GLCanvas
{
public:
GLCanvas( wxWindow &frame, int &var, wxPoint &point, wxSize &size, wxString &title );
};
#endif
GLCanvas.cpp:
#include "PrecompiledHeaders.h"
#include "GLCanvas.h"
#include <wx/glcanvas.h>
GLCanvas::GLCanvas( wxWindow &frame, int &var, wxPoint &point, wxSize &size, wxString &title, const char &canvasname )
{
wxGLCanvas * canvasname = new wxGLCanvas( frame, var, point, size, title);
}
can anyone help me with this error?