ptitSeb
Serial Porter
Ah thanks. Well, this one should work, at least it's directly mentionned in the readme...
Last edited:
Ah thanks. Well, this one should work, at least it's directly mentionned in the readme...
Yes, could be. IIRC, there are 3 rendering mode with Eduke32: Software, Polymere and Polymost. The last two are hardware renderer, but one needs OpenGL 1.x and the other OpenGL 2.x (I don't remember which one is which). The issue with the OpenGL 2.x is that is uses Shaders with Textures 3D (among other things), that gl4es doesn't support yet (support is planned, but I haven't worked on that part yet). The OpenGL 1.x works, but can be slow on certains operations, so it's not always a win (it works fine with Duke Nukem 3D, it's a bit slow with the Sonic 3D remake that I forgot the name).@ptitSeb : I'd rather think a compiled engine would run faster than an interpreted one inside a JVM. I also expect EDuke32 to allow software rendering, in case GLES2 mode proved to be too slow on the Pandora, but I could be wrong though (e.g if the engine uses SDL2 for example...).
Yeah, I heard of it. Looks nice. If it's vanilla EDuke32, than maybe (depending if it's tied to a specific renderer). If it's not vanilla Eduke32, well, Eduke32 seems to be GPL so I guess the changed sources must be found somewhere...On a side note, have you heard about Ion Fury ?
https://en.m.wikipedia.org/wiki/Ion_Fury
Runs on EDuke32 as far as I understand. I wonder whether it could be make to work on the Pandora ?
Cheers, Magic Sam
Ah, thank you!
Btw: indeed, Ion Fury sources are now inside eDuke32 (due to GPL 2.0 licence). To build you simply need a "make FURY=1". I tried to build on the Pandora. First, SDL1 backend doesn't work, only SDL2 do.
PerfTop: 1005 irqs/sec kernel: 4.3% exact: 0.0% [1000Hz cycles], (all, 1 CPU)
------------------------------------------------------------------------------------------------------------------------------------------------------------
15.74% fury [.] classicDrawSprite(int)
11.43% libgcc_s.so.1 [.] __udivmoddi4
4.55% fury [.] VM_Execute(bool)
4.01% fury [.] renderDrawRoomsQ16
3.04% libm.so.6 [.] __lrintf
2.36% libvorbisifile.so.1.0.3 [.] mdct_backward
2.25% fury [.] vlineasm4(int, char*)
2.25% fury [.] updatesectorz
2.16% fury [.] classicDrawBunches(int)
2.10% fury [.] _ZN9libdivideL26libdivide_128_div_64_to_64EyyyPy.constprop.0
1.92% fury [.] MV_Mix16BitStereo16(VoiceNode*, unsigned int)
1.89% fury [.] inside
1.73% fury [.] void softsurface_blitBufferInternal<unsigned short>(unsigned short*)
1.62% fury [.] owallmost(short*, int, long long)
1.61% fury [.] getzrange
1.56% fury [.] tvlineasm2(unsigned int, int, int, int, unsigned int, int)
1.48% fury [.] _ZL8prepwalliPK11uwalltypev7.isra.0
1.42% fury [.] hlineasm4(int, int, int, unsigned int, unsigned int, int)
1.36% libvorbisifile.so.1.0.3 [.] vorbis_book_decodev_add
1.33% fury [.] tabledivide64
1.30% fury [.] getzsofslopeptr
1.25% libc-2.9.so [.] memcpy
1.18% fury [.] wallmost(short*, int, int, char)
1.04% [kernel] [k] __do_softirq
0.98% fury [.] Gv_GetVar(int)
0.97% fury [.] _ZL17classicScanSectors.part.0
0.89% fury [.] Gv_GetArrayOrStruct(int, int, int)
0.86% fury [.] grouscan(int, int, int, char)
0.82% [kernel] [k] ktime_get_ts
0.81% fury [.] libxmp_mix_stereo_8bit_spline(mixer_voice*, int*, int, int, int, int, int, int, int)
0.80% fury [.] S_Update
0.72% fury [.] thline(int, unsigned int, int, int, unsigned int, int)
0.71% fury [.] wallscan(int, int, short const*, short const*, int const*, int const*)
0.69% libasound.so.2.0.0 [.] 0x6554c
0.66% fury [.] _ZL17get_screen_coordsRK6vec2_tS1_PiS2_S2_S2_.isra.0
0.66% fury [.] G_DoSpriteAnimations
0.59% fury [.] MV_Mix16BitStereo16Stereo(VoiceNode*, unsigned int)
0.53% fury [.] renderDrawMasks
0.47% fury [.] wallfront
0.44% fury [.] vlineasm1(int, int, int, unsigned int, int, int)
0.43% libgcc_s.so.1 [.] __aeabi_uldivmod
0.42% libvorbisifile.so.1.0.3 [.] vorbis_synthesis_blockin
0.39% libvorbisifile.so.1.0.3 [.] floor1_inverse2
0.38% fury [.] Gv_GetVar(int, int, int)
0.35% fury [.] 0x1f858
0.34% fury [.] maskwallscan(int, int, int)
0.34% fury [.] mspritevline(int, int, int, int, int)
0.31% libogg.so.0.8.3 [.] oggpack_look
0.30% fury [.] A_Execute
0.30% libvorbisifile.so.1.0.3 [.] ov_read
0.29% fury [.] qinterpolatedown16short
0.27% fury [.] transmaskwallscan(int, int, int)
0.26% fury [.] ceilscan(int, int, int)
0.25% fury [.] mvlineasm4(int, char*)
0.24% libvorbisifile.so.1.0.3 [.] _01inverse
0.24% libgcc_s.so.1 [.] 0xcd5c
0.23% libvorbisifile.so.1.0.3 [.] _vorbis_apply_window
0.22% [kernel] [k] __schedule
GLint prevVBO = 0;
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vm->vboindex);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint) * 3 * 2 * vm->qcnt, index, GL_STATIC_DRAW);
glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, prevVBO);
prevVBO = 0;
glBindBuffer(GL_ARRAY_BUFFER, vm->vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 5 * 4 * vm->qcnt, vertex, GL_STATIC_DRAW);
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ARRAY_BUFFER, prevVBO);
Xfree(vertex);
Xfree(index);
GLint prevVBO = 0;
glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vm->vboindex);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint) * 3 * 2 * vm->qcnt, index, GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, prevVBO);
prevVBO = 0;
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ARRAY_BUFFER, vm->vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 5 * 4 * vm->qcnt, vertex, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, prevVBO);
Xfree(vertex);
Xfree(index);
-rwxr-xr-x 1 seb seb 15044300 Sep 9 23:46 fury
-rwxr-xr-x 1 seb seb 11039108 Sep 9 23:46 mapster32
/media/sda1/sources/svn/eduke32$ svn diff
Index: Common.mak
===================================================================
--- Common.mak (revision 8090)
+++ Common.mak (working copy)
@@ -52,7 +52,7 @@
ifndef SUBPLATFORM
SUBPLATFORM :=
- ifeq ($(PLATFORM),$(filter $(PLATFORM),LINUX DINGOO GCW CAANOO))
+ ifeq ($(PLATFORM),$(filter $(PLATFORM),LINUX DINGOO GCW CAANOO PANDORA))
SUBPLATFORM := LINUX
endif
endif
@@ -364,7 +364,7 @@
endif
# Debugging/Build options
-FORCEDEBUG := 0
+FORCEDEBUG := 1
KRANDDEBUG := 0
PROFILER := 0
# Make allocache() a wrapper around malloc()? Useful for debugging
@@ -405,6 +405,14 @@
override NOASM := 1
else ifeq ($(PLATFORM),$(filter $(PLATFORM),BEOS SKYOS))
override NOASM := 1
+else ifeq ($(PLATFORM),PANDORA)
+ override USE_OPENGL := 1
+ override NETCODE := 0
+ override HAVE_GTK2 := 0
+ override HAVE_FLAC := 1
+ override NOASM := 1
+ override USE_LUAJIT_2_1 := 1
+ SDL_TARGET := 2
endif
ifneq (i386,$(strip $(IMPLICIT_ARCH)))
@@ -450,8 +458,8 @@
LTO := 0
else
- OPTLEVEL := 2
- LTO := 1
+ OPTLEVEL := 3
+ LTO := 0
endif
ifneq (0,$(CLANG))
@@ -576,6 +584,10 @@
COMPILERFLAGS += -D__OPENDINGUX__
else ifeq ($(PLATFORM),SKYOS)
COMPILERFLAGS += -DUNDERSCORES
+else ifeq ($(PLATFORM),PANDORA)
+ COMPILERFLAGS += -D__PANDORA__
+ COMMONFLAGS += -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ffast-math -ftree-vectorize
+ LIBDIRS += -lrt
endif
ASFLAGS += -f $(ASFORMAT)
Index: GNUmakefile
===================================================================
--- GNUmakefile (revision 8090)
+++ GNUmakefile (working copy)
@@ -670,7 +670,11 @@
endif
ifeq ($(SUBPLATFORM),LINUX)
- LIBS += -lFLAC -lvorbisfile -lvorbis -logg
+ ifeq ($(PLATFORM),PANDORA)
+ LIBS += -lFLAC -lvorbisifile
+ else
+ LIBS += -lFLAC -lvorbisfile -lvorbis -logg
+ endif
endif
ifeq ($(PLATFORM),BSD)
Index: source/build/src/tilepacker.cpp
===================================================================
--- source/build/src/tilepacker.cpp (revision 8090)
+++ source/build/src/tilepacker.cpp (working copy)
@@ -92,6 +92,7 @@
static void maxheap_buildHeap()
{
+ if(heapNodes<2) return;
for (int i = (heapNodes-2)/2; i >= 0; --i)
{
maxheap_bubbleDown(i);
Index: source/build/src/voxmodel.cpp
===================================================================
--- source/build/src/voxmodel.cpp (revision 8090)
+++ source/build/src/voxmodel.cpp (working copy)
@@ -435,14 +435,14 @@
index[(i*2+1)*3+2] = i*4+3;
}
GLint prevVBO = 0;
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vm->vboindex);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint) * 3 * 2 * vm->qcnt, index, GL_STATIC_DRAW);
- glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, prevVBO);
prevVBO = 0;
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ARRAY_BUFFER, vm->vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 5 * 4 * vm->qcnt, vertex, GL_STATIC_DRAW);
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ARRAY_BUFFER, prevVBO);
Xfree(vertex);
Xfree(index);
Index: source/duke3d/src/config.cpp
===================================================================
--- source/duke3d/src/config.cpp (revision 8090)
+++ source/duke3d/src/config.cpp (working copy)
@@ -227,11 +227,13 @@
ud.config.MixRate = 44100;
#elif defined __ANDROID__
ud.config.MixRate = droidinfo.audio_sample_rate;
+#elif defined __PANDORA__
+ ud.config.MixRate = 22050;
#else
ud.config.MixRate = 48000;
#endif
-#if defined GEKKO || defined __OPENDINGUX__
+#if defined GEKKO || defined __OPENDINGUX__ || defined __PANDORA__
ud.config.NumVoices = 32;
ud.camera_time = 11;
#else
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TexCoord[0] = mix(gl_TexCoord[0].xyzw, gl_TexCoord[0].yxzw, u_usePalette);
gl_TexCoord[3] = gl_TextureMatrix[3] * gl_MultiTexCoord3;
gl_TexCoord[4] = gl_TextureMatrix[4] * gl_MultiTexCoord4;
gl_FogFragCoord = abs(eyeCoordPosition.z);
_gl4es_TexCoord[0] = _gl4es_TextureMatrix[0] * _gl4es_MultiTexCoord0;
_gl4es_TexCoord[0] = mix(_gl4es_TexCoord[0].xyzw, _gl4es_TexCoord[0].yxzw, u_usePalette);
_gl4es_TexCoord[3] = _gl4es_TextureMatrix[3] * _gl4es_MultiTexCoord3;
_gl4es_TexCoord[4] = _gl4es_TextureMatrix[4] * _gl4es_MultiTexCoord4;
_gl4es_FogFragCoord = abs(eyeCoordPosition.z);
varying mediump vec4 _gl4es_TexCoord[5];
#ifdef POLYMOST1_EXTENDED
vec4 detailColor = texture2D(s_detail, gl_TexCoord[3].xy);
detailColor = mix(c_vec4_one, 2.0*detailColor, u_useDetailMapping*detailColor.a);
color.rgb *= detailColor.rgb;
#endif
color = mix(color, c_vec4_one, u_useColorOnly);
// DEBUG
//color = texture2D(s_palswap, gl_TexCoord[0].xy);
//color = texture2D(s_palette, gl_TexCoord[0].xy);
//color = texture2D(s_texture, gl_TexCoord[0].yx);
color.rgb = mix(v_color.rgb*color.rgb, color.rgb, fullbright);
float fogEnabled = mix(u_fogEnabled, c_zero, u_usePalette);
fullbright = max(c_one-fogEnabled, fullbright);
float fogFactor = clamp((gl_Fog.end-gl_FogFragCoord)*gl_Fog.scale, fullbright, c_one);
//float fogFactor = clamp(gl_FogFragCoord, fullbright, c_one);
color.rgb = mix(gl_Fog.color.rgb, color.rgb, fogFactor);
#ifdef POLYMOST1_EXTENDED
vec4 glowColor = texture2D(s_glow, gl_TexCoord[4].xy);
color.rgb = mix(color.rgb, glowColor.rgb, u_useGlowMapping*glowColor.a*(c_one-u_useColorOnly));
#endif
color = mix(color, c_vec4_one, u_useColorOnly);
color.rgb = mix(v_color.rgb*color.rgb, color.rgb, fullbright);
varying mediump vec4 _gl4es_TexCoord[5];
It's "funny", because it's undefined behaviour in C standard, meaning that the compiler is free to do what it wants in this case. Which means that it works on x86 by accident and not by intent.The added "if(heapNodes<2) return;" is a "funny" bug... "heapNodes" is an uint32_t. So when heapNodes is 0 (it happens on 2nd call), heapNodes-2 gives .... around 4 billions... So that function takes forever to run, freeing the games. I guess on x86 there are some implicit uint->int conversion? but not on ARM...
The wrap-around is well-defined for unsigned integers, it's only undefined behaviour if the variable is a signed integer.It's "funny", because it's undefined behaviour in C standard
for (int i = (heapNodes-2)/2; i >= 0; --i) {
...
If I remember correctly the C standard strictly prefers signed integers unless the value is too large to fit in (while compilers apparently prefer to preserve the unsignedness), which leads to the mentioned undefined behaviour due to a signed overflow. Such undefined behaviour is a very popular point for aggressive optimizations, the compiler may just decide to insert that check itself to skip the loop for values that cause undefined behaviour, because "things that don't exist in the standard don't exist at all".then (heapNodes-2)/2 is computed as uint32_t
Index: Common.mak
===================================================================
--- Common.mak (revision 8090)
+++ Common.mak (working copy)
@@ -52,7 +52,7 @@
ifndef SUBPLATFORM
SUBPLATFORM :=
- ifeq ($(PLATFORM),$(filter $(PLATFORM),LINUX DINGOO GCW CAANOO))
+ ifeq ($(PLATFORM),$(filter $(PLATFORM),LINUX DINGOO GCW CAANOO PANDORA))
SUBPLATFORM := LINUX
endif
endif
@@ -364,7 +364,7 @@
endif
# Debugging/Build options
-FORCEDEBUG := 0
+FORCEDEBUG := 1
KRANDDEBUG := 0
PROFILER := 0
# Make allocache() a wrapper around malloc()? Useful for debugging
@@ -405,6 +405,14 @@
override NOASM := 1
else ifeq ($(PLATFORM),$(filter $(PLATFORM),BEOS SKYOS))
override NOASM := 1
+else ifeq ($(PLATFORM),PANDORA)
+ override USE_OPENGL := 1
+ override NETCODE := 0
+ override HAVE_GTK2 := 0
+ override HAVE_FLAC := 1
+ override NOASM := 1
+ override USE_LUAJIT_2_1 := 1
+ SDL_TARGET := 2
endif
ifneq (i386,$(strip $(IMPLICIT_ARCH)))
@@ -450,8 +458,8 @@
LTO := 0
else
- OPTLEVEL := 2
- LTO := 1
+ OPTLEVEL := 3
+ LTO := 0
endif
ifneq (0,$(CLANG))
@@ -576,6 +584,10 @@
COMPILERFLAGS += -D__OPENDINGUX__
else ifeq ($(PLATFORM),SKYOS)
COMPILERFLAGS += -DUNDERSCORES
+else ifeq ($(PLATFORM),PANDORA)
+ COMPILERFLAGS += -D__PANDORA__
+ COMMONFLAGS += -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ffast-math -ftree-vectorize
+ LIBDIRS += -lrt
endif
ASFLAGS += -f $(ASFORMAT)
Index: GNUmakefile
===================================================================
--- GNUmakefile (revision 8090)
+++ GNUmakefile (working copy)
@@ -670,7 +670,11 @@
endif
ifeq ($(SUBPLATFORM),LINUX)
- LIBS += -lFLAC -lvorbisfile -lvorbis -logg
+ ifeq ($(PLATFORM),PANDORA)
+ LIBS += -lFLAC -lvorbisifile
+ else
+ LIBS += -lFLAC -lvorbisfile -lvorbis -logg
+ endif
endif
ifeq ($(PLATFORM),BSD)
Index: source/build/src/polymost.cpp
===================================================================
--- source/build/src/polymost.cpp (revision 8090)
+++ source/build/src/polymost.cpp (working copy)
@@ -1128,10 +1128,21 @@
fogRangeLoc = glGetUniformLocation(polymost2BasicShaderProgramID, "u_fogRange");
fogColorLoc = glGetUniformLocation(polymost2BasicShaderProgramID, "u_fogColor");
+ int polymost1BasicVertLen = strlen(polymost1Vert);
+ char* polymost1BasicVert = (char*) malloc(polymost1BasicVertLen);
+ memcpy(polymost1BasicVert, polymost1Vert, polymost1BasicVertLen);
+ char* extDefineSubstr = strstr(polymost1BasicVert, " #define POLYMOST1_EXTENDED");
+ if (extDefineSubstr)
+ {
+ //Disable extensions for basic fragment shader
+ extDefineSubstr[0] = '/';
+ extDefineSubstr[1] = '/';
+ }
polymost1ExtendedShaderProgramID = glCreateProgram();
- GLuint polymost1BasicVertexShaderID = polymost2_compileShader(GL_VERTEX_SHADER, polymost1Vert);
+ GLuint polymost1BasicVertexShaderID = polymost2_compileShader(GL_VERTEX_SHADER, polymost1BasicVert, polymost1BasicVertLen);
+ GLuint polymost1ExtendedVertexShaderID = polymost2_compileShader(GL_VERTEX_SHADER, polymost1Vert);
GLuint polymost1ExtendedFragmentShaderID = polymost2_compileShader(GL_FRAGMENT_SHADER, polymost1Frag);
- glAttachShader(polymost1ExtendedShaderProgramID, polymost1BasicVertexShaderID);
+ glAttachShader(polymost1ExtendedShaderProgramID, polymost1ExtendedVertexShaderID);
glAttachShader(polymost1ExtendedShaderProgramID, polymost1ExtendedFragmentShaderID);
glLinkProgram(polymost1ExtendedShaderProgramID);
@@ -1138,7 +1149,7 @@
int polymost1BasicFragLen = strlen(polymost1Frag);
char* polymost1BasicFrag = (char*) malloc(polymost1BasicFragLen);
memcpy(polymost1BasicFrag, polymost1Frag, polymost1BasicFragLen);
- char* extDefineSubstr = strstr(polymost1BasicFrag, " #define POLYMOST1_EXTENDED");
+ extDefineSubstr = strstr(polymost1BasicFrag, " #define POLYMOST1_EXTENDED");
if (extDefineSubstr)
{
//Disable extensions for basic fragment shader
@@ -1152,7 +1163,10 @@
glLinkProgram(polymost1BasicShaderProgramID);
free(polymost1BasicFrag);
polymost1BasicFrag = 0;
+ free(polymost1BasicVert);
+ polymost1BasicVert = 0;
+
// set defaults
polymost_setCurrentShaderProgram(polymost1ExtendedShaderProgramID);
glUniform1i(polymost1TexSamplerLoc, 0);
Index: source/build/src/polymost1Vert.glsl
===================================================================
--- source/build/src/polymost1Vert.glsl (revision 8090)
+++ source/build/src/polymost1Vert.glsl (working copy)
@@ -1,5 +1,8 @@
#version 110
+//include an additional space here so that we can programmatically search for and disable this preprocessor definition easily
+ #define POLYMOST1_EXTENDED
+
varying vec4 v_color;
varying float v_distance;
@@ -21,10 +24,10 @@
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TexCoord[0] = mix(gl_TexCoord[0].xyzw, gl_TexCoord[0].yxzw, u_usePalette);
-
+#ifdef POLYMOST1_EXTENDED
gl_TexCoord[3] = gl_TextureMatrix[3] * gl_MultiTexCoord3;
gl_TexCoord[4] = gl_TextureMatrix[4] * gl_MultiTexCoord4;
-
+#endif
gl_FogFragCoord = abs(eyeCoordPosition.z);
//gl_FogFragCoord = clamp((gl_Fog.end-abs(eyeCoordPosition.z))*gl_Fog.scale, c_zero, c_one);
Index: source/build/src/tilepacker.cpp
===================================================================
--- source/build/src/tilepacker.cpp (revision 8090)
+++ source/build/src/tilepacker.cpp (working copy)
@@ -92,6 +92,7 @@
static void maxheap_buildHeap()
{
+ if(heapNodes<2) return;
for (int i = (heapNodes-2)/2; i >= 0; --i)
{
maxheap_bubbleDown(i);
Index: source/build/src/voxmodel.cpp
===================================================================
--- source/build/src/voxmodel.cpp (revision 8090)
+++ source/build/src/voxmodel.cpp (working copy)
@@ -435,14 +435,14 @@
index[(i*2+1)*3+2] = i*4+3;
}
GLint prevVBO = 0;
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vm->vboindex);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint) * 3 * 2 * vm->qcnt, index, GL_STATIC_DRAW);
- glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, prevVBO);
prevVBO = 0;
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ARRAY_BUFFER, vm->vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 5 * 4 * vm->qcnt, vertex, GL_STATIC_DRAW);
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &prevVBO);
glBindBuffer(GL_ARRAY_BUFFER, prevVBO);
Xfree(vertex);
Xfree(index);
Index: source/duke3d/src/config.cpp
===================================================================
--- source/duke3d/src/config.cpp (revision 8090)
+++ source/duke3d/src/config.cpp (working copy)
@@ -227,11 +227,13 @@
ud.config.MixRate = 44100;
#elif defined __ANDROID__
ud.config.MixRate = droidinfo.audio_sample_rate;
+#elif defined __PANDORA__
+ ud.config.MixRate = 22050;
#else
ud.config.MixRate = 48000;
#endif
-#if defined GEKKO || defined __OPENDINGUX__
+#if defined GEKKO || defined __OPENDINGUX__ || defined __PANDORA__
ud.config.NumVoices = 32;
ud.camera_time = 11;
#else