LWJGL
June 20, 2013, 00:15:57 *
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: glColor3fv([n][3])  (Read 895 times)
macninja
Newbie
*
Posts: 4


« on: February 08, 2012, 12:05:07 »

http://lwjgl.org/wiki/index.php?title=About_LWJGL   " Thrown out methods designed for efficient C programming that make no sense at all in java, such as glColor3fv."  

Code:

public void makeSense()
{
public float[][] colors = {{0,0,1},
    {0,1,0},
    {1,0,0},
    {0,1,1},
    {1,0,1},
            {1,1,0},};
GL11.glColor3f(colors[0][0], colors[0][1], colors[0][2]);
||
GL11.glColor3fv(colors[0]);
}
Logged
abcdef
Regular nerd
**
Posts: 82


« Reply #1 on: February 09, 2012, 04:33:59 »

When you realise actually how its implemented in lwjgl you will realised it does indeed make no sense.

All float arrays are passed as FloatBuffers (java.nio), unlike c where you need to define your fixed array's upfront, in java using these you don't.
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!