LWJGL
May 19, 2013, 14:50:59 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Shader API and Java String  (Read 1182 times)
Tomas
Newbie
*
Posts: 2


« on: June 15, 2010, 12:50:18 »

Hi,

I was playing with some glsl coding and to my suprise I found that the LWJGL implementation of some function don't use java Strings ?

  glBindAttribLocation(int program, int index, ByteBuffer name);
  glShaderSource(int shader, ByterBuffer string);

Why don't these functions use regular Java String as the last argument ? Is there a good reason or am I missing something. It feels kind of counter productive to push and pop strings in and out of bytebuffers.

Cheers
// Tomas
Logged
spasi
Nerdus Imperius
*****
Posts: 752



WWW
« Reply #1 on: June 15, 2010, 16:50:46 »

The latest LWJGL version provides alternate versions for both of these methods, with CharSequence arguments (String implements CharSequence). Many other alternate methods are supported, see this thread for details.
Logged
Tomas
Newbie
*
Posts: 2


« Reply #2 on: June 15, 2010, 17:31:43 »

Sweet Cheesy
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!