I'll try to make it simple to understand. We have to code a 2D game and therefore, we have to move our character through the map.

So, each time I press, let's say 'd', the y coordinate is updated and affect the glTranslatef(x*36.0, y*36.0, 0) which precedes the drawing function.

Consequence on screen : player move from his current position, and is translated 36 pixels further on the right. No problems to signal.

BUT, if I want a continuous translation through the entire map, I want to be able to do it by pressing continuously the keyboard's 'd' button. Problem comes here. When doing so, the translation through the map isn't smooth at all, like there were a break every 36 pixels, or every time the programs updated the key status and sees that it's still set as "true" meaning it can repeat the glTranslatef once again.

I'd like that to be fluid, smooth, and without mini breaks that renders the move in a pretty ugly way. After hours of research and tries, I still can't figure out what's going on and how to fix it.

Does anyone know what the problem is and how to fix it? I would be very grateful for it, as I am struggling and losing my nerves.

]]>OpenGL coding: beginnersGwanDoyahttps://www.opengl.org/discussion_boards/showthread.php/200530-Java-rendering-multiply-Quads-%28-Cubes-%29https://www.opengl.org/discussion_boards/showthread.php/200526-OBJ-Loader-won-t-work?goto=newpost
Thu, 15 Mar 2018 20:00:11 GMTI'm currently trying to implement my own OBJ Loader and I finally feel like I've got close to getting it working. This is my OBJ Loader:

Essentially what it does is loads the Vertices, Texture Coordinates and Normals from a OBJ File depending on if the OBJ File does have normals and Texture Coordinates and puts them into 3 different vectors:

So at the bottom of the OBJ Loader, I'm simply looping through each vertex and putting the values into the array's that are in the mesh.

Then for the Indices, I'm basically doing the same thing but I'm using a map to keep track of what Vertexes I've already used and their indice value. So I get a Vertex from the vertexes vector, loop through the map to check if the vertex is already in the map, if it is then I add the key value linked to that matching vertex which simply holds a GLushort, to the current position in the indices array in the mesh. If there are no matching vertexes in the map then I added the vertex to the map along with a indexNumber which starts at 0 and I simply increment it by one every time there is a new vertex:

]]>OpenGL coding: beginnerscodelyoko373https://www.opengl.org/discussion_boards/showthread.php/200526-OBJ-Loader-won-t-workOpenGL App Stopped Functioning After Android O Updatehttps://www.opengl.org/discussion_boards/showthread.php/200524-OpenGL-App-Stopped-Functioning-After-Android-O-Update?goto=newpost
Wed, 14 Mar 2018 16:11:54 GMTOpenGL App was working on my Note 8 when it was using Android Nougat. However as I have updated to Android Oreo the app is only loading a white blank...OpenGL App was working on my Note 8 when it was using Android Nougat. However as I have updated to Android Oreo the app is only loading a white blank screen on start up and automatically crashing on the start up. Can anyone please help me?
]]>OpenGL coding: beginnersvarshamhttps://www.opengl.org/discussion_boards/showthread.php/200524-OpenGL-App-Stopped-Functioning-After-Android-O-UpdateHow Will I Compute The Normals at Vertices using 2D Object?https://www.opengl.org/discussion_boards/showthread.php/200522-How-Will-I-Compute-The-Normals-at-Vertices-using-2D-Object?goto=newpost
Wed, 14 Mar 2018 09:13:20 GMTHello Professionals,
Good day. I would like to ask if how will I compute the *surface normals (BLUE)* and the *normal constraints (GREEN)* from...Hello Professionals,

Good day. I would like to ask if how will I compute the surface normals (BLUE) and the normal constraints (GREEN) from any 2D object using the boundary constraints (RED)?
As an example, I have drawn my own 2D object sample using Paint, (sorry for the bad quality because I cannot find a good example in internet).

As shown in my given picture, my goal is to get the GREEN normal constraints.
1. How will I compute the surface normals (BLUE)?
2. How can I use value I computed from #1 to get the normal constraints (GREEN) with respect to the boundary constraints (RED), considering the distance of normal constraints (GREEN) and boundary constraints (RED) is d=0.01?

Thank you very much for your response in advance and God bless :)

Attached Thumbnails

]]>OpenGL coding: beginnerskindgnicehttps://www.opengl.org/discussion_boards/showthread.php/200522-How-Will-I-Compute-The-Normals-at-Vertices-using-2D-ObjectDrawing lines, where are they actually drawnhttps://www.opengl.org/discussion_boards/showthread.php/200521-Drawing-lines-where-are-they-actually-drawn?goto=newpost
Wed, 14 Mar 2018 07:27:17 GMTWhat is the general rule for predicting how opengl draws lines? If i draw a line from say 0,0 to 0,10 with a thickness of 2 does it get the thickness...What is the general rule for predicting how opengl draws lines? If i draw a line from say 0,0 to 0,10 with a thickness of 2 does it get the thickness by drawing a rectangle -1,0 0,10 or does it draw a rectangle 0,0 1,10 (ie is it getting the thickness by drawing left or drawing right). Is this determined by the direction, ie a line in the opposite direction. Is drawn differently?
]]>OpenGL coding: beginnersbobtedbobhttps://www.opengl.org/discussion_boards/showthread.php/200521-Drawing-lines-where-are-they-actually-drawnglColor3f modifying texture alphahttps://www.opengl.org/discussion_boards/showthread.php/200520-glColor3f-modifying-texture-alpha?goto=newpost
Tue, 13 Mar 2018 21:37:38 GMTI've made a font that uses billboarding to render an arbitrary texture color transparent. The white letters display perfectly using this blend function: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);. However, when I use glColor3f or glColor4f to change the color of the white text, the background portion of each letter stops being transparent. Regardless of what color I change the text to, each letter's background color remains the same as my glClearColor setting. Its just no longer transparent like it should be.

I've tried pushing and popping the attribute stack, as well as changing the texture envelope to GL_REPLACE. Any ideas?
]]>OpenGL coding: beginnersBluEyeDevilhttps://www.opengl.org/discussion_boards/showthread.php/200520-glColor3f-modifying-texture-alphaproblems in compiling and running a graphics applicationhttps://www.opengl.org/discussion_boards/showthread.php/200519-problems-in-compiling-and-running-a-graphics-application?goto=newpost
Tue, 13 Mar 2018 10:53:38 GMTHi!

I realise the answer might be / probably isn't to use glscissor but I didn't know how to describe the problem differently.

I'd like to be able to do the following in a UI I am building

- Have a scroll pane
- Have the scroll pane contain a 2d ui element such as a tree, data is stored / rendered in a scene based structure (parent objects with children)
- The tree effectively has a set of labels drawn with icons to control the opening and closing of nested elements
- When opening the tree up it is larger than the scroll pane so shouldn't be drawn outside of the scroll pane
- Each label is a fixed size and the text (basically a texture), shouldn't be drawn outside of its bounds too

If I use glScissor on the scroll pane every thing works ok, if I nest the glscissor's so that the scroll pane and the labels both use glscissor I get in to issues. If I scissor the labels and then restore the scissor for the scroll pane for other drawing, I lose the scroll panes scissor during the label draw so labels can get drawn outside the scroll pane (either overlapping or completely outside).

So my question is are there better ways to do this clipping or more clever ways to use glScissor? I have read that some people use the stencil buffer, but I am unsure of the design principals of stencils (having never used them( to know whether it would solve this problem or not).
]]>OpenGL coding: beginnersbobtedbobhttps://www.opengl.org/discussion_boards/showthread.php/200518-How-to-glscissor-multiple-overlapping-regionsWhy My Program Is Running Slow Whenever I Use Heavy OBJ Files?https://www.opengl.org/discussion_boards/showthread.php/200517-Why-My-Program-Is-Running-Slow-Whenever-I-Use-Heavy-OBJ-Files?goto=newpost
Mon, 12 Mar 2018 02:31:29 GMTHello Professionals,
Good day. I am trying to use different OBJ files to my program in order to read the details of OBJ files (particularly the...Hello Professionals,

Good day. I am trying to use different OBJ files to my program in order to read the details of OBJ files (particularly the faces and vertices), then I try to view them using the OpenGL viewer. When I use basic OBJs such as dodecahedron, it works okay (not slow), but when I am using bunny, armadillo, etc., it is extremely slow. What should I do to improve my program?
]]>OpenGL coding: beginnerskindgnicehttps://www.opengl.org/discussion_boards/showthread.php/200517-Why-My-Program-Is-Running-Slow-Whenever-I-Use-Heavy-OBJ-FilesglMultiDrawElementsIndirect- Extremely strange issuehttps://www.opengl.org/discussion_boards/showthread.php/200516-glMultiDrawElementsIndirect-Extremely-strange-issue?goto=newpost
Mon, 12 Mar 2018 00:14:44 GMTI'm using the following code to render a few meshes and submeshes with glMultiDrawElementsIndirect https://pastebin.com/QMfhY5gd . Unfortunately, the result for all but the first mesh (and its submeshes) is completely mangled. Strangely enough, in RenderDoc, this appears to not be an issue, so I'm not really sure what I could do to fix it. What could be going wrong here?
OpenGL version: 4.5 core
RenderDoc version: 1.0 (API v 1.2.1)
OS: Windows 10
(Here is the capture in case anyone wants to peek at it: https://my.mixtape.moe/fiiagc.rdc )
Help would be sincerely appreciated, I've been banging my head against this wall for three days and nothing seems to cause any movement.
]]>OpenGL coding: beginnersAshleyChttps://www.opengl.org/discussion_boards/showthread.php/200516-glMultiDrawElementsIndirect-Extremely-strange-issuezooming using gluOrtho2Dhttps://www.opengl.org/discussion_boards/showthread.php/200515-zooming-using-gluOrtho2D?goto=newpost
Sat, 10 Mar 2018 17:20:51 GMTHi,

I'm wondering if somebody could help me figure out how to zoom in/out in 2D using gluOrtho2D.
Currently I have glViewport(0, 0, 400, 300) and gluOrtho2D(0.0, 400.0, 0.0, 300.0) but I am uncertain as to how these work together.
So, how might I do this and maintain aspect ratio so the objects in the view don't get stretched and stay in the center of the window?

But when I try to render quad with framebuffer_color_channel texture on it, it looks like there is GL_NEAREST filter instead of GL_LINEAR. Is it normal? What can I do?
]]>OpenGL coding: beginnersTonyForgehttps://www.opengl.org/discussion_boards/showthread.php/200511-Why-texture-filtering-doesn-t-work-hereDrawing multiple circles in OpenGLhttps://www.opengl.org/discussion_boards/showthread.php/200509-Drawing-multiple-circles-in-OpenGL?goto=newpost
Thu, 08 Mar 2018 23:31:04 GMTHi all,
I am fairly new to the world of OpenGL, and I am trying to draw a few circles in 2D. These circles are static right now, but will start...Hi all,

I am fairly new to the world of OpenGL, and I am trying to draw a few circles in 2D. These circles are static right now, but will start moving later on. I can't seem to get it to work and I would really appreciate some help here.
Here's what I have so far:

1. I create a vector of vertices for a generic circle centered at (0,0) of radius 1:

2. I create a bunch of circles with a given location and radius. Note that these are defined in world coordinates (x and y from 0 to 2000). I would like to fit the entire world into my square window. Hence, I have two uniforms for the mapping:

I created 3 circles in the corners of my world (1900,1900), (100, 1900) and (100, 100) and tried to display them. Unfortunately, I am getting this strange results instead of my circles (see attached figure).

Am I missing something? It seems to work just fine when I don't use the worldScreenRatio and specify locations between -1 and 1. I don't understand what I am doing wrong here.

]]>OpenGL coding: beginnersjhodarahttps://www.opengl.org/discussion_boards/showthread.php/200509-Drawing-multiple-circles-in-OpenGLHow do I convert a bone composed of a point and a quaternion to two vectors and a pt?https://www.opengl.org/discussion_boards/showthread.php/200508-How-do-I-convert-a-bone-composed-of-a-point-and-a-quaternion-to-two-vectors-and-a-pt?goto=newpost
Thu, 08 Mar 2018 06:15:39 GMTI'm trying to visualize the bones of an MD5-Mesh file and I see that the bones are represented as a point and a quaternion. Since a quaternion only represents a rotation, I don't know how to illustrate it. So lets say I have a human model where the arms are going across the x-axis (one hand pointing in the positive direction and the other in the negative). If I have arm bones matching up with mesh, is there a "default" vector where if apply the quaternion to it, the vector would point in the same direction as the arms (and like-wise for the up vector)? Or does every model editor do it's own thing where if I had a bone pointed in the same direction, each editor would give me a different quaternion..... or am I complete wrong about quaternions or how MD5-mesh uses them for bones?
]]>OpenGL coding: beginnersMrUNOwenhttps://www.opengl.org/discussion_boards/showthread.php/200508-How-do-I-convert-a-bone-composed-of-a-point-and-a-quaternion-to-two-vectors-and-a-pt