Skip to main content

All Questions

Tagged with
4 votes
1 answer
52 views

OpenGL viewport is of incorrect dimensions compared to window set to same dimension

I have a window of 600x400, the viewport on which OpenGL is rendering appears to be much smaller (pictured below). Picture of the viewport I'm expecting and the viewport I'm getting, note most of the ...
JadenJin's user avatar
0 votes
0 answers
57 views

Can I get my texture coordinates as pixel coords in 2D Game?

I have an issue with my 2D Game in C++/OpenGL. I need to somehow get the pixel coordinates (preferably the glfw coords) of a texture that has been rendered on the screen. The final goal is to be able ...
notfynnaf's user avatar
-1 votes
2 answers
230 views

Generating data for OpenGL 2D rendering perfomance is slow but Monogame.GL's data generation/rendering methods are speedy. How? (CPU Perfomance?)

I am trying to make a custom tile map editor using OpenGL, C++ with GLFW(Version 3.3.8) library but I am having major issues with generation speeds but I can run games that have large tile maps such ...
sonofjacks's user avatar
-1 votes
1 answer
152 views

Optimizing millions of points render using python [closed]

I am trying to display a million points in 2D using pygame and (maybe) openGL. The problem is, my code isn't optimized yet to make it run at a high frame rate, even though I have a really good GPU. ...
user19013678's user avatar
0 votes
1 answer
184 views

How do I make multiple 2D lights in OpenGL look good

I am making a 2D top-down game using LWJGL. I have implemented multiple point lights using shaders but they don´t look good. Or they do look good until the lights meet. I will put screenshots and the ...
Philliam's user avatar
0 votes
0 answers
124 views

Make a multi-color circle in GLUT

I am trying to make a pie chart in glut. Is there a way that I can draw a single circle and change the color of the circle when I get to certain points? (for example i want half of the circle green ...
Ertugrul Gacal's user avatar
0 votes
0 answers
53 views

Flexible llighting method in 2D (using OpenGL)

I'm working on a simple 2D game engine. I'd like to support a variety of light types, like the URP in Unity. Lighting would be calculated according to the normal and specular maps attached to the ...
Kavefozogepezet's user avatar
0 votes
2 answers
96 views

2D basic transformation combination

I have a 2D transformation problem in OpenGL. My program draws two letters on screen and, by pressing assigned keys, letters have to move up (GLUT_KEY_UP) down (GLUT_KEY_DOWN) left (GLUT_KEY_LEFT) ...
meinhardis's user avatar
1 vote
1 answer
154 views

Render vertex data of .obj file with openGL

so i want to render a 2D Curve. The data for this is provided through Blender as an .obj File. I also have an object loader which retrieves succesfully the vertices of the file. Here is my window/...
LoveAndMercy's user avatar
0 votes
1 answer
62 views

OpenGL clear sprite

I created 10 sprites on the window and now I want to clear only one sprite out of 10 sprites. Now the function glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) clears the entire window of sprites, ...
Evil JuniorCplusplus's user avatar
0 votes
1 answer
421 views

Bezier Curves OpenGL Move 3d Space According to 2d space

I am trying to think about the following problem logically: Move an object in the 3d space in a fashion that represents a 2d user-generated bezier curve. As of right now, the user can create his own ...
RRIL97's user avatar
  • 858
0 votes
2 answers
2k views

Resizing window(framebuffer) without stretching the rendered content, (2D orthographic projection)

Im trying to retain the ratio and sizes of the rendered content when resizing my window/framebuffer texture on which im rendering exclusively on the xy-plane (z=0) and would like to have an ...
bonkt's user avatar
  • 17
0 votes
0 answers
284 views

Why drawing a texture using Opengl ( using rust ) is showing border colour

I am drawing this texture using opengl and rust. But for some reason the image has border around it when I draw away from the top left. I think there is something wrong with matrix / viewport. Not ...
user1840643's user avatar
0 votes
2 answers
771 views

Black lines between 2d textures

I just started learning opengl technology. My program draw 2d isometric tiles and program output this: Be unknown reasons black lines appear when two textures overlap or two textures touch. Code ...
Evil JuniorCplusplus's user avatar
1 vote
1 answer
400 views

How do I add fading at the edges of my lighting?

I am currently using a simple 2D lighting algorithm to create a 2D spotlight. Here is an example of how it looks like currently: However, I would like to add in a gradual fading at the edges (top and ...
tomatto's user avatar
  • 149

15 30 50 per page
1
2 3 4 5
22