Batmanifestdestiny
Level 1
When life gives you lemons, make an internet craze
|
|
« on: June 06, 2009, 04:16:29 PM » |
|
So, this is going to sound really dumb, but where do I get the OpenGL library? I looked on the page but it had all these weird other things called Glee and stuf..
|
|
|
Logged
|
"Sweet Sacajewea, Batmanifestdestiny! We've struck GOLD!" -Joseph, Utah Wonder
You have to plagierize the Italian.
|
|
|
Snakey
|
|
« Reply #1 on: June 06, 2009, 05:08:21 PM » |
|
OpenGL comes with Windows and most other platforms. Often, it's already on your hard drive without you even realizing it. Most tutorials will point you in the right direction.
|
|
|
Logged
|
I like turtles.
|
|
|
skyy
|
|
« Reply #2 on: June 07, 2009, 11:03:38 AM » |
|
OpenGL comes with your operating system. Currently 2.0 is the de facto to program with, but windows machines generally have 1.x something. Linux comes with 2.0. 3.0 is the latest, I think. But yeah, if you want to do 2.0 in Windows platform it generally means you'll have to go with plugins. Also, no need to really bother about the "omg what are these openGL versions"-crap when learning OpenGL. Just whip up OpenGL tutorials off the internet and start programming. They will work on your machine
|
|
|
Logged
|
|
|
|
m3xican
Level 1
si vis pacem para bellum
|
|
« Reply #3 on: June 08, 2009, 02:35:26 AM » |
|
Actually, Windows doesn't install any OpenGL header/lib. An OpenGL implementation comes with 3D graphic drivers, like Nvidia or Ati, and usually you need some extension lib like Glew to have an easy access to all the GL extensions, especially for an unfriendly system like windows.
|
|
|
Logged
|
|
|
|
Batmanifestdestiny
Level 1
When life gives you lemons, make an internet craze
|
|
« Reply #4 on: June 08, 2009, 04:47:25 AM » |
|
I just put all the Glew files into my library folder, right?
|
|
|
Logged
|
"Sweet Sacajewea, Batmanifestdestiny! We've struck GOLD!" -Joseph, Utah Wonder
You have to plagierize the Italian.
|
|
|
m3xican
Level 1
si vis pacem para bellum
|
|
« Reply #5 on: June 08, 2009, 05:28:04 AM » |
|
Installation and Basic Usage should give you all the knowledge you need.
|
|
|
Logged
|
|
|
|
Impossible
|
|
« Reply #6 on: June 08, 2009, 11:13:53 AM » |
|
Actually, Windows doesn't install any OpenGL header/lib.
Assuming he's using Visual Studio, that will come with OpenGL headers and libs. It is rare for people to use Win32 + OpenGL directly. You should look into using SDL, SFML or GLFW. Honestly based on your question I would recommend looking into Processing, openframeworks (if you're set on C++), or Pyglet. It will be much easier to get started.
|
|
|
Logged
|
|
|
|
m3xican
Level 1
si vis pacem para bellum
|
|
« Reply #7 on: June 08, 2009, 12:26:17 PM » |
|
Actually, Windows doesn't install any OpenGL header/lib.
Assuming he's using Visual Studio, that will come with OpenGL headers and libs. A programmer should never make assumptions... Anyway, I don't remember any VS installed within the vanilla version of win
|
|
|
Logged
|
|
|
|
Impossible
|
|
« Reply #8 on: June 09, 2009, 08:54:12 AM » |
|
A programmer should never make assumptions... Anyway, I don't remember any VS installed within the vanilla version of win Its not... but no C++ compiler is installed with the vanilla version of windows so its a moot point. Any C++ development platform on Windows that I can think of will include OpenGL libraries. Please correct me if you know one that doesn't.
|
|
|
Logged
|
|
|
|
Batmanifestdestiny
Level 1
When life gives you lemons, make an internet craze
|
|
« Reply #9 on: June 09, 2009, 11:28:57 AM » |
|
Okay, I have 1 point, and 2 questions:
1. Never make assumptions. I use Codeblocks for all my programming.
2. Is SDL a respectable library, or one of those "get rich quick" scheme things for C++ like certain libraries that I will not mention for fear of flaming?
3. Is Openframeworks OS independent? I'm in the process of switching to Linux.
|
|
|
Logged
|
"Sweet Sacajewea, Batmanifestdestiny! We've struck GOLD!" -Joseph, Utah Wonder
You have to plagierize the Italian.
|
|
|
Ivan
Owl Country
Level 10
alright, let's see what we can see
|
|
« Reply #10 on: June 09, 2009, 12:02:30 PM » |
|
SDL is a great OS wrapper. I use it for pretty much everything. I wouldn't make it an integral part of whatever you're doing though. Abstract the platform so you can easily change it if need be, but SDL is a good place to start.
|
|
|
Logged
|
|
|
|
Ryan
Level 1
|
|
« Reply #11 on: June 09, 2009, 12:24:20 PM » |
|
Yeah, SDL is used quite a bit in cross-platform games, there's no real reason to need to do what it handles yourself. If you are looking for something lighter weight, I also really like the underrated GLFW library. It only supports TGA textures out of the box, and doesn't provide sound capabilities, but once you have a nice codebase built up I prefer it over SDL. SDL + SDL_mixer + SDL_image + SDL_net + SDL_ttf has everything you need to make a great game. But like what Ivan said, I recommend abstracting away your libraries just in case if you ever want to rip them out and to replace with something else. If you're on Windows and want to use the gcc toolchain, grab mingw and either GLFW or SDL and you'll be set. If you're on OS X once you install the developer tools, download GLFW/SDL and you're set as well. If you're on GNU/Linux, use the package manager with your distro. On something like Ubuntu there'll be a package called build-essential you will want to apt-get install, which will give you your compiler. The GL libraries are called libglu1-mesa-dev or something similar- if you install SDL the package manager should also select the GL development libraries for you, though.
|
|
|
Logged
|
|
|
|
Impossible
|
|
« Reply #12 on: June 09, 2009, 04:03:56 PM » |
|
3. Is Openframeworks OS independent? I'm in the process of switching to Linux.
It supports Windows, Linux and Mac OS.
|
|
|
Logged
|
|
|
|
Eclipse
|
|
« Reply #13 on: June 11, 2009, 02:29:24 PM » |
|
So, this is going to sound really dumb, but where do I get the OpenGL library? I looked on the page but it had all these weird other things called Glee and stuf..
welcome to the fantastic world of openGL, where no SDK exists and the API is now an awful mess of deprecated stuff wrapped on a sea of third party headers and such. If you need it to do something in 3d i really suggest you to use DirectX if a mac version of your game is not a priority in your mind. For 2d, search something that wraps opengl and try to deal the less you can with it
|
|
|
Logged
|
<Powergloved_Andy> I once fapped to Dora the Explorer
|
|
|
Impossible
|
|
« Reply #14 on: June 12, 2009, 09:16:50 AM » |
|
If you need it to do something in 3d i really suggest you to use DirectX if a mac version of your game is not a priority in your mind. For 2d, search something that wraps opengl and try to deal the less you can with it
Finally some sanity and good advice . Although he said he was moving to Linux, so he'll have an even harder time with OpenGL than he would on Windows and he'll be forced to use it :D. If he just wants to do some GL 1.1 style textured polygons with immediate mode vertex calls, OpenGL will be ok. Of course, then I think there are better alternatives for beginners than vanilla OpenGL (as has been said.)
|
|
|
Logged
|
|
|
|
Ivan
Owl Country
Level 10
alright, let's see what we can see
|
|
« Reply #15 on: June 12, 2009, 09:56:27 AM » |
|
OpenGL is really not that bad. I'm using all kinds of extensions and Cg for shaders and I've had no issues compiling it between OSX and Windows aside from having to make some manual function pointers for OpenGL under Mingw.
|
|
|
Logged
|
|
|
|
Eclipse
|
|
« Reply #16 on: June 12, 2009, 02:31:01 PM » |
|
OpenGL is really not that bad. I'm using all kinds of extensions and Cg for shaders and I've had no issues compiling it between OSX and Windows aside from having to make some manual function pointers for OpenGL under Mingw.
yup, i'm writing an opengl renderer for my engine too, but the code looks way uglier than the one that uses DirectX and the API is quite messy, it's indeed robust but is also full of garbage, I really suggest to use DirectX if someone ask me about learning low level 3d programming, unless someone is not confortable with object oriented programming. Cg is awesome! I use HLSL but I've already implemented CG for both my renderings and the syntax is almost identical to the one used in HLSL Shaders
|
|
|
Logged
|
<Powergloved_Andy> I once fapped to Dora the Explorer
|
|
|
Ivan
Owl Country
Level 10
alright, let's see what we can see
|
|
« Reply #17 on: June 12, 2009, 02:41:46 PM » |
|
The best way to go is to abstract the renderer completely and use whatever.
|
|
|
Logged
|
|
|
|
mewse
|
|
« Reply #18 on: June 12, 2009, 03:53:41 PM » |
|
yup, i'm writing an opengl renderer for my engine too, but the code looks way uglier than the one that uses DirectX and the API is quite messy, it's indeed robust but is also full of garbage, I really suggest to use DirectX if someone ask me about learning low level 3d programming, unless someone is not confortable with object oriented programming.
Dude. As has already been stated twice, he's switching to Linux, so DirectX is not an option for him. Can we stop with the API zealotry, please? It's not appropriate here.
|
|
|
Logged
|
|
|
|
nihilocrat
|
|
« Reply #19 on: June 12, 2009, 07:50:27 PM » |
|
I've never touched DirectX so I can't really judge, but I'm just peachy with OpenGL.
If you don't want to write mesh-loading code and other wheels that have been invented already, contemplate a 3D engine like OGRE3D. However, if you want to easily have full control over rendering then going with OpenGL + SDL works pretty well or any of the myriad libraries already mentioned.
|
|
|
Logged
|
|
|
|
|