]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/glcanvas.cpp
first stab at supporting custom renderers
[wxWidgets.git] / src / palmos / glcanvas.cpp
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/glcanvas.cpp
3// Purpose: wxGLCanvas, for using OpenGL with wxWidgets
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
ffecfa5a
JS
12#include "wx/wxprec.h"
13
14#if defined(__BORLANDC__)
15#pragma hdrstop
16#endif
17
18#if wxUSE_GLCANVAS
19
20#ifndef WX_PRECOMP
21 #include "wx/frame.h"
22 #include "wx/settings.h"
23 #include "wx/intl.h"
24 #include "wx/log.h"
25 #include "wx/app.h"
26#endif
27
28#include "wx/palmos/private.h"
29
30// DLL options compatibility check:
31#include "wx/build.h"
32WX_CHECK_BUILD_OPTIONS("wxGL")
33
34#include "wx/glcanvas.h"
35
36static const wxChar *wxGLCanvasClassName = wxT("wxGLCanvasClass");
37static const wxChar *wxGLCanvasClassNameNoRedraw = wxT("wxGLCanvasClassNR");
38
39LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
40 WPARAM wParam, LPARAM lParam);
41
42/*
43 * GLContext implementation
44 */
45
46wxGLContext::wxGLContext(bool WXUNUSED(isRGB), wxGLCanvas *win, const wxPalette& WXUNUSED(palette))
47{
48}
49
50wxGLContext::wxGLContext(
51 bool WXUNUSED(isRGB), wxGLCanvas *win,
52 const wxPalette& WXUNUSED(palette),
53 const wxGLContext *other /* for sharing display lists */
54 )
55{
56}
57
58wxGLContext::~wxGLContext()
59{
60}
61
62void wxGLContext::SwapBuffers()
63{
64}
65
66void wxGLContext::SetCurrent()
67{
68}
69
35f1f4f7 70void wxGLContext::SetColour(const wxString& colour)
ffecfa5a
JS
71{
72}
73
74
75/*
76 * wxGLCanvas implementation
77 */
78
79IMPLEMENT_CLASS(wxGLCanvas, wxWindow)
80
81BEGIN_EVENT_TABLE(wxGLCanvas, wxWindow)
82 EVT_SIZE(wxGLCanvas::OnSize)
83 EVT_PALETTE_CHANGED(wxGLCanvas::OnPaletteChanged)
84 EVT_QUERY_NEW_PALETTE(wxGLCanvas::OnQueryNewPalette)
85END_EVENT_TABLE()
86
87wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id,
88 const wxPoint& pos, const wxSize& size, long style, const wxString& name,
89 int *attribList, const wxPalette& palette) : wxWindow()
90{
91}
92
93wxGLCanvas::wxGLCanvas( wxWindow *parent,
94 const wxGLContext *shared, wxWindowID id,
95 const wxPoint& pos, const wxSize& size, long style, const wxString& name,
96 int *attribList, const wxPalette& palette )
97 : wxWindow()
98{
99}
100
101// Not very useful for wxMSW, but this is to be wxGTK compliant
102
103wxGLCanvas::wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared, wxWindowID id,
104 const wxPoint& pos, const wxSize& size, long style, const wxString& name,
105 int *attribList, const wxPalette& palette ):
106 wxWindow()
107{
108}
109
110wxGLCanvas::~wxGLCanvas()
111{
112}
113
114// Replaces wxWindow::Create functionality, since we need to use a different
115// window class
116bool wxGLCanvas::Create(wxWindow *parent,
117 wxWindowID id,
118 const wxPoint& pos,
119 const wxSize& size,
120 long style,
121 const wxString& name)
122{
123 return false;
124}
125
126static void AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, int *attribList)
127{
128}
129
130void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
131{
132}
133
134void wxGLCanvas::SetupPalette(const wxPalette& palette)
135{
136}
137
ffecfa5a
JS
138void wxGLCanvas::SwapBuffers()
139{
140}
141
142void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
143{
144}
145
146void wxGLCanvas::SetCurrent()
147{
148}
149
150void wxGLCanvas::SetColour(const wxChar *colour)
151{
152}
153
154void wxGLCanvas::OnQueryNewPalette(wxQueryNewPaletteEvent& event)
155{
156}
157
158void wxGLCanvas::OnPaletteChanged(wxPaletteChangedEvent& event)
159{
160}
161
162void glArrayElementEXT(GLint WXUNUSED(i))
163{
164}
165
166void glColorPointerEXT(GLint WXUNUSED(size), GLenum WXUNUSED(type), GLsizei WXUNUSED(stride), GLsizei WXUNUSED(count), const GLvoid *WXUNUSED(pointer))
167{
168}
169
170void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count)
171{
172}
173
174void glEdgeFlagPointerEXT(GLsizei WXUNUSED(stride), GLsizei WXUNUSED(count), const GLboolean *WXUNUSED(pointer))
175{
176}
177
178void glGetPointervEXT(GLenum WXUNUSED(pname), GLvoid* *WXUNUSED(params))
179{
180}
181
182void glIndexPointerEXT(GLenum WXUNUSED(type), GLsizei WXUNUSED(stride), GLsizei WXUNUSED(count), const GLvoid *WXUNUSED(pointer))
183{
184}
185
186void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
187{
188}
189
190void glTexCoordPointerEXT(GLint WXUNUSED(size), GLenum WXUNUSED(type), GLsizei WXUNUSED(stride), GLsizei WXUNUSED(count), const GLvoid *WXUNUSED(pointer))
191{
192}
193
194void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
195{
196}
197
198void glColorSubtableEXT(GLenum WXUNUSED(target), GLsizei WXUNUSED(start), GLsizei WXUNUSED(count), GLenum WXUNUSED(format), GLenum WXUNUSED(type), const GLvoid *WXUNUSED(table))
199{
200}
201
202void glColorTableEXT(GLenum WXUNUSED(target), GLenum WXUNUSED(internalformat), GLsizei WXUNUSED(width), GLenum WXUNUSED(format), GLenum WXUNUSED(type), const GLvoid *WXUNUSED(table))
203{
204}
205
206void glCopyColorTableEXT(GLenum WXUNUSED(target), GLenum WXUNUSED(internalformat), GLint WXUNUSED(x), GLint WXUNUSED(y), GLsizei WXUNUSED(width))
207{
208}
209
210void glGetColorTableEXT(GLenum WXUNUSED(target), GLenum WXUNUSED(format), GLenum WXUNUSED(type), GLvoid *WXUNUSED(table))
211{
212}
213
214void glGetColorTableParamaterfvEXT(GLenum WXUNUSED(target), GLenum WXUNUSED(pname), GLfloat *WXUNUSED(params))
215{
216}
217
218void glGetColorTavleParameterivEXT(GLenum WXUNUSED(target), GLenum WXUNUSED(pname), GLint *WXUNUSED(params))
219{
220}
221
222void glLockArraysSGI(GLint WXUNUSED(first), GLsizei WXUNUSED(count))
223{
224}
225
226void glUnlockArraysSGI()
227{
228}
229
230
231void glCullParameterdvSGI(GLenum WXUNUSED(pname), GLdouble* WXUNUSED(params))
232{
233}
234
235void glCullParameterfvSGI(GLenum WXUNUSED(pname), GLfloat* WXUNUSED(params))
236{
237}
238
239void glIndexFuncSGI(GLenum WXUNUSED(func), GLclampf WXUNUSED(ref))
240{
241}
242
243void glIndexMaterialSGI(GLenum WXUNUSED(face), GLenum WXUNUSED(mode))
244{
245}
246
247void glAddSwapHintRectWin(GLint WXUNUSED(x), GLint WXUNUSED(y), GLsizei WXUNUSED(width), GLsizei WXUNUSED(height))
248{
249}
250
251
252//---------------------------------------------------------------------------
253// wxGLApp
254//---------------------------------------------------------------------------
255
256IMPLEMENT_CLASS(wxGLApp, wxApp)
257
258bool wxGLApp::InitGLVisual(int *attribList)
259{
260 return false;
261}
262
263wxGLApp::~wxGLApp()
264{
265}
266
267#endif
268 // wxUSE_GLCANVAS