33 |
#include <vob/util/ObjectStorer.hxx> |
#include <vob/util/ObjectStorer.hxx> |
34 |
#include <vob/paper/Paper.hxx> |
#include <vob/paper/Paper.hxx> |
35 |
|
|
36 |
|
|
37 |
#include "org_nongnu_libvob_gl_Paper.h" |
#include "org_nongnu_libvob_gl_Paper.h" |
38 |
|
#include <vob/jni/Strings.hxx> |
39 |
|
#include "vobjnidef.hxx" |
40 |
|
|
41 |
|
|
42 |
using namespace Vob; |
using namespace Vob; |
45 |
namespace Vob { |
namespace Vob { |
46 |
namespace JNI { |
namespace JNI { |
47 |
|
|
48 |
|
extern ObjectStorer<IndirectTexture> indirectTextures; |
49 |
|
|
50 |
using std::cout; |
using std::cout; |
51 |
|
|
52 |
#define GLERR { int er = glGetError(); if(er != GL_NO_ERROR) \ |
#define GLERR { int er = glGetError(); if(er != GL_NO_ERROR) \ |
90 |
papers[id]->resize(size); |
papers[id]->resize(size); |
91 |
} |
} |
92 |
|
|
93 |
|
|
94 |
|
jpf( jint , impl_1Pass_1getNIndirectTextureBinds) |
95 |
|
(JNIEnv *, jclass, jint id, jint pass) { |
96 |
|
return (*papers[id])[pass].indirectTextureBinds.size(); |
97 |
|
} |
98 |
|
|
99 |
|
jpf( void , impl_1Pass_1setNIndirectTextureBinds) |
100 |
|
(JNIEnv *, jclass, jint id, jint pass, jint size) { |
101 |
|
(*papers[id])[pass].indirectTextureBinds.resize(size); |
102 |
|
} |
103 |
|
|
104 |
|
|
105 |
jpf( jint , impl_1Pass_1getNTexGens) |
jpf( jint , impl_1Pass_1getNTexGens) |
106 |
(JNIEnv *, jclass, jint id, jint pass) { |
(JNIEnv *, jclass, jint id, jint pass) { |
107 |
return (*papers[id])[pass].texgen.size(); |
return (*papers[id])[pass].texgen.size(); |
193 |
|
|
194 |
} |
} |
195 |
|
|
196 |
|
jpf( void , impl_1Pass_1putIndirectTextureBind) |
197 |
|
(JNIEnv *env, jclass, jint id, jint pass, jint ind, |
198 |
|
jstring activeTexture, jstring textureTarget, |
199 |
|
int indirectTextureId) |
200 |
|
{ |
201 |
|
GLERR |
202 |
|
|
203 |
|
(*papers[id])[pass].indirectTextureBinds[ind] = |
204 |
|
shared_ptr<IndirectTextureBind>( |
205 |
|
new IndirectTextureBind( |
206 |
|
tokenFromJstring(env, activeTexture), |
207 |
|
tokenFromJstring(env, textureTarget), |
208 |
|
indirectTextures.get(indirectTextureId))); |
209 |
|
|
210 |
|
GLERR |
211 |
|
} |
212 |
|
|
213 |
|
|
214 |
|
|
215 |
|
|
216 |
|
|
217 |
} |
} |
218 |
|
|
219 |
} |
} |