Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

1027 Excellent

About MausGames

  • Rank

Personal Information

  1. MausGames

    Help on glMapBuffer*** Calls

    Xycaleth already mentioned you are using the flags wrong, check out his links. To increase readability you can also static-cast the returned pointer only once, and access him like a float-array.   For advanced information about buffer transfers I can recommend this GL 4.2 article: http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-AsynchronousBufferTransfers.pdf
  2. MausGames

    Error when using blitFramebuffer

    According to the OpenGL 4.5 spec on chapter 18.3 Copying Pixels:     So copying between the same FBO should work, as long as the regions do not overlap (which should not be the case between attachment 0 and 1 (each with own texture)). There is also the function glCopyImageSubData, but again without general-purpose conversions.
  3. MausGames

    Handling VAOs in GL 4.5 with DSA

    From http://www.opengl.org/wiki/Vertex_Specification, which makes sense:  
  4. MausGames

    Handling VAOs in GL 4.5 with DSA

    You are missing glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex) to bind an attribute (index) to a vertex buffer binding (index).   Also check all function definitions again so you don't mix them up (e.g. second parameter of glVertexArrayVertexBuffer is also the VBO binding index, not the attribute index). void glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex); void glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); void glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor); void glEnableVertexArrayAttrib (GLuint vaobj, GLuint attribindex); void glDisableVertexArrayAttrib (GLuint vaobj, GLuint attribindex); void glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); void glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); void glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); ... Edit: The last sentence of Issue 31 makes no sense (also it's unresolved), how else should the attribute "know" which VBO it refers to.
  5. MausGames

    Error when using blitFramebuffer

    How does this even work? You have one single FBO, you bind it to both targets, then you attach the source texture to GL_COLOR_ATTACHMENT0 of that FBO and then you overwrite it with the destination texture (same FBO) - so you are basically blitting from the destination texture to the destination texture which has undefined behavior. There is no separate READ and DRAW attachment inside the (single) FBO container.
  6. MausGames

    OpenGL (lwjgl) wont disable texturing

    Do you use glBegin and glEnd ? Many operations are invalid between those functions - glBindTexture for example returns an GL_INVALID_OPERATION error. Maybe glEnable and glDisable have a similar behavior. Edit: Found an old Link to this topic: http://www.gamedev.net/topic/83150-glbindtexture-inside-of-glbegin/ Best regards - Martin
  7. MausGames

    Tilemap problem

    Your glVertex3f-calls look weird. You are drawing quads which get bigger and bigger and this results in z-fighting like on your screenshot. For example: with (-tileSize*i) you are going left but with (tileSize*i)+tileSize you are going right and therefore stretching the whole quad with each iteration. Reconsider how you have to place your vertices in order to achieve your goal - try to remove the minus-operators. Later on you can try to draw triangle-strips which are faster than quads, and even use indices and vertexbuffers. Best regards - Martin
  8. MausGames

    Rendering Larger Viewport

    http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml glFrustum — multiply the current matrix by a perspective matrix Before applying the frustum-matrix you have to reset the matrix first (glLoadIdentity), push and pop it (glPushMatrix, glPopMatrix) or use some other method (e.g. glLoadMatrix) Edit: Or more likely you are using glFrustum wrong. The docs say void glFrustum(left, right, bottom, top, nearVal, farVal) - in your example code you are not in the center with your matrix. - Martin
  9. Usually the transformation is calculated outside of the shader, because the shader has to do it repeatedly for each vertex and you have a much better control of the calculations this way. You can also optimize it (e.g. with SSE) for max performance and so the CPU and GPU work perfectly side by side. There is a nice article from Jari Komppa about this topic: http://sol.gfxile.net/instancing.html Best regards - Martin
  10. MausGames

    Help! Vehicle Collision Impact Speed

    You can calculate the length of both: sqrt( x*x + y*y + z*z ) = length thats basically the speed in your example, but... if you want to calculate the force, you should get the dot-product between the normalized velocities and the normalized position-difference (during collision): norm( pos1 - pos2 ) = diff dot( - diff, norm( v1 ) ) = strength1 dot( + diff, norm( v2 ) ) = strength2 and multiply it with the speed/length value (and maybe with a object-mass). Maus btw: http://www.gamedev.net/topic/625147-car-collision-speeds/
  • 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!