View Full Version : Is it C or C++ or what is this?
10-15-2009, 04:04 AM
Hi, this is a very noob question, I am searching this question in google but no clear anwser, so I decide to ask the forum
So can you explain how the opengl language works, I dont understand if this is C or C++, or how that works
10-15-2009, 04:44 AM
What made u think of this question .. Ofcourse it is in C++...
10-15-2009, 04:49 AM
opengl language : do you mean the shading language, GLSL ? or the OpenGL API it self ?
The GL API is defined as C, but easily compatible with all sorts of other languages.
10-15-2009, 05:10 AM
Thanks ZbuffeR, well know I wonder both GLSL and OpenGL API? you said OpenGL is C how about GLSL? from that article I understand I can pick any programming language, but what I dont understant is if OpenGL is C, and I want to use PASCAL how they manage to work together?
Other people please dont post if you are not going to help, if you think this is a stupid question, just skip it
10-15-2009, 07:55 AM
OpenGL is an API not to be confused with GLSL which is not.
GLSL is an internal language that is C-like. It is not compiled with an external compiler like Pascal, C, C++, etc. It is only used to write graphics shaders; vertex, fragment, and geometry shaders. These do very specific things related only to the graphics pipeline. The key with GLSL is that it is compiled at RUNTIME by the openGL driver -- you write a string consisting of C-like GLSL commands and send that string to the driver using your favorite flavor of openGL API (C, C++, Pascal, Ruby, Perl, etc).
If you are new to openGL, starting with shaders and the GLSL can be confusing. You will first need to simply use the openGL API. I am not a pascal user but a quick search led to a tutorial page that may be helpful to you using Pascal (http://www.sulaco.co.za/tut.htm). Once you become familiar with using the openGL API in your favorite language (Pascal) you then can start to apply the GLSL C-like string to your graphics toolkit -- this will be controlled at the top level still by your openGL API Pascal code.
10-15-2009, 08:54 AM
Thanks marshats, I am not a Pascal fan, I just mention it to illustrate my question
This OpenGL stuff is starting to make more sence, I am a designer how likes to code, and now I want to learn this more advance programming languages, it is all a bit confusing the first time...
10-15-2009, 09:58 AM
OpenGL is not a programming language, it is an API, aka a set of types, constants, functions and stuff like that.
10-15-2009, 10:11 AM
and OpenGL is also available for many languages(ie c,c++,java,python).
if you don't know API
API means Application programming interface
M3G (may be)
Mascot Capsule (hi)
as much you can count
yes it looks Non OpenGL but may help the new user
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.