Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

246 Neutral

About GutenTag

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Daniel, Experienced C++ programmer with expertise in backend and OpenGL programming, how are you handling the engine? Are you using a lot of libraries? I'd be more than happy to help out with this provided I'm not the only one doing the code.
  2. GutenTag

    Making camera follow object

    Are you still using normalized 0 thru 1 coordinates? Try scaling up your objects if that's the case, or try using screen coordinates
  3. GutenTag

    Wanting to create my own Game Engine

    Well that's exactly what I want to do, work on a game while working on the engine. I'm quite interested in GLFW so I'll use that though for features such as audio and stuff, what other libraries would I need? I know LWJGL uses something called OpenAL for Audio     GLFW does not support audio, GLFW is a window and opengl context creation/handling library, you'd either have to use a separate library for audio, or utilize OpenAL (the audio equivalent of opengl) On another note, as someone who is also working on a game engine, the rabbit hole goes much further than you might anticipate. While I won't discourage you from this path, I would recommend that you keep your eyes on the goal, don't get too distracted by the enticing prospect of having your own fancy game engine, there's no shame in using someone else's engine to create something fun to play.
  4. Hi Everyone, I've been spending the past couple of days hammering away at getting skeletal animation imported from .dae files.   I have been following this tutorial which in all honesty has been a travesty to work though (poorly formatted code, confusing variable names, and a strange obsession with converting every math component in assimp to a glm equivalent) Through it all, I seemed to have at least gotten a "desired" result, though that results is more apt to being called something straight out of David Cronenberg's house of horrors. I have attached all the source (c++) files relevant to the animation system, I figure another experienced set of eyes will help point out what I've missed.  
  5. GutenTag

    Bizzare bug with OpenGL

    Never mind, turns out that my mouse look code was running into problems where if delta time was zero it caused all kinds of strange issues.   This has since been fixed.
  6. So I've been hammering away at my code for a while, trying to resolve this bug, with absolutely no progress being made. Mostly due to how utterly random and unpredictable this bug is.   So this is how the scene works when everything is working fine   And when the bug kicks in   As you can see, the bug only prevents my cubemap skybox, model, and light source mesh from rendering, but the orthogonally projected 2d elements are just fine.   I've ruled out shaders, as even the simplest of shader programs still experience this problem. I use ASSIMP to load in mesh files and SOIL to load textures, but up until about a day ago they have worked flawlessly.   There is absolutely no pattern to when this happens, the only way to resolve it is to just keep restarting the program until the desired output appears. That is obviously not a good solution. I'm at a complete loss and need help, as opengl doesn't push out an error or anything. I don't know where to even begin looking for a solution. Could EBO's or frame buffers cause this? As I have started implementing those recently.
  7. GutenTag

    Should I use LWJGL 2 OR LWJGL 3?

    It depends on a couple things.   1st. LWJGL3 is based on the GLFW library, so any documentation for GLFW will usually hold true with LWJGL3 2nd. LWJGL3 is much newer relatively speaking, consequentially, you're far more likely to find more tutorial resources on 2 than 3. 3rd. As they both utilize OpenGL for rendering, there really isn't much difference between the two aside from how they handle the window context.
  8. Alright, changes have been made, however it still shows up white, I'm starting to wonder if my UV coordinate data is being passed in correctly, I'll post my vertex class and see if I can find anything in the meantime class GLVertex { public: struct Position3D { Position3D() : x(0.0f), y(0.0f), z(0.0f) {} Position3D(float X, float Y, float Z) : x(X), y(Y), z(Z) {} float x, y, z; } position; struct UV { UV() : u(0.0f), v(0.0f) {} UV(float U, float V) : u(U), v(V) {} float u, v; } uv; struct Normal { Normal() : x(0.0f), y(0.0f), z(0.0f) {} Normal(float X, float Y, float Z) : x(X), y(Y), z(Z) {} float x, y, z; } normal; struct ColorRGBA8 { ColorRGBA8() : r(255), g(255), b(255), a(255) {} ColorRGBA8(GLubyte R, GLubyte G, GLubyte B, GLubyte A) : r(R), g(G), b(B), a(A) {} GLubyte r, g, b, a; } color; }; On a sidenote, I noticed that there doesn't really seem to be any way to check if a VBO has the correct data within it while using gDEBugger or CodeX. Is there anyway of tracking the data values within the buffer if they're inside of a class?
  9. Ok, here's my texture loading code, but I doubt there's much wrong with it, as the texture loads just fine according to to both CodeXL and gDEBugger FREE_IMAGE_FORMAT fif = FIF_DDS; FIBITMAP* dib(0); BYTE* bits(0); GLTexture* texture = new GLTexture(); dib = FreeImage_Load(FIF_DDS, path.c_str()); if (!dib) { return texture; } bits = FreeImage_GetBits(dib); texture->width = FreeImage_GetWidth(dib); texture->height = FreeImage_GetHeight(dib); glGenTextures(1, &texture->id); glBindTexture(GL_TEXTURE_2D, texture->id); //bind texture glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture->width, texture->height, 0, GL_BGRA, GL_UNSIGNED_BYTE, bits); if (_filterMode == "linear") { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); } if (_filterMode == "nearest") { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); } glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); FreeImage_Unload(dib); printf("[TEXTURE] Loaded %s\n", path.c_str()); return texture;
  10. My test texture passes a value of 1, I'll take a look at my texture creation code and see if something's amiss
  11. Application would've crashed if the shaders failed to compile, as far as I know, the attribute locations should be valid, as attempting to use an unused texture index causes the mesh to become black.   Also, thanks for letting me know about CodeXL, I'm going to give it a go now.
  12. Afaik, _texture->id should be passing a valid GLuint texture id location, but I'll give this a shot and see what happens   Edit: Nope, still doesn't work, and I got rid of the Vertex attrib array disables (Left overs from testing using VBO rendering)
  13. Silly me, I forgot to post my shader code   Vertex #version 330 core in vec3 vertexPosition; in vec2 vertexUV; out vec2 fragmentUV; uniform mat4 modelMatrix; uniform mat4 cameraMatrix; void main() { gl_Position = cameraMatrix * modelMatrix * vec4(vertexPosition, 1.0f); fragmentUV = vertexUV; } Fragment #version 330 core in vec2 fragmentUV; out vec4 color; uniform sampler2D sampler; void main() { color = texture(sampler, fragmentUV); }
  14. Hi Everyone, I've been tearing my hair out over this issue.   I have been having a persistant issue for the past couple of days, where a texture is loaded in, and keeps showing up white. I ran the program in gDEBbugger and it clearly shows that the texture is properly loading in, so the issue must be on the actual usage side.   My Object initialization code (for buffers and vertex attribute pointers) is glBindVertexArray(_VAO); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _EBO); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint) * _indices.size(), &_indices[0], GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, _VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(GLVertex) * _vertices.size(), &_vertices[0], GL_STATIC_DRAW); glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); glEnableVertexAttribArray(2); glEnableVertexAttribArray(3); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(GLVertex), (void*)offsetof(GLVertex, position)); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(GLVertex), (void*)offsetof(GLVertex, uv)); glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, sizeof(GLVertex), (void*)offsetof(GLVertex, normal)); glVertexAttribPointer(3, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(GLVertex), (void*)offsetof(GLVertex, color)); glDisableVertexAttribArray(0); glDisableVertexAttribArray(1); glDisableVertexAttribArray(2); glDisableVertexAttribArray(3); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindVertexArray(0); My Object rendering code is as follows (It uses an EBO) VPloc = shader.getUniformLocation("cameraMatrix"); glUniformMatrix4fv(VPloc, 1, GL_FALSE, &camera.getMatrix()[0][0]); Mloc = shader.getUniformLocation("modelMatrix"); glUniformMatrix4fv(Mloc, 1, GL_FALSE, &_modelMatrix[0][0]); glBindVertexArray(_VAO); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _EBO); glBindBuffer(GL_ARRAY_BUFFER, _VBO); glActiveTexture(GL_TEXTURE0 + _texture->id); glUniform1i(shader.getUniformLocation("sampler"), _texture->id); glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); glEnableVertexAttribArray(2); glEnableVertexAttribArray(3); glBindTexture(GL_TEXTURE_2D, _texture->id); glDrawElements(GL_TRIANGLES, _indices.size(), GL_UNSIGNED_INT, (void*)0); glBindTexture(GL_TEXTURE_2D, 0); _modelMatrix = glm::mat4(1.0f); glDisableVertexAttribArray(0); glDisableVertexAttribArray(1); glDisableVertexAttribArray(2); glDisableVertexAttribArray(3); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindVertexArray(0); While the actual render loop looks like this glEnable(GL_MULTISAMPLE); glEnable(GL_LINE_SMOOTH); glEnable(GL_POLYGON_SMOOTH); if (_glWireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } else { glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Diffuse draw _diffuseShader.use(); //_testSprite->scale(0.5f); _testSprite->draw(_diffuseShader, _gameCamera); _diffuseShader.unuse(); _window->SwapBuffers(); glDisable(GL_MULTISAMPLE); glDisable(GL_LINE_SMOOTH); glDisable(GL_POLYGON_SMOOTH); I've been able to resolve the issue in the past, but as soon as I change a few things in my Mesh code, everything breaks. I can't figure out what the issue is.
  15. GutenTag

    C++ Graphics Library

    Seconded on Clanlib, it's a great alternative if SFML isn't for you.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!