/[gzz]/gzz/gfx/jni/GzzGL-jni.cxx
ViewVC logotype

Diff of /gzz/gfx/jni/GzzGL-jni.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by tjl, Tue Sep 17 06:52:34 2002 UTC revision 1.19 by tjl, Tue Sep 17 09:23:23 2002 UTC
# Line 388  GLenum tokenFromJstring(JNIEnv *env, jst Line 388  GLenum tokenFromJstring(JNIEnv *env, jst
388      return ret;      return ret;
389  }  }
390    
391    JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1loadNull2D
392      (JNIEnv *env, jclass, jint id, jint level, jstring internalFormat_s,
393        jint w, jint h, jint border, jstring format_s, jstring type_s) {
394        int internalFormat = tokenFromJstring(env, internalFormat_s);
395        int format = tokenFromJstring(env, format_s);
396        int type = tokenFromJstring(env, type_s);
397    
398        glBindTexture(GL_TEXTURE_2D, id);
399        // Null = just set size and texture format.
400        glTexImage2D(GL_TEXTURE_2D,
401                    level, internalFormat, w, h, border, format, type, NULL);
402        glBindTexture(GL_TEXTURE_2D, 0);
403        GLERR
404      }
405    
406    JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1loadSubImage
407      (JNIEnv *env, jclass, jint id, jint level, jint imageId, jint xoffs, jint yoffs) {
408    
409        glBindTexture(GL_TEXTURE_2D, id);
410        glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
411    
412        Image *img = images.get(imageId);
413        img->loadIntoTexture(level, xoffs, yoffs);
414        glBindTexture(GL_TEXTURE_2D, 0);
415        GLERR
416    }
417    
418  JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1shade  JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1shade
419    (JNIEnv *env, jclass, jint id, jint w, jint h, jint d, jint comp,    (JNIEnv *env, jclass, jint id, jint w, jint h, jint d, jint comp,
420          jstring internalFormat,          jstring internalFormat,

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26