• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By racarate
      Hey everybody!
      I am trying to replicate all these cool on-screen debug visuals I see in all the SIGGRAPH and GDC talks, but I really don't know where to start.  The only resource I know of is almost 16 years old:
      http://number-none.com/product/Interactive Profiling, Part 1/index.html
      Does anybody have a more up-to-date reference?  Do people use minimal UI libraries like Dear ImgGui?  Also, If I am profiling OpenGL ES 3.0 (which doesn't have timer queries) is there really anything I can do to measure performance GPU-wise?  Or should I just chart CPU-side frame time?  I feel like this is something people re-invent for every game there has gotta be a tutorial out there... right?
       
       
    • By Achivai
      Hey, I am semi-new to 3d-programming and I've hit a snag. I have one object, let's call it Object A. This object has a long int array of 3d xyz-positions stored in it's vbo as an instanced attribute. I am using these numbers to instance object A a couple of thousand times. So far so good. 
      Now I've hit a point where I want to remove one of these instances of object A while the game is running, but I'm not quite sure how to go about it. At first my thought was to update the instanced attribute of Object A and change the positions to some dummy number that I could catch in the vertex shader and then decide there whether to draw the instance of Object A or not, but I think that would be expensive to do while the game is running, considering that it might have to be done several times every frame in some cases. 
      I'm not sure how to proceed, anyone have any tips?
    • By fleissi
      Hey guys!

      I'm new here and I recently started developing my own rendering engine. It's open source, based on OpenGL/DirectX and C++.
      The full source code is hosted on github:
      https://github.com/fleissna/flyEngine

      I would appreciate if people with experience in game development / engine desgin could take a look at my source code. I'm looking for honest, constructive criticism on how to improve the engine.
      I'm currently writing my master's thesis in computer science and in the recent year I've gone through all the basics about graphics programming, learned DirectX and OpenGL, read some articles on Nvidia GPU Gems, read books and integrated some of this stuff step by step into the engine.

      I know about the basics, but I feel like there is some missing link that I didn't get yet to merge all those little pieces together.

      Features I have so far:
      - Dynamic shader generation based on material properties
      - Dynamic sorting of meshes to be renderd based on shader and material
      - Rendering large amounts of static meshes
      - Hierarchical culling (detail + view frustum)
      - Limited support for dynamic (i.e. moving) meshes
      - Normal, Parallax and Relief Mapping implementations
      - Wind animations based on vertex displacement
      - A very basic integration of the Bullet physics engine
      - Procedural Grass generation
      - Some post processing effects (Depth of Field, Light Volumes, Screen Space Reflections, God Rays)
      - Caching mechanisms for textures, shaders, materials and meshes

      Features I would like to have:
      - Global illumination methods
      - Scalable physics
      - Occlusion culling
      - A nice procedural terrain generator
      - Scripting
      - Level Editing
      - Sound system
      - Optimization techniques

      Books I have so far:
      - Real-Time Rendering Third Edition
      - 3D Game Programming with DirectX 11
      - Vulkan Cookbook (not started yet)

      I hope you guys can take a look at my source code and if you're really motivated, feel free to contribute :-)
      There are some videos on youtube that demonstrate some of the features:
      Procedural grass on the GPU
      Procedural Terrain Engine
      Quadtree detail and view frustum culling

      The long term goal is to turn this into a commercial game engine. I'm aware that this is a very ambitious goal, but I'm sure it's possible if you work hard for it.

      Bye,

      Phil
    • By tj8146
      I have attached my project in a .zip file if you wish to run it for yourself.
      I am making a simple 2d top-down game and I am trying to run my code to see if my window creation is working and to see if my timer is also working with it. Every time I run it though I get errors. And when I fix those errors, more come, then the same errors keep appearing. I end up just going round in circles.  Is there anyone who could help with this? 
       
      Errors when I build my code:
      1>Renderer.cpp 1>c:\users\documents\opengl\game\game\renderer.h(15): error C2039: 'string': is not a member of 'std' 1>c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\stddef.h(18): note: see declaration of 'std' 1>c:\users\documents\opengl\game\game\renderer.h(15): error C2061: syntax error: identifier 'string' 1>c:\users\documents\opengl\game\game\renderer.cpp(28): error C2511: 'bool Game::Rendering::initialize(int,int,bool,std::string)': overloaded member function not found in 'Game::Rendering' 1>c:\users\documents\opengl\game\game\renderer.h(9): note: see declaration of 'Game::Rendering' 1>c:\users\documents\opengl\game\game\renderer.cpp(35): error C2597: illegal reference to non-static member 'Game::Rendering::window' 1>c:\users\documents\opengl\game\game\renderer.cpp(36): error C2597: illegal reference to non-static member 'Game::Rendering::window' 1>c:\users\documents\opengl\game\game\renderer.cpp(43): error C2597: illegal reference to non-static member 'Game::Rendering::window' 1>Done building project "Game.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========  
       
      Renderer.cpp
      #include <GL/glew.h> #include <GLFW/glfw3.h> #include "Renderer.h" #include "Timer.h" #include <iostream> namespace Game { GLFWwindow* window; /* Initialize the library */ Rendering::Rendering() { mClock = new Clock; } Rendering::~Rendering() { shutdown(); } bool Rendering::initialize(uint width, uint height, bool fullscreen, std::string window_title) { if (!glfwInit()) { return -1; } /* Create a windowed mode window and its OpenGL context */ window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL); if (!window) { glfwTerminate(); return -1; } /* Make the window's context current */ glfwMakeContextCurrent(window); glViewport(0, 0, (GLsizei)width, (GLsizei)height); glOrtho(0, (GLsizei)width, (GLsizei)height, 0, 1, -1); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glfwSwapInterval(1); glEnable(GL_SMOOTH); glEnable(GL_DEPTH_TEST); glEnable(GL_BLEND); glDepthFunc(GL_LEQUAL); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glEnable(GL_TEXTURE_2D); glLoadIdentity(); return true; } bool Rendering::render() { /* Loop until the user closes the window */ if (!glfwWindowShouldClose(window)) return false; /* Render here */ mClock->reset(); glfwPollEvents(); if (mClock->step()) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glfwSwapBuffers(window); mClock->update(); } return true; } void Rendering::shutdown() { glfwDestroyWindow(window); glfwTerminate(); } GLFWwindow* Rendering::getCurrentWindow() { return window; } } Renderer.h
      #pragma once namespace Game { class Clock; class Rendering { public: Rendering(); ~Rendering(); bool initialize(uint width, uint height, bool fullscreen, std::string window_title = "Rendering window"); void shutdown(); bool render(); GLFWwindow* getCurrentWindow(); private: GLFWwindow * window; Clock* mClock; }; } Timer.cpp
      #include <GL/glew.h> #include <GLFW/glfw3.h> #include <time.h> #include "Timer.h" namespace Game { Clock::Clock() : mTicksPerSecond(50), mSkipTics(1000 / mTicksPerSecond), mMaxFrameSkip(10), mLoops(0) { mLastTick = tick(); } Clock::~Clock() { } bool Clock::step() { if (tick() > mLastTick && mLoops < mMaxFrameSkip) return true; return false; } void Clock::reset() { mLoops = 0; } void Clock::update() { mLastTick += mSkipTics; mLoops++; } clock_t Clock::tick() { return clock(); } } TImer.h
      #pragma once #include "Common.h" namespace Game { class Clock { public: Clock(); ~Clock(); void update(); bool step(); void reset(); clock_t tick(); private: uint mTicksPerSecond; ufloat mSkipTics; uint mMaxFrameSkip; uint mLoops; uint mLastTick; }; } Common.h
      #pragma once #include <cstdio> #include <cstdlib> #include <ctime> #include <cstring> #include <cmath> #include <iostream> namespace Game { typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; typedef float ufloat; }  
      Game.zip
    • By lxjk
      Hi guys,
      There are many ways to do light culling in tile-based shading. I've been playing with this idea for a while, and just want to throw it out there.
      Because tile frustums are general small compared to light radius, I tried using cone test to reduce false positives introduced by commonly used sphere-frustum test.
      On top of that, I use distance to camera rather than depth for near/far test (aka. sliced by spheres).
      This method can be naturally extended to clustered light culling as well.
      The following image shows the general ideas

       
      Performance-wise I get around 15% improvement over sphere-frustum test. You can also see how a single light performs as the following: from left to right (1) standard rendering of a point light; then tiles passed the test of (2) sphere-frustum test; (3) cone test; (4) spherical-sliced cone test
       

       
      I put the details in my blog post (https://lxjk.github.io/2018/03/25/Improve-Tile-based-Light-Culling-with-Spherical-sliced-Cone.html), GLSL source code included!
       
      Eric
  • Advertisement
  • Advertisement

Archived

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

OpenGL OpenGL's Future?

This topic is 6148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m starting to doubt the future of GL. With DX8 out and the huge GeForce 3 Support. Is it time to learn D3D? Should I stop struggling with GL driver incompatibilities? It just seems that every card manufacturer is not keeping to the standard. My game engine provides massively different output on a variety of cards. The only card it looks right on is Voodoo 3''s. On every other card, buffering is messed up, or lighting is not working, or colors aren''t correct. I can''t stand it any more. Is D3D better implemented across the board? Please help. I''m ready to drop this whole programming idea and become a drug dealer - it has to be easier

Share this post


Link to post
Share on other sites
Advertisement
I think OpenGL''s future is just fine. Incompatible? It''s supported on nVidia and ATI. Any big graphics card supports OpenGL. Everything you can do in d3d with the geforce 3 you can do in OpenGL. As far as the voodoo 3 thing. they were bought out. nVidia is pretty much setting the standards for OpenGL extensions. the arb board is releasing OpenGL 1.3 in a few months. I think OpenGL is still going strong.

HHSDrum@yahoo.com

Share this post


Link to post
Share on other sites
I am quite doubtful about OpenGL''s future too. First of all, Direct3D is catching up to OpenGL FAST! But, D3D still has a lot of work to do in my opinion. And until OGL becomes unsupported on every card known to man, I will continue to use it. I just wish MS would work on an OpenGL 1.2 implementation for Windows.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

Share this post


Link to post
Share on other sites
Voodoo drivers has bad reputation for both OpenGL and Direct3D so it is probably something wrong with your code. OpenGL can do more with a GF3 than D3D. Recently did someone asked on the Microsoft DirectGraphics newsgroup why the shadow map extensions on GF3 is not supported by D3D. The reply from MS clearly showned that they do not even know about it.

Direct3D may catching up fast but they do not even pretends to be faster anymore. The current goal seems to something like OpenGL. MS releasing 1.2 ( or 1.3) would be nice but not particulary important.

I do not know which one is the best. The difference is perhaps not so big anymore.

Share this post


Link to post
Share on other sites
I definately think OpenGL still has a future. Remember that OpenGL is also crossplatform. Runs on Windows, MAC and linux/ DirectX only runs on Windows.

Quake 3 was written using OpenGL and lots of the other new games use OpenGL.

Will Doom 3 use OpenGL or DirectX ?

Jan
http://home.global.co.za/~jhorn

Share this post


Link to post
Share on other sites
We, end-users and game coders are deciding if OpenGL has a future.
OpenGL 1.3 is coming, OpenML also, the ARB is talking about replacing M$ OpenGL implementation to support the latest OpenGL.

I confident about its future.

As far as we will support it, OpenGL will stay alive.

-* So many things to do, so little time to spend. *-

Share this post


Link to post
Share on other sites
Why doubt the only supported crossplatform 3D graphics API''s future, when there''s nothing wrong with it? What would there be to replace it? Remember, there''s a lot of workstation''s out there that don''t use Windows.

About the Geforce 3, NVidia released a statement saying more of its features could be accessed through OpenGL than Direct3D. They didn''t want people to think that Direct3D''s new features were all that it could do.

Also: Microsoft has finished the OpenGL 1.2 implementation for Windows, they''ve been testing it for at least a year now. SGI made an OpenGL 1.2 implementation for Windows a while back, but Microsoft won''t allow them to release it (for some unknown, but probably obvious to most of us, reason).

So far so good, not a flamewar yet...

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
Well no API''s future is realy defined. Most fade away after a time, or are replaced by newer API''s. OpenGL isn''t bad off, and neither is DirectX. The problem is that no one can truely see the future until it''s right in front of them. If you notice most professional game engines out now a days support DirectX, OpenGL, and some even still support Glide. It''s foolish to build a box around yourself and never leave it. Learn both API''s! Just because you know both doesn''t mean you can''t prefer one over the other. As long as you know both you''ll never be stuck in a position of having to worry about either''s future.

Share this post


Link to post
Share on other sites
Open GL definitely is here to stay I dont see it going away for a pretty good time or simply forever, the reasons are:

0.-Is already a 20+ year old system, it has endured time incredibly well already. Unlike DX which has been "re-designed" almost as a whole in every compilation.
(all arrays start at zero we all know that. =) )

1.-Direct3d only works on MS systems and thats its biggest problem, specially now that consoles are getting much more attention than the PC market (sad but true) and it will prolly stay that way from now on, specially when FREE to develop consoles finally arrive (nokia is building one, MS had to open xbox to indies and there is a PS2 linux kit out there) guess which one of those consoles use directx? hint:only xbox and it can also use opengl.

2.-MS os are not that good, everybody complains about them for good reason (the main problem is that somehow they are still DOS able which is a big resource problem and anyway they are buggy as hell due to poor QA), if MS did better OS''s than it does now, they could get some other markets than the PC and with it directx on them, but as it is now, the only ones that use WINDOWZ are those who dont have other choice but to use it, lots of people will love to use ANY other working OS on their systems.. if their favorite programs and hardware worked on it which is unfortunately not the case... yet.

3.- Read number 1, repeat 3 times then continue.

4.-Opengl is already the standard in graphics programming, at least 70% or more of the world graphics community uses it, almost every tutorial, sgi paper, graphic research is based on it, and on top of that it works! is quite a bit easier to understand than DirectX because it doesnt use the COM system but simple functions, and each day more and more cards are capable of using it.

(skip here if you already are aware of geforce3 opengl extensions)
DX8 made us truly believe that Opengl was toast , due to the vertex buffers and shaders and stuff it delivered, but ID software is making Doom 3 using OpenGl using geforce 3 in no less than a MAC! and they are definetily using vertex buffers and shaders, so they are still used in opengl, only that they are reached through extensions instead of the SDK itself, thats all! Nvidia released the SDK to fully use opengl geforce3 extensions recently.
(Thank you, we now return to our regularly scheduled answer)

Just not to turn this into a flame war, I would advice the following: when you build your game engine, use a DLL like structure to use either opengl or direct3d for rendering, if you only can aim for one, then question the portability of your engine and your own experience and skill then choose one. The choice is finally yours.

Personally I prefered Opengl because I was sick and tired of getting stuck in Dx8 due to the manuals not covering the aspects I needed. And almost no source to get info from. 90% of the info out there is opengl based (check if you dont believe me!)

Opengl is good for at least other 10 or 20 years, even Ms has been forced to be Opengl compatible (on XBOX no less!), most of the best games coming and out there are opengl based or compatible , Opengl is going nowhere for a loooong time.

Now a good question will be:, "will MS and DX still be around in 5-10 years?" XBOX out there (which means MS could dedicate to gaming instead of OS''s, or lose quite a big deal in the progress whichever comes first) linux gaining more strength every day, XP generating high frequency waves of "I wont get that, is against my privacy!", the lost monopoly trials, the info blackouts, the REAL future of MS is simply... uncertain, but that kids is another story.

I hope that helps!

/*Signature start>

Remember kids when stuck with an ugly bug from hell, start chanting:

"The power of C compiles you!"
"The power of C compiles you!!"
"The power of C compiles you!!!"

Gets them every time!

=)

C ya!
*/

Share this post


Link to post
Share on other sites
I don''t really care. I use both API''s and I love both API''s, no need to prefer one over the other. There is no reason to think that OpenGL will die to, because Linux is growing stronger by the day, which makes OpenGL a lot tastier than that "other" api (due to portability). My vision of the future is this:

1) microsoft dies :-)
1.5) directx dies :-(
2) linux rulez :-)
3) OpenGL rulez :-)

three smileys and one saddy, that''s not to bad!

(PS: I know this is not very realistic, but I can dream can''t I???).

Share this post


Link to post
Share on other sites

This topic is 6148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.

  • Advertisement