Jump to content
  • Advertisement

Search the Community

Showing results for tags 'OpenGL'.

The search index is currently processing. Current results may not be complete.


More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Game Dev Loadout
  • Game Dev Unchained

Categories

  • Game Developers Conference
    • GDC 2017
    • GDC 2018
  • Power-Up Digital Games Conference
    • PDGC I: Words of Wisdom
    • PDGC II: The Devs Strike Back
    • PDGC III: Syntax Error

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Art Critique and Feedback
  • Community
    • GameDev Challenges
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Topical
    • Virtual and Augmented Reality
    • News
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical
  • GameDev Challenges's Topics
  • For Beginners's Forum
  • Unreal Engine Users's Unreal Engine Group Forum
  • Unity Developers's Forum
  • Unity Developers's Asset Share

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams
  • GameDev Challenges's Schedule

Blogs

There are no results to display.

There are no results to display.

Product Groups

  • Advertisements
  • GameDev Gear

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Website


Role


Twitter


Github


Twitch


Steam

Found 500 results

  1. phil67rpg

    move ship

    I got my ship to rotate about arbitrary axis. my next step is to get it to move up and down depending on which way it is facing. I got it to move up and down but not in the way it is facing after it is rotated. void drawShip() { glPushMatrix(); glColor3f(1.0f, 0.0f, 0.0f); glLoadIdentity(); glTranslatef(50.0f, 0.0f+thrust, 0.0f); glRotatef(shipAngle, 0.0f, 0.0f, 1.0f); glBegin(GL_LINE_LOOP); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(-5.0f, -5.0f, 0.0f); glVertex3f(0.0f, 10.0f, 0.0f); glVertex3f(5.0f, -5.0f, 0.0f); glEnd(); glPopMatrix(); }
  2. phil67rpg

    OpenGL rotate ship

    I have a very simple question, I am trying to rotate some vertex's around an arbitrary axis. basically I want to use glRotatef and glTranslatef to rotate a space ship I have drawn on the screen. here is my code of my ship. what it does do is rotate around the origin when I use the arrow keys left and right. void drawShip() { glPushMatrix(); glColor3f(255.0f, 0.0f, 0.0f); glTranslatef(-50.0f, 0.0f, 0.0f); glRotatef(rotateship, 0.0f, 0.0f, 1.0f); glBegin(GL_LINE_LOOP); glVertex3f(50.0f, 0.0f, 0.0f); glVertex3f(45.0f, -5.0f, 0.0f); glVertex3f(50.0f, 10.0f, 0.0f); glVertex3f(55.0f, -5.0f, 0.0f); glEnd(); glTranslatef(50.0f, 0.0f, 0.0f); glPopMatrix(); }
  3. I am having a problem loading DXT5 textures. Everything works fine, unless I use a texture which has a height greater than the width and I enable mipmaps (i.e GL_LINEAR_MIPMAP_LINEAR) The textures are created using Compressonator and the code to load the textures is here: https://github.com/paroj/nv_dds/blob/master/nv_dds.cpp
  4. Hello! I am trying to find efficient map-write-discard implementation in OpenGL, but with no luck so far. Following suggestions on this page, I tried both buffer orphaning with glBufferData(NULL) as well as glMapBufferRange(GL_MAP_INVALIDATE_BUFFER_BIT), both with depressing performance (approximately 40x slower than similar implementation in Direct3D). The method should ideally be suitable for OpenGL4.2 / GLES3.0 API, so glBufferStorage is not desirable, though initializing the buffer with glBufferStorage(GL_DYNAMIC_STORAGE_BIT|GL_MAP_WRITE_BIT) makes no difference. As an experiment I also tried mapping with GL_MAP_UNSYNCHRONIZED_BIT flag with no difference either. Various usage hints (I use GL_DYNAMIC_DRAW) also have zero effect as well. In my benchmark I render 32K objects with individual draw calls and map/unmap constant buffer before every call. On my 970GTX, this benchmark runs at ~4 ms/frame in D3D11 mode and 140 ms/frame in OpenGL. Here is what my map/unmap functions look like: void BufferGLImpl :: Map(MAP_TYPE MapType, Uint32 MapFlags, PVoid &pMappedData) { m_uiMapTarget = ( MapType == MAP_READ ) ? GL_COPY_READ_BUFFER : GL_COPY_WRITE_BUFFER; glBindBuffer(m_uiMapTarget, m_GlBuffer); GLbitfield Access = 0; switch(MapType) { case MAP_READ: Access |= GL_MAP_READ_BIT; break; case MAP_WRITE: Access |= GL_MAP_WRITE_BIT; if (MapFlags & MAP_FLAG_DISCARD) { if (m_bUseMapWriteDiscardBugWA) { glBufferData(m_uiMapTarget, m_Desc.uiSizeInBytes, nullptr, m_GLUsageHint); Access |= GL_MAP_WRITE_BIT; } else { Access |= GL_MAP_INVALIDATE_BUFFER_BIT; } } if (MapFlags & MAP_FLAG_DO_NOT_SYNCHRONIZE) { Access |= GL_MAP_UNSYNCHRONIZED_BIT; } break; case MAP_READ_WRITE: Access |= GL_MAP_WRITE_BIT | GL_MAP_READ_BIT; break; } pMappedData = glMapBufferRange(m_uiMapTarget, 0, m_Desc.uiSizeInBytes, Access); glBindBuffer(m_uiMapTarget, 0); } void BufferGLImpl::Unmap() { glBindBuffer(m_uiMapTarget, m_GlBuffer); glUnmapBuffer(m_uiMapTarget); glBindBuffer(m_uiMapTarget, 0); m_uiMapTarget = 0; } Am I doing something obviously wrong here? Is there a clear way to tell OpenGL that I want to discard all previous contents of the buffer?
  5. I have worked on this problem for several days. I have almost solved my problem. I have got my sprite to move up and down continuously using the mouse. this done by using the glutTimerFunc function. I want the mouse to get the sprite to move up and down once. I have googled and debugged my code. I have also taken some JavaScript code and ported it over into opengl. let me know if you need my question to be more specific. here is my code so far. bool onGround = false; void StartJump() { if (onGround) { velocityY = -12.0f; onGround = false; } } void EndJump() { if (velocityY < -6.0f) { velocityY = -6.0f; } } void Update() { velocityY += gravity; positionY += velocityY; positionX += velocityX; if (positionY > 25.0f) { positionY = 0.0f; velocityY = 0.0f; onGround = false; } } void Loop(int val) { Update(); drawSprite(); glutPostRedisplay(); glutTimerFunc(33, Loop, 0); } void mouseClicks(int button, int state, int x, int y) { if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN) { StartJump(); } if (button == GLUT_LEFT_BUTTON && state == GLUT_UP) { EndJump(); } } void handleKeypress(unsigned char key, int x, int y) { switch (key) { case 27: exit(0); break; case 32: Loop(0); break;
  6. I have been fascinated by programming before 8 years from now. The journey took me from someone who loves to be software engineer to be a networks engineer. I work as full time IP networks engineer. Well, I am a great fun of indie games developers. I have been following Dev-Logs for several indie game developers for a while. In the previous years many ideas of games have been floating in my mind and finally I took the decision to start my own small game project. I have been planning for the last 2 weeks for my game. I have decided to write the whole game and engine myself. My estimations are : Because I am doing this as side project the whole idea ( a 2D platformer ) will take me between 6 months to 1 year. The Game Engine will be developed in parallel with the game I am probably going to Use Java LWJGL or any other OpenGl library I should find a way to target my audience ( probably Youtube channel and dev-logs) Perfectioning the game might have a longer duration than the development of it. I will publish it when it meets the 95% of my expectations If There is any piece of advice of how to start the journey, It will be very helpful. If you have any thoughts about my plan please share it with me. If you have any guidance about how to use this platform I would be more than happy to hear from you. I am just a man who lost his way when making his career related decisions and he is doing a lot of things for fun. Thank you.
  7. Hi, I have interest developing Game Engine.But,you know it is very difficult and sometimes i feel unmotivated.So,I look for programmers who has passion about it.We will learn topics,then talk about them on Discord,so we will help one another and will learn faster.And we can build very good portfolio together.If you are interested pls send mail me => mr.vasifabdullayev@gmail.com
  8. I'm new to graphics and I'm struggling to get the SOIL2 library included. When I run the 'make' command on Mac for use by Xcode I get the following error: Linking soil2-static-lib ar: no archive members specified ... make[1]: *** [../../lib/macosx/libsoil2-debug.a] Error 1 make: *** [soil2-static-lib] Error 2 I'm unsure how to fix this and have been going around in circles for ages! Any help would be appreciated
  9. I am working on my new routines for rendering star (or particle) points (varying size and brightness) for starry sky. It did not work so well because it did not display stars except legacy glVertex calls (or glDrawArrays without GLSL programs). With my GLSL programs, it displayed nothing. I did enabled GL_PROGRAM_POINT_SIZE before glDrawArrays calls. That's why I am developing orbital flight simulator myself for space travels like Orbiter or MS Space Simulator and interstellar travels like Star Trek. Here are my GLSL programs. That should render square points as expected (very simple at this time). It happened nothing. Does anyone have any solution for GLSL 4.x codes for OpenGL core profile 4.x? I googled for particle/star rendering demos and found some sources. But they are using old OpenGL legacy calls or old GLSL codes that may not work with modern OpenGL core 4.x. I found only one source (Gaiasky) that uses newer version core 330 but GLSL codes looks more complex. #version 420 layout (location = 0) in vec3 vPosition; layout (location = 1) in vec4 vColor; layout (location = 2) in float vSize; uniform mat4 mvp; out vec4 starColor; void main() { gl_Position = mvp * vec4(vPosition, 1.0); gl_PointSize = vSize; starColor = vColor; } #version 420 in vec4 starColor; out vec4 fragColor; void main() { fragColor = starColor; }
  10. I'm trying to calculate normals of my grid surface. The map is 29952px x 19968px and each cell is 128px x 128px. So I have 36895 vertices. My flat map array is sent to shaders with the following structure: float vertices[368950] = { // x y z znoise xTex yTex xNorm yNorm zNorm Type 16384,16256,-16256, 0, 0.54, 0.45, 0, 0, 1, 1, 16256,16384,-16384, 0, 0.54, 0.45, 0, 0, 1, 1, ...... } I calculate the zNoise with a function float noise(float x, float y){}; And it works (I add it to y and z in the vertex shader). Method 1 If i calculate normals using finite-difference method i obtain a nice result. Pseudo-Code: vec3 off = vec3(1.0, 1.0, 0.0); float hL = noise(P.xy - off.xz); float hR = noise(P.xy + off.xz); float hD = noise(P.xy - off.zy); float hU = noise(P.xy + off.zy); N.x = hL - hR; N.y = hD - hU; N.z = 2.0; N = normalize(N); But, in the case I need to edit the map manually, for example in a Editor context, where you set the zNoise with a tool to create mountains as you want, this method won't help. I get this nice result (seen from minimap) (Normals are quite dark purposely) Method 2 | | | --6----1----+- |\ |\ | Y | \ | \ | ^ | \ | \ | | | \| \| | --5----+----2-- +-----> X |\ |\ | | \ | \ | | \ | \ | | \| \| --+----4----3-- | | | So i'm trying to calculate the normal using the adjacent triangles, but the result is very different (it seems that there's a bug somewhere): Code: std::array<glm::vec3, 6> getAdjacentVertices(glm::vec2 pos) { std::array<glm::vec3, 6> output; output = { // getVertex is a function that returns a glm::vec3 // with values x, y+znoise, z+znoise getVertex(pos.x, pos.y + 128), // up getVertex(pos.x + 128, pos.y), // right getVertex(pos.x + 128, pos.y - 128), // down-right getVertex(pos.x, pos.y - 128), // down getVertex(pos.x - 128, pos.y), // left getVertex(pos.x - 128, pos.y + 128), // up-left }; return output; } And the last function: glm::vec3 mapgen::updatedNormals(glm::vec2 pos) { bool notBorderLineX = pos.x > 128 && pos.x < 29952 - 128; bool notBorderLineY = pos.y > 128 && pos.y < 19968 - 128; if (notBorderLineX && notBorderLineY) { glm::vec3 a = getVertex(pos.x, pos.y); std::array<glm::vec3, 6> adjVertices = getAdjacentVertices(pos); glm::vec3 sum(0.f); for (int i = 0; i < 6; i++) { int j; (i == 0) ? j = 5 : j = i - 1; glm::vec3 side1 = adjVertices[i] - a; glm::vec3 side2 = adjVertices[j] - a; sum += glm::cross(side1, side2); } return glm::normalize(sum); } else { return glm::vec3(0.3333f); } } I get this bad result (seen from minimap) unfortunately Note: The buildings are in different positions but the surface has the same seed using the two methods. Could anyone help? 🙂 Thanks in advance.
  11. Hello, if I want to load an OBJ model, it does not look like it should. I have created a template that should render a cube, but the result does not look like a cube. Since my project is very extensive I uploaded it to GitHub where everyone can read through the source code the important files are platform/opengl/OpenGLRenderer.cpp and src/renderer/ObjModel.cpp Repo: GitHub.com/Cortablo/Cortablo-Engine I hope you can help me.greetingCortablo
  12. calioranged

    Drawing Circles in OpenGL

    I want to draw a circle in OpenGL. I have looked for examples of how to do this, but the only ones I can find use deprecated functions such as glBegin(), glEnd() and glVertex(). Can somebody provide an example of how this can be done using modern OpenGL? Thanks.
  13. 8Observer8

    C# GUI WPF + OpenGL 3.1

    We will see how to place OpenTK.GLControl on WPF window to make GUI application with 2D/3D graphics using modern OpenGL 3. This is the result VS project: EditedTriangle_WPFOpenGL31CSharp.zip How to create the project from scratch Note 1: RMB - Right Mouse Button click Note 2: Good Color calculator for normalized values: http://doc.instantreality.org/tools/color_calculator/ Create WPF application, with the name "EditedTriangle". See the screenshot: Download OpenTK.GLControl.zip and OpenTK.zip Create the empty "Libs" folder in the solution folder (where the ".sln" is placed) Unzip "OpenTK" and "OpenTK.GLControl" folder in the "Libs" folder Add references to "OpenTK.dll" and "OpenTK.GLControl.dll". For this: RMB on "References" -> select "Add Reference..." -> select "Browse" -> click the "Browse..." button -> select DLL's. See the screenshot with the result: Add "Assemblies". For this: select "Assemblies" -> "Framework" -> check: System.Drawing System.Windows.Forms WindowsFormsIntegration , see the screenshot with the result: Click "OK" button Open the file "MainWindow.xaml" in VS. Add this line as an attribute of the "Window" element: xmlns:opentk="clr-namespace:OpenTK;assembly=OpenTK.GLControl" Place this code inside of <Window></Window> element: <Grid> <DockPanel LastChildFill="True"> <StackPanel DockPanel.Dock="Right"> <Button x:Name="buttonSetBGColor" Content="Set BG Color" Margin="5" Click="buttonSetBGColor_Click"></Button> <Button x:Name="buttonSetTRColor" Content="Set TR Color" Margin="5" Click="buttonSetTRColor_Click"></Button> </StackPanel> <WindowsFormsHost Margin="5" Initialized="WindowsFormsHost_Initialized"> <opentk:GLControl x:Name="glControl" Load="glControl_Load" Paint="glControl_Paint" /> </WindowsFormsHost> </DockPanel> </Grid> Copy the code below to "MainWindow.xaml.cs" and run the project MainWindow.xaml.cs using System; using System.Windows; using OpenTK; using OpenTK.Graphics; using OpenTK.Graphics.OpenGL; namespace Triangle_OpenGL31WPF { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { private Utils.ShaderProgram _program; private Matrix4 _projMatrix; private int _startIndex = 0; private int _amountOfVertices = 3; public MainWindow() { InitializeComponent(); } private void WindowsFormsHost_Initialized(object sender, EventArgs e) { glControl.MakeCurrent(); } private void glControl_Load(object sender, EventArgs e) { GL.ClearColor(new Color4(0.631f, 0.6f, 0.227f, 1f)); _program = new Utils.ShaderProgram( "Shaders/vShader.glsl", "Shaders/fShader.glsl"); if (_program.Id == -1) { MessageBox.Show(string.Format("Error: see the file \"{0}\"", Utils.Logger.logFileName)); return; } InitVertexBuffers(); SetTriangleColor(Color4.Red); int uProjMatrix = GL.GetUniformLocation(_program.Id, "uProjMatrix"); if (uProjMatrix < 0) { Utils.Logger.Append("Failed to get uProjMatrix location"); return; } _projMatrix = Matrix4.CreateOrthographicOffCenter(-1f, 1f, -1f, 1f, 1f, -1f); GL.UniformMatrix4(uProjMatrix, false, ref _projMatrix); } private void InitVertexBuffers() { float[] vertices = new float[] { // Triangle 0.0f, 0.5f, // (x, y) -0.5f, -0.5f, 0.5f, -0.5f }; // Create a vertex buffer object int vbo; GL.GenBuffers(1, out vbo); // Bind the VBO to target GL.BindBuffer(BufferTarget.ArrayBuffer, vbo); // Write the data into the VBO GL.BufferData(BufferTarget.ArrayBuffer, vertices.Length * sizeof(float), vertices, BufferUsageHint.StaticDraw); // Get the storage location of the aPosition int aPosition = GL.GetAttribLocation(_program.Id, "aPosition"); if (aPosition < 0) { Utils.Logger.Append("Failed to get the storage location of the aPosition"); return; } // Assign the VBO to aPosition variable GL.VertexAttribPointer(aPosition, 2, VertexAttribPointerType.Float, false, 0, 0); // Enable the assignment GL.EnableVertexAttribArray(aPosition); } private void glControl_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { GL.Viewport(0, 0, glControl.Width, glControl.Height); // Fill a canvas GL.Clear(ClearBufferMask.ColorBufferBit); if (_amountOfVertices > 0) { GL.DrawArrays(PrimitiveType.TriangleStrip, _startIndex, _amountOfVertices); } // Swap the front and back buffers glControl.SwapBuffers(); } private void buttonSetBGColor_Click(object sender, RoutedEventArgs e) { var dialog = new System.Windows.Forms.ColorDialog(); if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { float r = dialog.Color.R / 255f; float g = dialog.Color.G / 255f; float b = dialog.Color.B / 255f; GL.ClearColor(new Color4(r, g, b, 1f)); glControl.Invalidate(); } } private void buttonSetTRColor_Click(object sender, RoutedEventArgs e) { var dialog = new System.Windows.Forms.ColorDialog(); if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { float r = dialog.Color.R / 255f; float g = dialog.Color.G / 255f; float b = dialog.Color.B / 255f; SetTriangleColor(new Color4(r, g, b, 1f)); glControl.Invalidate(); } } private void SetTriangleColor(Color4 color) { int uTriangleColor = GL.GetUniformLocation(_program.Id, "uTriangleColor"); if (uTriangleColor < 0) { Utils.Logger.Append("Failed to get uTriangleColor location"); return; } Vector3 c = new Vector3(color.R, color.G, color.B); GL.Uniform3(uTriangleColor, ref c); } } } MainWindow.xaml <Window x:Class="Triangle_OpenGL31WPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Triangle_OpenGL31WPF" xmlns:opentk="clr-namespace:OpenTK;assembly=OpenTK.GLControl" mc:Ignorable="d" Title="Triangle" Height="256" Width="290"> <Grid> <DockPanel LastChildFill="True"> <StackPanel DockPanel.Dock="Right"> <Button x:Name="buttonSetBGColor" Content="Set BG Color" Margin="5" Click="buttonSetBGColor_Click"></Button> <Button x:Name="buttonSetTRColor" Content="Set TR Color" Margin="5" Click="buttonSetTRColor_Click"></Button> </StackPanel> <WindowsFormsHost Margin="5" Initialized="WindowsFormsHost_Initialized"> <opentk:GLControl x:Name="glControl" Load="glControl_Load" Paint="glControl_Paint" /> </WindowsFormsHost> </DockPanel> </Grid> </Window>
  14. I am working on planet terrain rendering with OpenGL 4.x shader programming. When I move closer to ground, ground is becoming more earthquake. Does anyone know any solution with 'earthquake effect' elimination when closer to ground for landing, etc? I use unit per cubic kilometer for terrain mapping.
  15. Hello. I attached the picture below to describe my problem. I am using OpenGL to do an animation about rolling 3D coordinate OXYZ from A to B to C. Input: coordinate of cube: (0,0,0), (1,0,0) , (2,0,0), the cube rolling along its edge so the coordinate of cube center will rotate along the curve as the dash line. Problem: I created a function call DrawCoordSystem to draw Oxyz of the cube center. I could do rolling from 1st position to 2nd position; HOWEVER, at the 2nd rolling, when I call the DrawCoordSystem it will create oxyz within the same orientation (at the wrong way in the image) I do not know how to save the orientation of oxyz after the 1st rolling. Please help me to comments on the solution. Thanks a lot
  16. The nCine source code and related projects have been released on GitHub under the MIT license at https://github.com/ncine just some days ago. Website: https://ncine.github.io Twitter: https://twitter.com/nCine2D Dev Updates: https://encelo.github.io/tags/#nCine nCine is a multi-platform 2D game engine written in C++11 that runs on Linux, Windows, macOS and Android. The work started eight years ago, in June 2011, and has continued since. It is not intended, of course, as a replacement for big engines like Unity and Unreal but more like a lightweight alternative to LibGDX and Cocos2d-x or to frameworks like LÖVE, SFML and LWJGL. It features a fast sprite blitter with automatic batching (that can also render particles, animated sprites or mesh based ones), music streaming and sound effects, Lua scripting, integration with ImGui, RenderDoc and Tracy, high-performance custom made templated containers, bitmap font rendering with kerning, joystick support with gamepad mappings, multi level logger and more. You can have a look at the gallery or read more about its features on the website. Dependency libraries for PC and Android can be easily compiled from sources with a set of custom CMake scripts. Some of them are libogg, libvorbis and OpenAL-soft for sound, SDL2 and GLFW for window and input, libpng and WebP for images (but many GPU compressed formats are supported too) plus OpenGL 3.3 and OpenGL ES 3.0 for rendering. The development takes place mainly on Qt Creator and ArchLinux with the help of a whole set of additional open source tools like CMake, cppcheck, Valgrind, Doxygen, GraphViz, clang-format, Google Test, gcovr and Google Benchmark. Additional developing tools are RenderDoc, apitrace and Tracy. On GitHub you will find the engine, a Pong example project, a particle editor, the CMake scripts for compiling the dependencies, the data sets, the Jekyll website and the continuous integration artifacts.
  17. Hi there, recently I read in one of the treads about data-oriented programming vs. object-oriented programming. While I am generally avoiding to follow such principals dogmatically, it got me thinking again about a quite common problem: Resource Managers (in OpenGL). To get a little bit more specific, let's consider a Texture Manager. I have currently implemented them in the following way: When starting the program, the manager creates a texture class for each texture of my game and stores them together with the name in a map or unordered map. The texture class itself has a reference counter and the OpenGL handle of the texture. The value of the handle is set to a specific "texture not loaded" texture during construction. Now if an object is loaded, that requires a certain texture, the texture is requested from the manager. It searches the textures name and returns a special reference class, that stores a reference to the texture class and increases and decreases its reference counter. Obviously, the reference counter has the purpose to initiate the loading and unloading of the texture. The problem here is, that the texture handle, which is just an integer, is not stored in a cache-friendly way, as are other managed objects that I might need during rendering (Buffer objects for meshes, etc). All handles are stored in the texture managers memory location, which might be far away from the buffer object handles and the other object data. So I was thinking that I should probably simply store references to all reference classes (I know that sounds weird) in the texture class itself. The purpose of this is, that I can then simply copy the current OpenGL texture handle to the reference class. In case that the handle changes for any reason (reloading/replacing texture), I update the handle in each reference class using a loop. Sure, this is a little bit more work during an update of the texture and if a reference is added/removed, but how often does that happen? As a benefit of this method, a copy of my texture handle is now stored at the same memory location as the rest of the object's