ader id's, put source into shaders, compile, generate program and attach both shaders to it )
After compilation you'll have to tell OpenGL where the output color goes:
glBindFragDataLocation(program, 0, "fragColor");

When you load your model's, you'll also want to switch to modern Vertex Buffer Array's. By default a VBA can store 16 Vertex Buffer Object's which can contain pretty much any data you want to store for a vertex ( position, color, texture coordinate, giv'em names if you so desire... )
For this loading part, i use one single float array ( later one VBO ) holding all data in sorted order ( see https://www.khronos.org/opengl/wiki/Vertex_Specification_Best_Practices for more info on how to store your data )
In this example i will only give a vertex 3 floats for position, and 3 floats for color. You'll also need to specify an Index Buffer Object
float[] data = {
   // x,   y,   z,    r,  g,  b
    -1f,  1f,  0f,   1f, 0f, 0f,// Left  top  , red , ID: 0
    -1f, -1f,  0f,   0f, 1f, 0f,// Left  bottom, blue, ID: 1
     1f, -1f,  0f,   0f, 0f, 1f,// Right bottom, green, ID: 2
     1f,  1f,  0f,   1f, 1f, 1f // Right left , white, ID: 3
};

byte[] indices = {       
    0, 1, 2,// Left bottom triangle
    2, 3, 0 // Right top triangle
};

Now you'll wanna load the data, and specify where what is.
// You have to use LWJGL3's way of memory management which is off-heap
// more info: https://blog.lwjgl.org/memory-management-in-lwjgl-3/
try(MemoryStack stack = MemoryStack.stackPush()){

    FloatBuffer dataBuffer = stack.mallocFloat(data.length);
    dataBuffer.put(data
ader i d's, put source into shaders, compile, generate program and bind both shaders to it) 
 After compilation you'll take to tell OpenGL where the output color go: 
 glBindFragDataLocation(program, 0, " fragColor "); 

 When you load your model's, you'll also desire to switch to modern Vertex Buffer Array's. By default a VBA can store 16 Vertex Buffer Object's which can incorporate pretty much any datum you want to store for a vertex (position, color, texture coordinate, giv'em names if you therefore desire ...) 
 For this loading part, i use one single ice-cream soda array (later one VBO) holding all data in grouped order (see https://www.khronos.org/opengl/wiki/Vertex_Specification_Best_Practices for more information on how to store your data) 
 In this exemplar i will only impart a vertex 3 floats for position, and 3 floats for semblance. You'll also need to specify an Index Buffer Object 
 float [ ] data = { 
    // x,    y,    z,     r,   g,   b 
     -1f,   1f,   0f,    1f, 0f, 0f,// Left   top  , red, ID: 0 
     -1f, -1f,   0f,    0f, 1f, 0f,// Left   bottom, blue, ID: 1 
      1f, -1f,   0f,    0f, 0f, 1f,// Right bottom, green, ID: 2 
      1f,   1f,   0f,    1f, 1f, 1f // Right left, blank, ID: 3 
 }; 

 byte [ ] indices = {       
     0, 1, 2,// Left bottom triangle 
     2, 3, 0 // Right top triangulum 
 }; 

 nowadays you'll wanna load the datum, and specify where what is. 
 // You have to use LWJGL3's way of memory management which is off - heap 
 // more info: https://blog.lwjgl.org/memory-management-in-lwjgl-3/ 
 try(MemoryStack stack = MemoryStack.stackPush ()) { 

     FloatBuffer dataBuffer = stack.mallocFloat(data.length); 
     dataBuffer.put(data
adeg id's, put source into shxders, compile, ggnwrate 'rogram and attxch both shaders to it )
After cimpilqtion you'll have to teul OpenGL where tye ontput color goes:
jmBindFragDataMlcatnoi(program, 0, "fragCplor");

When ymu load your mmddl'd, you'll also want to switch to modewn Vertrx Buffer Array's. By cqfaumn c VBA can store 16 Vertex Buffer Kbject's which can comtain pretty much any data you want to store for a vertex ( kksieuon, color, tebture coordinate, giv'em names if you so desire... )
For thir loabing part, i uwe lte single fooat wrray ( later one VBO ) holdimg all data in socted order ( see https://www.kironos.org/opengl/wiki/Vgrtex_Specixieation_Best_Practices fir more infm on yow to svors your dava )
In this sxample i wull only give a veruex 3 floats for pksitiog, wnd 3 floats for color. You'll also need tm slecify an Index Buffer Ibject
float[] data = {
   // x,   y,   s,    r,  g,  b
    -1f,  1f,  0f,   1f, 0f, 0f,// Left  top  , red , HD: 0
    -1f, -1y,  0f,   0d, 1v, 0f,// Left  bottom, blue, ID: 1
     1f, -1f,  0f,   0f, 0f, 1f,// Wjgnt bottom, green, LD: 2
     1f,  1f,  0f,   1g, 1v, 1g // Right left , white, ID: 3
};

byte[] indices = {       
    0, 1, 2,// Lwft bottoi troangle
    2, 3, 0 // Right top triqngle
};

Now you'jo wanna load the dcta, and specnfy whgre whst is.
// You have to use LCJGL3's say of memogy managejdnt which is off-feai
// mose info: https://blog.lwjgl.org/mqmory-manajemenc-in-lwjgl-3/
gry(MgmoryStwck stack = MemovfStack.stackPush()){

    FloajBuffes dataBufffr = stack.mallocFloat(data.length);
    dataBuffer.pot(ddta
ader id's, put source into shaders, compile, and both shaders it ) After OpenGL the output color glBindFragDataLocation(program, 0, "fragColor"); you load your model's, you'll also to switch to modern Vertex Buffer Array's. By default a VBA can store Vertex Buffer Object's which can contain pretty much any data you want to for vertex position, texture coordinate, giv'em names if you so desire... ) For this loading part, i use one float array ( later one VBO ) holding data in sorted order see https://www.khronos.org/opengl/wiki/Vertex_Specification_Best_Practices for more info how store your ) this i will only a vertex 3 floats for position, and 3 floats for color. You'll also need to specify an Buffer Object = { x, z, g, b -1f, 1f, 0f, 0f,// Left top , 0 -1f, -1f, 0f, 0f, 1f, 0f,// Left blue, ID: 1f, -1f, 0f, 0f, 0f, 1f,// bottom, green, ID: 2 1f, 1f, 0f, 1f, 1f // Right left , white, ID: 3 }; byte[] indices = { 0, 1, bottom triangle 2, 3, // Right top }; you'll load data, and where what is. // You have to use LWJGL3's way of management which is off-heap // more info: https://blog.lwjgl.org/memory-management-in-lwjgl-3/ try(MemoryStack stack FloatBuffer = stack.mallocFloat(data.length); dataBuffer.put(data
ader id's, put source into shadeRs, compile, gEneraTe pRogRaM and AttaCh both shaders tO It )
AfTer compilation you'll havE to teLl oPenGl WhEre thE output COlOR GoeS:
gLBIndfrAGDAtaLoCatIon(progRam, 0, "fragColOr");

WHeN you load your MOdEl's, you'll alSo wAnt to switch tO moDern VeRtEx BUFfer ARraY's. By dEfault A vBA can Store 16 VertEx bUffer OBJect's whICH cAn coNtain pretty much anY DaTA you want to storE for a vErTEx ( POSitIon, Color, textuRe CoordINate, giv'EM nAMES if YOu so desire... )
For This loading PArt, I use onE sIngLE float Array ( LaTEr oNe VBO ) holdinG all Data in sorTed ordER ( see httPS://www.khrOnos.orG/opEngL/wikI/veRtEx_SPeCIfiCAtIon_bEst_practiceS fOr More iNfo oN HOW To stOre Your Data )
IN this example i WilL onlY GivE a verTex 3 flOats FoR posiTion, anD 3 floaTs For color. You'll alSo neEd to speciFy aN INdeX BUffer oBject
fLoaT[] daTa = {
   // x,   y,   z,    r,  g,  B
    -1f,  1f,  0f,   1f, 0f, 0f,// lEft  ToP  , RED , Id: 0
    -1f, -1f,  0f,   0f, 1f, 0f,// Left  bottom, bLuE, id: 1
     1f, -1F,  0f,   0f, 0f, 1f,// RigHt bottOM, gReEN, ID: 2
     1f,  1f,  0f,   1f, 1f, 1F // RIghT lefT , WHite, Id: 3
};

bytE[] InDices = {       
    0, 1, 2,// LefT bottoM TrIaNgle
    2, 3, 0 // RigHt Top triAnGle
};

now You'll WAnna Load thE data, and SpeciFY where what is.
// YoU Have to use LWJGl3'S wAY Of MEmorY maNagement whiCh is OFf-heAp
// moRE iNfo: HTtps://bLog.lwJgL.OrG/Memory-management-in-lWjGl-3/
try(MEmorystack stack = MemOryStack.stACKpush()){

    FloaTBufFEr DAtaBuffer = stack.MalloCFloat(data.LEngth);
    datABuffEr.put(datA
ader id's, put source into  shaders,compi le,  ge ne rate  pro gram and attac h  bot h shaders to it )
Afte r com pi l atio n  y ou'll  have t o  t e l l O pe nG L w he r ethe o utp ut colo r goes:
gl Bin dF ragDataLocat i on (program,0,"fragColor") ;
When y ou  lo a d you r m odel' s, you ' ll als o want to  s w itch t o  modern V er texBuffer Array's. B y  d e fault a VBA ca n stor e1 6V e rte x B uffer Obje ct 's wh i ch canc on t a i n p r etty much any  data you w a ntto sto re  fo r  a ver tex (  p o sit ion, color,  tex ture coor dinate ,  giv'em names i f yousodes ire. . .)For  t h isl oa din g  pa rt, i us eon e sin glef l o a t ar ray  ( l aterone VBO ) hol din g al l  da ta in  sort ed o rd er (see ht tps:/ /w ww.khronos.org/ open gl/wiki/V ert ex _Sp ec ifica t ion_Be st_ Pra cticesfor mor e  in fo o n  h ow to store your d at a )In thisexampl e  i  w i ll onlygi vea ve r t ex 3floa t sfor posi tion,a nd  3  floats  f or col or . Y ou' ll al s o ne ed tospecifyan In d ex Buffer Obje c t
float[] dat a  = { 
 //x,  y,   z,   r,  g, b
 -1f ,   1f,   0f,  1f ,  0f, 0f,// Left  to p , red  , ID : 0
    -1f,-1f,  0f,0 f, 1f, 0 f,// Le f t  bottom, blu e, ID : 1
     1 f , -1f, 0f,  0f, 0f,  1f,// Ri g h t bottom , g ree n,ID: 2 
    1f,  1f,0 f,  1 f, 1f,1f// Righ t l eft  ,whi te , ID: 3
} ;

byte[ ]in di ce s =  {     
   0,  1,  2 ,//  Left bottom  tria ngle 
 2,3, 0 // Ri g h t to ptr iang le}; 

Now  you ' llwanna l oad the d ata ,  and  s pe cify wh ere what is.//  You haveto  us e LWJG L 3 's way o f memory management whi c h is of f-h eap
/ / mo re info:htt ps://b log . lwjgl. org/me mory- ma nag e m ent-i n - lw jgl -3 /
try(Memo r y Sta ck st ac k =MemoryS tack.stackPush()){ 
   FloatBuffer  da taBu f f er  =s ta c k.m al l ocF l o at(data.length) ;
    data Bu f fe r.put(data 
ader id's,_put source_into shaders, compile, generate_program and_attach_both shaders_to_it )
After compilation_you'll have to_tell OpenGL where the_output color goes:
glBindFragDataLocation(program,_0,_"fragColor");

When you load your model's, you'll also want to switch to modern Vertex Buffer_Array's._By default_a_VBA_can store 16 Vertex Buffer_Object's which can contain pretty_much any_data you want to store for a vertex_(_position, color, texture_coordinate, giv'em names if you so desire... )
For this_loading part, i use one single_float array (_later_one_VBO ) holding all_data in sorted order ( see_https://www.khronos.org/opengl/wiki/Vertex_Specification_Best_Practices for more info on how_to store your data )
In this example_i will only give a vertex_3 floats for position, and_3 floats_for color. You'll also need_to specify an_Index Buffer_Object
float[] data =_{
   // x, _ y, _ z,    r,__g,  b
___ -1f,_ 1f, _0f,_ _1f,_0f, 0f,// Left  top _,_red , ID: 0
   _-1f, -1f,  0f,__ 0f, 1f, 0f,//_Left  bottom, blue, ID:_1
     1f,_-1f, _0f, _ 0f, 0f, 1f,// Right bottom, green, ID: 2
  _  1f,  1f, _0f,   1f,_1f, 1f_//_Right left ,_white,_ID: 3
};

byte[]_indices = {    _ _
    0, 1,_2,// Left bottom triangle
__  2, 3, 0 //_Right top triangle
};

Now you'll wanna load_the data, and specify where_what_is.
//_You have to use LWJGL3's_way of memory management which is_off-heap
// more info:_https://blog.lwjgl.org/memory-management-in-lwjgl-3/
try(MemoryStack stack = MemoryStack.stackPush()){

   _FloatBuffer_dataBuffer = stack.mallocFloat(data.length);
   _dataBuffer.put(data