icon support moved to wxBitmap, allowing for fully transparent usage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,8 +25,11 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifndef __WXMAC__
|
||||
// does this not give redefine errors on other platforms ?
|
||||
#define wxInt32 int
|
||||
#define wxUint32 unsigned int
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
@@ -57,12 +60,23 @@ static wxInt32 read_char(FILE *f)
|
||||
|
||||
static wxInt32 read_short(FILE *f)
|
||||
{
|
||||
return (read_char(f)<<8) | read_char(f);
|
||||
// the execution path was not always correct
|
||||
// when using the direct evaluation in the return statement
|
||||
wxInt32 first = read_char(f) ;
|
||||
wxInt32 second = read_char(f) ;
|
||||
|
||||
return (first<<8) | second ;
|
||||
}
|
||||
|
||||
static wxInt32 read_long(FILE *f)
|
||||
{
|
||||
return (read_char(f)<<24) | (read_char(f)<<16) | (read_char(f)<<8) | read_char(f);
|
||||
// the execution path was not always correct
|
||||
// when using the direct evaluation in the return statement
|
||||
wxInt32 first = read_char(f) ;
|
||||
wxInt32 second = read_char(f) ;
|
||||
wxInt32 third = read_char(f) ;
|
||||
wxInt32 fourth = read_char(f) ;
|
||||
return (first<<24) | (second<<16) | (third<<8) | fourth ;
|
||||
}
|
||||
|
||||
static GLfloat read_float(FILE *f)
|
||||
|
@@ -20,7 +20,11 @@
|
||||
#ifndef LW_H
|
||||
#define LW_H
|
||||
|
||||
#include <GL/gl.h>
|
||||
#ifdef __WXMAC__
|
||||
#include <glu.h>
|
||||
#else
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#define LW_MAX_POINTS 200
|
||||
#define LW_MAX_NAME_LEN 500
|
||||
|
@@ -30,7 +30,11 @@
|
||||
#endif
|
||||
|
||||
#include "penguin.h"
|
||||
#ifdef __WXMAC__
|
||||
#include <glu.h>
|
||||
#else
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#define VIEW_ASPECT 1.3
|
||||
|
||||
@@ -147,16 +151,9 @@ void TestGLCanvas::OnPaint( wxPaintEvent& event )
|
||||
|
||||
void TestGLCanvas::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
int width, height;
|
||||
GetClientSize(& width, & height);
|
||||
|
||||
#ifndef __WXMOTIF__
|
||||
if (GetContext())
|
||||
#endif
|
||||
{
|
||||
SetCurrent();
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
// the viewport must be initialized this way, not glViewport
|
||||
// this is also necessary to update the context on some platforms
|
||||
wxGLCanvas::OnSize(event);
|
||||
}
|
||||
|
||||
void TestGLCanvas::OnEraseBackground(wxEraseEvent& event)
|
||||
|
Reference in New Issue
Block a user