Sign in to follow this  
golgoth

OpenGL OpenGl lib!

Recommended Posts

golgoth    100
Yes I try everything so far... but no link can get me to the Oficial Latest Opengl lib... I m using 1.2.1 now but some gl function r undeclare such as glActiveTextureARB... (I ve seen some topic on 1.3... specifaication on 1.5 and 2.0... what s going on?? anyone can tell me whats is the latest lib and where I can find it... so far I m going on a clicking frenzy on opengl.org... Help please! Thx

Share this post


Link to post
Share on other sites
mikeman    2942
Functions like that are not part of the GL core right now, and they are accessed through the extension mechanism. Current extensions are listed here, where also you can get the include files(glext.h) which defines the prototypes.

However, glext.h defines only the prototypes.You must get the address of the functions using wglGetProcAdress.Like that:


...
#include "glext.h"
...
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;//function pointer
...

//We must have a valid GL context before we can make this call:
glActiveTextureARB=(PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress("glActiveTextureARB");





Or you can use Glee that does that work for you. I haven't try it yet, but many people recommended it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I dont really know why (AFAIK something related with microsoft not updateing OGL drivers for win to a version bigger than 1.2 or something) but when you program under windows, you dont have those functions just by linking to ogl.lib, you need to get their adress manually like so:


PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;

glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");

Then you can call glActiveTextureARB() like a normal function.

Share this post


Link to post
Share on other sites
golgoth    100
marvellous!!! thx it ok for the extensions!!

but still... just for the record... where do you guys download the latest opengl lib? and what the official latest release?

THX again!

Share this post


Link to post
Share on other sites
mikeman    2942
There is no "latest official lib". I'm not really sure about Linux, but in Windows the core is stuck in the 1.1 specification(I think). That's why we use the extensions.

Recently, the GL spec 2.0 was out, which moves most of the extensions into the core, but I don't know if Microsoft is going to do anything about it. I think we still have to do it through the extension mechanism.

It's no big deal, though. Just update your video card drivers to support the most recent extensions, and you're fine.

Btw, all the infos I gave you(and many more) could be found in the forum FAQ, and it was mentioned by benjamin bunny in your other thread.

Share this post


Link to post
Share on other sites
_the_phantom_    11250
Quote:
Original post by mikeman
Recently, the GL spec 2.0 was out, which moves most of the extensions into the core, but I don't know if Microsoft is going to do anything about it. I think we still have to do it through the extension mechanism.


MS will update to 1.2 when Longhorn comes out.
thats it.
it will be bussiness as normal for windows OGL programmers, all core 2.0 stuff will be accessed via extensions.

Share this post


Link to post
Share on other sites
mikeman    2942
Quote:
Original post by _the_phantom_
Quote:
Original post by mikeman
Recently, the GL spec 2.0 was out, which moves most of the extensions into the core, but I don't know if Microsoft is going to do anything about it. I think we still have to do it through the extension mechanism.


MS will update to 1.2 when Longhorn comes out.
thats it.
it will be bussiness as normal for windows OGL programmers, all core 2.0 stuff will be accessed via extensions.


Damn!
There is one thing I don't understand,though. Ok, we will use vertex shaders for example through extensions. But the card drivers will follow the 2.0 specs, right? Does that mean that we will get vertex shaders in software, if there is no hw support for that extension?

Share this post


Link to post
Share on other sites
Schmedly    366
Quote:
Original post by mikeman
Damn!
There is one thing I don't understand,though. Ok, we will use vertex shaders for example through extensions. But the card drivers will follow the 2.0 specs, right? Does that mean that we will get vertex shaders in software, if there is no hw support for that extension?

When something is promoted to the core it is no longer an extension. So when you have 2.0 compliant drivers, you won't have to access shaders via extensions... for GLSL at least. That means if the driver claims to be 2.0 capable, it has to support everything in the spec, whether it be in hardware or software.

Share this post


Link to post
Share on other sites
Basiror    241
one should report this to some big media companies

microsoft ignores a graphic standard

some bad publicity might bringt the topic of splitting microsoft into pieces due to is monopol like position on the market

blocking the development of opengl which in my eyes is more innovative than directShit could be seen as another act of strengthen the monopolian position

no games on opengl -> no chance for linux to get a hold on the market for games

opengl+fmod+sdl == cross platform alternative to directshit


ie and directshit have been invented to get rid of linux

Share this post


Link to post
Share on other sites
mikeman    2942
Quote:
Original post by Schmedly
Quote:
Original post by mikeman
Damn!
There is one thing I don't understand,though. Ok, we will use vertex shaders for example through extensions. But the card drivers will follow the 2.0 specs, right? Does that mean that we will get vertex shaders in software, if there is no hw support for that extension?

When something is promoted to the core it is no longer an extension. So when you have 2.0 compliant drivers, you won't have to access shaders via extensions... for GLSL at least. That means if the driver claims to be 2.0 capable, it has to support everything in the spec, whether it be in hardware or software.


It is promoted to the core, but if Microsoft updates just to 1.2, like the_phantom said, what can you do? We will still need extensions.

Share this post


Link to post
Share on other sites
_the_phantom_    11250
Quote:
Original post by Schmedly
Quote:
Original post by mikeman
Damn!
There is one thing I don't understand,though. Ok, we will use vertex shaders for example through extensions. But the card drivers will follow the 2.0 specs, right? Does that mean that we will get vertex shaders in software, if there is no hw support for that extension?

When something is promoted to the core it is no longer an extension. So when you have 2.0 compliant drivers, you won't have to access shaders via extensions... for GLSL at least. That means if the driver claims to be 2.0 capable, it has to support everything in the spec, whether it be in hardware or software.


You have to access them AS IF they WERE still extensions because there will be no bindings for them in the lib/dll for windows.

@Basiror:
MS arent blocking the developement thats the thing (well, at least not any more, take what you will from MS leaving the ARB and the ARB processes speeding up...)
You can still access all the latest functions and such, they just dont provide a lib todo it.
DirectX was invented a good few years before Linux even become remotely viable as a game platform (DX5 appeared around 1996) so no, it wasnt invented to 'get rid of linux', it was invented to give a stable set of APIs for games programmers to us to interface with hardware, before then it was the DOS method and write a driver per gfx card or sound card.
You might not like FX however it HAS done its job well and even D3D is needed as it currently the driving force behind graphic card standards, OpenGL as much as I like it isnt in the position to take over the job and wasnt in the position before hand.

Share this post


Link to post
Share on other sites
zedzeek    528
i believ on nvidia cards at least vertexshaders are done in software if theyre not available in hardware. (dont quote me on this though)

also ms updating opengl32.dll is a non issue, just access the function pointers to the new extensions yourself, better yet use a library like glew.

>>but no link can get me to the Oficial Latest Opengl lib... I m using 1.2.1 now b<<

sounds like your drivers are very old, eg my nvidia ones are opengl 1.5 (1.5.2).
just checked some cards (in case u have a lesser used card) at delphi3d and most seem to have later than opengl1.2
eg intel 1.4, matrox 1.3,

Share this post


Link to post
Share on other sites
Schmedly    366
Quote:
Original post by _the_phantom_
You have to access them AS IF they WERE still extensions because there will be no bindings for them in the lib/dll for windows.

I'll choose better wording next time. My point being that the support will be there regardless of whether it's software or hardware.

Share this post


Link to post
Share on other sites
benjamin bunny    838
Quote:
Original post by Enigma
<Off-Topic>
Benjamin Bunny: Just curious as to whether you ever tried the suggestions I made a while ago in this thread (was it really six months ago?!?!)?
</Off-Topic>


Not yet, but I'm planning on implementing lazy loading for the next major version though. So if you call a function, it'll initialize GLee if you haven't already done it, then it'll report an error if the function isn't available on your hardware. I'll probably wait until I can add full support for OpenGL 2.0 though, so that relies on SGI's glext.h being updated.

Share this post


Link to post
Share on other sites
golgoth    100
why dont you just do it the first time?

well, GL extensions are a new concept for me today... I read it quick... I was looking for a lib ... my mistake... I ve learn a lot in this tread tho and I feel better now...

Im not alone...

THX Again!

Benjamin... you are da man!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By povilaslt2
      Hello. I'm Programmer who is in search of 2D game project who preferably uses OpenGL and C++. You can see my projects in GitHub. Project genre doesn't matter (except MMO's :D).
    • By ZeldaFan555
      Hello, My name is Matt. I am a programmer. I mostly use Java, but can use C++ and various other languages. I'm looking for someone to partner up with for random projects, preferably using OpenGL, though I'd be open to just about anything. If you're interested you can contact me on Skype or on here, thank you!
      Skype: Mangodoor408
    • By tyhender
      Hello, my name is Mark. I'm hobby programmer. 
      So recently,I thought that it's good idea to find people to create a full 3D engine. I'm looking for people experienced in scripting 3D shaders and implementing physics into engine(game)(we are going to use the React physics engine). 
      And,ye,no money =D I'm just looking for hobbyists that will be proud of their work. If engine(or game) will have financial succes,well,then maybe =D
      Sorry for late replies.
      I mostly give more information when people PM me,but this post is REALLY short,even for me =D
      So here's few more points:
      Engine will use openGL and SDL for graphics. It will use React3D physics library for physics simulation. Engine(most probably,atleast for the first part) won't have graphical fron-end,it will be a framework . I think final engine should be enough to set up an FPS in a couple of minutes. A bit about my self:
      I've been programming for 7 years total. I learned very slowly it as "secondary interesting thing" for like 3 years, but then began to script more seriously.  My primary language is C++,which we are going to use for the engine. Yes,I did 3D graphics with physics simulation before. No, my portfolio isn't very impressive. I'm working on that No,I wasn't employed officially. If anybody need to know more PM me. 
       
    • By Zaphyk
      I am developing my engine using the OpenGL 3.3 compatibility profile. It runs as expected on my NVIDIA card and on my Intel Card however when I tried it on an AMD setup it ran 3 times worse than on the other setups. Could this be a AMD driver thing or is this probably a problem with my OGL code? Could a different code standard create such bad performance?
    • By Kjell Andersson
      I'm trying to get some legacy OpenGL code to run with a shader pipeline,
      The legacy code uses glVertexPointer(), glColorPointer(), glNormalPointer() and glTexCoordPointer() to supply the vertex information.
      I know that it should be using setVertexAttribPointer() etc to clearly define the layout but that is not an option right now since the legacy code can't be modified to that extent.
      I've got a version 330 vertex shader to somewhat work:
      #version 330 uniform mat4 osg_ModelViewProjectionMatrix; uniform mat4 osg_ModelViewMatrix; layout(location = 0) in vec4 Vertex; layout(location = 2) in vec4 Normal; // Velocity layout(location = 3) in vec3 TexCoord; // TODO: is this the right layout location? out VertexData { vec4 color; vec3 velocity; float size; } VertexOut; void main(void) { vec4 p0 = Vertex; vec4 p1 = Vertex + vec4(Normal.x, Normal.y, Normal.z, 0.0f); vec3 velocity = (osg_ModelViewProjectionMatrix * p1 - osg_ModelViewProjectionMatrix * p0).xyz; VertexOut.velocity = velocity; VertexOut.size = TexCoord.y; gl_Position = osg_ModelViewMatrix * Vertex; } What works is the Vertex and Normal information that the legacy C++ OpenGL code seem to provide in layout location 0 and 2. This is fine.
      What I'm not getting to work is the TexCoord information that is supplied by a glTexCoordPointer() call in C++.
      Question:
      What layout location is the old standard pipeline using for glTexCoordPointer()? Or is this undefined?
       
      Side note: I'm trying to get an OpenSceneGraph 3.4.0 particle system to use custom vertex, geometry and fragment shaders for rendering the particles.
  • Popular Now