Archived

This topic is now archived and is closed to further replies.

vish40

OpenGL Questions for people who know OpenGL pretty well!!!

Recommended Posts

hey guys, I have been programming in OpenGL for about 6 months. I have read tutorials on several of the website. They were great, especially NeHe''s, but they only take to a certain level. I am at a level where I can create a 3d object and do alpha blending, lighting, texturing and all other low level stuff. I can''t seen to go anywhere from here. So I have a question to ask you OpenGL programmers. How did you go about learn OpenGL and what step did you took to get to the level you''re at. I would also like to know the following things: I do i go about programming a level in OpenGL. Are there any tutorials that I can help with this process. Thanks for your replys.

Share this post


Link to post
Share on other sites
See the problem with this is that i dont know how to program that. Is there a website that explains the process of creating complex object or even my own format.

Thanks again for your replys.

Share this post


Link to post
Share on other sites
I learnt by programming a simple 3D game, referring to the OpenGL pages on MSDN.

If you''ve done a lot of tutorials, it''s probably time you weened yourself off them. Tutorials are okay if you want to get your feet wet, but at some point you need to learn to think for yourself. Copying and pasting really doesn''t teach you that much.

Share this post


Link to post
Share on other sites
quote:
Original post by vish40
See the problem with this is that i dont know how to program that. Is there a website that explains the process of creating complex object or even my own format.

Thanks again for your replys.


Oh dear. My initial suspicion was correct: you're a copy and paste programmer without a clue about designing your own code. Perhaps you should just learn to program instead. Before you ask, no, there isn't a web page which will teach you how to program. You need to learn yourself.

When you have some more specific questions, come back and ask them, and I'm sure we'll do our best to help you out.

[edited by - benjamin bunny on September 2, 2003 7:48:36 PM]

Share this post


Link to post
Share on other sites
I don't think you guys are being fair to this poster. He's not asking for another tutorial, he's asking for some ideas as to where to proceed. Even if you're not copying & pasting, you still burrow other people's ideas. Nobody wants to reinvent the wheel, except maybe for a purely academic challange.

vish40: If you're feeling adventurous, you can try your hand at loading an existing file format, such as Quake2 BSP. There are documents for doing this such as:

http://www.flipcode.com/tutorials/tut_q2levels.shtml

This shows you not only how to read in a specific format (so you can use existing artwork to develop your own rendering techniques) but also what information goes into the level besides geometry.

If you keep your loading code moderatly separate from your drawing code, you can always go back and replace or extend the file format later.

Hope that helps.

Tom

[edited by - ParadigmShift on September 2, 2003 7:58:08 PM]

[edited by - ParadigmShift on September 2, 2003 7:59:38 PM]

[edited by - ParadigmShift on September 2, 2003 8:01:26 PM]

Share this post


Link to post
Share on other sites
As for models, I''ve learned a lot from a book called Focus on 3D Models by PremierPress. In the book they go over the concept in a pretty API-Independent way, and then you can go to the CD for the examples written using OpenGL. It is another book, but you might actually walk way understanding what your doing rather than guessing, or cutting and pasting. It goes over most of the major format, i.e. .OBJ (MAYA), .3DS (3DS Max), .MD2 (Quake 2), .MD3 (Quake 3), MDL (half-life), etc.

There are plenty of websites available as well to learn the level-rendering stuff like GameTutorials.com. There is also another book by the same company called Focus on Terrain someting where it teaches you several methods for generating terrain algorithimically. When it comes down to it, we all get our ideas from someone else. Even John Carmack has stated that all he does is embrace and extend other''s ideas.

Kill ''''em all!!! Let Allah sort em out

Share this post


Link to post
Share on other sites
What you really need is not another programming resource.

As benjamin bunny stated, copying and pasting won't take you very far.

What you really need is a project, such as a simple game or demo program. Another source of programming projects is employment, but generally the projects are dictated to you. At your level, a simple game or demo is probably what you should be looking into.


[edited by - jeeky on September 2, 2003 9:16:30 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by vish40
hey guys,
I have been programming in OpenGL for about 6 months. I have read tutorials on several of the website. They were great, especially NeHe''s, but they only take to a certain level. I am at a level where I can create a 3d object and do alpha blending, lighting, texturing and all other low level stuff. I can''t seen to go anywhere from here.

So I have a question to ask you OpenGL programmers. How did you go about learn OpenGL and what step did you took to get to the level you''re at.

I would also like to know the following things:
I do i go about programming a level in OpenGL.
Are there any tutorials that I can help with this process.

Thanks for your replys.



to answer you instead of bashing you (yes, every once in a while i am on that side of the fence):

if you have followed and understood the NeHe stuff, your next step might be to put it all together. using the stuff you learned, work out a small project you want to do (or even just simple demo things to test your skills) and try to implement it.

there are books you can buy or download (depending on the book) to learn more about openGL. there are more tutorials and such on the internet, but most don''t go further then NeHe''s and aren''t as good anyway.

as for model loading, you will have to look up the file format you want to use (try the "wotsit" site affiliated with gamedev, i don''t remember the URL) and write a function to load such a file into memory and draw it with OpenGL. creating your own format might be simpler, but then you also have to write the editor program, or a plugin to export it from another editor, which is a pain.

after you have tried some of these things, more specific questions will hopefully be answered here for you in a nicer manner.

Share this post


Link to post
Share on other sites
Hey dude..

I have been working on a model format now. Its part of my engine for opengl. I have been using flexporter with 3dstudios. I would love some help with this. I have a fair amount done already. Email me at zander@echotech.ca

Later, ben

Share this post


Link to post
Share on other sites
Oh, almost forgot.

May i remind everybody about learning GL is a lot like learning c++. At first you are scared of it then after a few months you start to get a good grip, you have the syntex down and know a few things. At that point you start to wonder what seperates you from the game programers and have no idea how to get there. Its not until you have been doing it for the next few months and you are wondering why your copy of pong is not running as fast as quake as you start to realize that you don''t know anything and now is the time to really learn.
I am getting the feeling he is at the last stage. Hes got the syntex and starting to feel confortable and wants to know what the next step is.

Later, ben

Share this post


Link to post
Share on other sites
quote:
Original post by zander76
At that point you start to wonder what seperates you from the game programers and have no idea how to get there. Its not until you have been doing it for the next few months and you are wondering why your copy of pong is not running as fast as quake as you start to realize that you don''t know anything and now is the time to really learn.
I am getting the feeling he is at the last stage. Hes got the syntex and starting to feel confortable and wants to know what the next step is.


If he feeling comfortable with OpenGL why doesnt he start learning a little bit about culling?

here are some links:
http://www.gamedev.net/reference/programming/features/quadtrees/
http://www.flipcode.com/misc/SamuelRanta-Eskola_BSPTrees.pdf
http://crystal.sourceforge.net/csdocs/portal.html

Implamenting quadtree culling in your terrain renderer isnt as hard as you would think it is.




www.Vision-Software.org

Share this post


Link to post
Share on other sites
Well the first thing I did when I reached this stage was start making a project. I personally made a 3D solar system thingy, but you might prefer to make a game or something. Just choose something like remaking pacman or tetris or the like. You''ll find each project has it''s own set of challenges. With pacman for instance you might choose to look into some simple AI approaches to get your ghosts to navigate the maze. When you start making a full blown project, I can guarantee you''ll run into difficulties you wouldn''t have considered when running small test apps.

Once you''ve done a bit of playing around and made a few small projects (don''t underestimate how important it is to do this) I''d suggest learning about vector/matrix math, and all the cool stuff that flows on from that, like culling, ray tracing, and collision detection. Once you''re down with most of this, make your own set of classes to do this math, and build yourself a simple raytracer and/or collision system.

Share this post


Link to post
Share on other sites
If some basic informations about a model are enaught for you (vertices, UV coords, textures uset by the model, normal, ...) you can try to write a simple script for 3DStudio. Some time ago I did this and I found it not too complex (10/15 hours to learn basic concepts and write the script). My script simply wrote a text file with those informations. Loading it is then very simple. You could do this till you feel to be ready for something more advanced.
Just to test your program with a differten model (bored by cubes?:-)
Good Luck!

Share this post


Link to post
Share on other sites
I think its best just to get the concepts
of how open gl works and then to start doing
some projects using the opengl features.

Do a cool project wher you can display
an object then add texures and then environment mapping.
come up with your own coloring scheme. Also
study light physics such as reflection and refraction.
I thinks thats good for the basics. plus its fun.

Share this post


Link to post
Share on other sites

  • Announcements

  • Forum Statistics

    • Total Topics
      628381
    • Total Posts
      2982360
  • Similar Content

    • By test opty
      Hi all,
       
      I'm starting OpenGL using a tut on the Web. But at this point I would like to know the primitives needed for creating a window using OpenGL. So on Windows and using MS VS 2017, what is the simplest code required to render a window with the title of "First Rectangle", please?
       
       
    • By DejayHextrix
      Hi, New here. 
      I need some help. My fiance and I like to play this mobile game online that goes by real time. Her and I are always working but when we have free time we like to play this game. We don't always got time throughout the day to Queue Buildings, troops, Upgrades....etc.... 
      I was told to look into DLL Injection and OpenGL/DirectX Hooking. Is this true? Is this what I need to learn? 
      How do I read the Android files, or modify the files, or get the in-game tags/variables for the game I want? 
      Any assistance on this would be most appreciated. I been everywhere and seems no one knows or is to lazy to help me out. It would be nice to have assistance for once. I don't know what I need to learn. 
      So links of topics I need to learn within the comment section would be SOOOOO.....Helpful. Anything to just get me started. 
      Thanks, 
      Dejay Hextrix 
    • By mellinoe
      Hi all,
      First time poster here, although I've been reading posts here for quite a while. This place has been invaluable for learning graphics programming -- thanks for a great resource!
      Right now, I'm working on a graphics abstraction layer for .NET which supports D3D11, Vulkan, and OpenGL at the moment. I have implemented most of my planned features already, and things are working well. Some remaining features that I am planning are Compute Shaders, and some flavor of read-write shader resources. At the moment, my shaders can just get simple read-only access to a uniform (or constant) buffer, a texture, or a sampler. Unfortunately, I'm having a tough time grasping the distinctions between all of the different kinds of read-write resources that are available. In D3D alone, there seem to be 5 or 6 different kinds of resources with similar but different characteristics. On top of that, I get the impression that some of them are more or less "obsoleted" by the newer kinds, and don't have much of a place in modern code. There seem to be a few pivots:
      The data source/destination (buffer or texture) Read-write or read-only Structured or unstructured (?) Ordered vs unordered (?) These are just my observations based on a lot of MSDN and OpenGL doc reading. For my library, I'm not interested in exposing every possibility to the user -- just trying to find a good "middle-ground" that can be represented cleanly across API's which is good enough for common scenarios.
      Can anyone give a sort of "overview" of the different options, and perhaps compare/contrast the concepts between Direct3D, OpenGL, and Vulkan? I'd also be very interested in hearing how other folks have abstracted these concepts in their libraries.
    • By aejt
      I recently started getting into graphics programming (2nd try, first try was many years ago) and I'm working on a 3d rendering engine which I hope to be able to make a 3D game with sooner or later. I have plenty of C++ experience, but not a lot when it comes to graphics, and while it's definitely going much better this time, I'm having trouble figuring out how assets are usually handled by engines.
      I'm not having trouble with handling the GPU resources, but more so with how the resources should be defined and used in the system (materials, models, etc).
      This is my plan now, I've implemented most of it except for the XML parts and factories and those are the ones I'm not sure of at all:
      I have these classes:
      For GPU resources:
      Geometry: holds and manages everything needed to render a geometry: VAO, VBO, EBO. Texture: holds and manages a texture which is loaded into the GPU. Shader: holds and manages a shader which is loaded into the GPU. For assets relying on GPU resources:
      Material: holds a shader resource, multiple texture resources, as well as uniform settings. Mesh: holds a geometry and a material. Model: holds multiple meshes, possibly in a tree structure to more easily support skinning later on? For handling GPU resources:
      ResourceCache<T>: T can be any resource loaded into the GPU. It owns these resources and only hands out handles to them on request (currently string identifiers are used when requesting handles, but all resources are stored in a vector and each handle only contains resource's index in that vector) Resource<T>: The handles given out from ResourceCache. The handles are reference counted and to get the underlying resource you simply deference like with pointers (*handle).  
      And my plan is to define everything into these XML documents to abstract away files:
      Resources.xml for ref-counted GPU resources (geometry, shaders, textures) Resources are assigned names/ids and resource files, and possibly some attributes (what vertex attributes does this geometry have? what vertex attributes does this shader expect? what uniforms does this shader use? and so on) Are reference counted using ResourceCache<T> Assets.xml for assets using the GPU resources (materials, meshes, models) Assets are not reference counted, but they hold handles to ref-counted resources. References the resources defined in Resources.xml by names/ids. The XMLs are loaded into some structure in memory which is then used for loading the resources/assets using factory classes:
      Factory classes for resources:
      For example, a texture factory could contain the texture definitions from the XML containing data about textures in the game, as well as a cache containing all loaded textures. This means it has mappings from each name/id to a file and when asked to load a texture with a name/id, it can look up its path and use a "BinaryLoader" to either load the file and create the resource directly, or asynchronously load the file's data into a queue which then can be read from later to create the resources synchronously in the GL context. These factories only return handles.
      Factory classes for assets:
      Much like for resources, these classes contain the definitions for the assets they can load. For example, with the definition the MaterialFactory will know which shader, textures and possibly uniform a certain material has, and with the help of TextureFactory and ShaderFactory, it can retrieve handles to the resources it needs (Shader + Textures), setup itself from XML data (uniform values), and return a created instance of requested material. These factories return actual instances, not handles (but the instances contain handles).
       
       
      Is this a good or commonly used approach? Is this going to bite me in the ass later on? Are there other more preferable approaches? Is this outside of the scope of a 3d renderer and should be on the engine side? I'd love to receive and kind of advice or suggestions!
      Thanks!
    • By nedondev
      I 'm learning how to create game by using opengl with c/c++ coding, so here is my fist game. In video description also have game contain in Dropbox. May be I will make it better in future.
      Thanks.
  • Popular Now