LWJGL
May 23, 2012, 03:00:42 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Using GL42  (Read 889 times)
ghillieLEAD
Newbie
*
Posts: 6


« on: November 04, 2011, 22:54:33 »

In the past I have only ever worked with GL11.  Now I want to use shaders and the cool new features.  However, when I use:

Code:
import static org.lwjgl.opengl.GL42.*;

only a handfull of OpenGL functions are available to me.  Do I need to import past versions as well?  Am I missing something/doing something wrong? 
Logged
kappa
Administrator
Nerdus Imperius
*****
Posts: 961



« Reply #1 on: November 05, 2011, 00:29:22 »

yes, you need to import other opengl classes too, since methods are in the classes depending on the OpenGL version they were introduced. Usually the best way to do this is by using the OpenGL SDK  http://www.opengl.org/sdk/

e.g. If I want to use glShaderSource, the docs (notes section) here tell you that it was introduced in OpenGL 2.0, hence you would need to import GL20.
Logged
ghillieLEAD
Newbie
*
Posts: 6


« Reply #2 on: November 05, 2011, 09:18:50 »

Thanks so much for clearing that up for me!
Logged
Pages: [1]
  Print  
 
Jump to:  

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