Questions tagged [opengl]
Open Graphics Library - API for 2D and 3D computer graphics
60
questions
-5
votes
1
answer
219
views
What is the ideal data structure for 2D and 3D graphics in WebGL or Metal? [closed]
I have been thinking about this here and there for several years but haven't gotten around to having the time to actually implement it. I am getting closer to being able to implement a graphics ...
1
vote
1
answer
216
views
Question on MVP Pattern, Events and saving complex objects
I'm working on a winforms project that involves 3d models, Opengl graphics, hierarchical project files and uses an MVP approach. Currently i have things setup such that when the user manipulates ...
8
votes
1
answer
642
views
How can I optimize a program's performance when no profiling tools are available?
I am currently working on an OpenGl program whose performance I would like to improve. The performance is okay but not ideal on powerful dedicated GPUs, but is abysmal on integrated graphics (< 10 ...
5
votes
2
answers
2k
views
OpenGL and global state
It is generally understood in software engineering that global state is bad. However, OpenGL has been designed very much embracing the concept of global state. many of the things you modify will ...
6
votes
2
answers
2k
views
Abstraction of VAOs, VBOs and Models
I have gone down the rabbit hole that is abstracting away a working game engine in OpenGL and C++. Before reaching the other side I'd like to ask about my current design, which is - the more I look at ...
8
votes
2
answers
19k
views
Why use SDL and OpenGL instead of just OpenGL?
I've been seeing people combine SDL2 and OpenGL (glfw.h or glut.h) for a while now, I've done some research and found out SDL2 runs on OpenGL. So why does people combine these two? Some people ...
-3
votes
1
answer
1k
views
What would be a good way to abstract OpenGL-Concepts in a game engine? [closed]
I have posted the same question to StackOverflow and Stackexchange and both got downvoted to oblivion as "too broad". So maybe this will be a better place for it.
I am working on a rendering engine ...
1
vote
2
answers
4k
views
OpenGL: generating a plane with only one triangle strip
I would like to follow up on this question, except that I have no code to show, so I decided to ask it here.
In the linked question, the OP was looking for an algorithm which could generate a plane ...
7
votes
0
answers
196
views
Incorporating existing 2D OpenCL/OpenGL application in 3D scene
There is an existing real-time, scientific visualization application that uses OpenCL and OpenGL to render complex 2D graphs. My goal is to incorporate this application into a 3D rendered scene. At ...
3
votes
1
answer
2k
views
A web browser written using OpenGL, is it practical?
Games written using OpenGL are relatively easy to port to many platforms, and look and feel the same everywhere implementing their own UI. Web browsers have to solve a very similar problem. So, why ...
5
votes
1
answer
475
views
OpenGL: Why are things bound instead of being passed directly as parameters?
In OpenGL you have to bind an object to the context to be used in subsequent calls, instead of just using it as an argument in those calls.
For example, in OpenGL you write this
glGenBuffers( 1, &...
4
votes
1
answer
4k
views
Is OpenGL just badly designed?
I have been using OpenGL and OpenGL ES for a long time, and I know them pretty well. They're also really, really annoying to use, and I haven't really seen this discussed anywhere. Here are some ...
6
votes
2
answers
8k
views
What is GLFW in relation to OpenGL
Now this question might sound (/ is) stupid, but I'm just getting into OpenGL.
So I installed GLFW source and I'm looking at some easy examples. What I'm noticing is, that the code still contains "...
1
vote
1
answer
161
views
Managing Opengl projects under Team Foundation Server
I am learning OpenGL/C++ by following a tutorial series on in2gpu. I set up my Project just like the autor did. It is an Empty Visual C++ Project. Inside the project I linked glew and freeglut, the ...
-1
votes
1
answer
1k
views
2D Animating in OpenGL [closed]
I am trying to animate a texture in OpenGL. I feel like it should be easy, as I know how to animate in SDL and other libraries but I am having trouble. I have a x,y,w,h that holds the texture ...
3
votes
6
answers
1k
views
OpenGL, multithreading, and throwing destructors
How do you make an class that properly warns a developer in the future that they've made a mistake somewhere in their implementation that resulted in an object that gets deconstructed in a state that ...
3
votes
4
answers
3k
views
What are the advantages of matrix multiplication over individual variables (graphics)?
I am learning OpenGL and the tutorials (1, 2) I'm reading teach me that to scale/rotate/translate an object you have to know matrix multiplication. Why? Instead of 3x3 matrix you can use 6 floats: ...
8
votes
1
answer
3k
views
Is hardware accelerated GUI data kept on the GPU
I am doing some research as to how most hardware accelerated GUI libraries work. I am actually only care about the rendering backends of them here. I am trying to figure out what would be the best way ...
1
vote
1
answer
1k
views
How to better isolate JOGL or LWJGL3 dependency from game clients?
I'm currently working on a project to develop a relatively small framework with the goal of supporting game development efforts for students in a course. The scope of this project is an OpenGL-based ...
6
votes
3
answers
4k
views
What design pattern best suits managing handles to objects, without passing handles or Manager around?
I'm writing a game in C++ using OpenGL.
For those that don't know, with the OpenGL API you make a lot of calls to things like glGenBuffers and glCreateShader etc. These return types of GLuint which ...
2
votes
1
answer
89
views
Is there a way to make the default way a class is accessed a field within the class?
I'm trying to write a wrapper for the following bit of scala code:
val vertBuffer: FloatBuffer = createFloatBuffer(vertex_positions.length)
vertBuffer.put(vertex_positions)
vertBuffer.flip()
However,...
2
votes
2
answers
235
views
Make functions that imply other functions
I'm developing a game that often has repetitious code that I can't simplify.
Example of what I do normally:
Square object;
GL11.glPushMatrix(); // Pushes a matrix stack down by one. This allows us ...
3
votes
2
answers
15k
views
OpenGL vs OpenCV for beginner [closed]
I am a freshman college student currently learning C++ programming. I am good at math and physics, so I am looking to specialize in 2D/3D graphics with OpenGL. My question is about the differences ...
1
vote
1
answer
836
views
Original GLUT library was open source, but license prevented releasing any changes to it. What could be the rationale behind such license? [closed]
Original GLUT library is open source, even on GitHub, yet the license doesn't allow any changes to be released publicly (but you can change it for use in your own projects, as is often exercised in ...
2
votes
1
answer
1k
views
OpenGL's relationship to OpenGL ES (3.0)
I'm beginning my journey into graphics programming and want to learn OpenGL. Because I'm green to graphics programming but not to C and C++, a familiar question came up when I looked at OpenGL and ES.....
32
votes
7
answers
10k
views
Writing in C for Performance? [closed]
I know I have quite frequently heard that C typically has a performance advantage over C++. I didn't really think anything else of it until I realized that MSVC doesn't even seem to support the newest ...
0
votes
1
answer
461
views
2D Game Data Structure in OpenGL ES 2.0
I'm trying to come up with some data structures for rendering my map on OpenGL. It is going to be ~ 100x100 blocks(squares) total, with each block being around 100 pixels. However, the screen will ...
5
votes
3
answers
335
views
Working with shader code [closed]
I am starting my first project in OpenGL/GLSL and I was wondering, how do you work with code of shaders?
Because it needs to be const char and syntax higlighting shows everything in the same color (...
4
votes
1
answer
853
views
Using a “spherical frustum” for 3D projection
I am currently writing a transformation from model space to clip space for use in OpenGL. From what i have seen, programmers typically use a traditional rectangular frustum to define the clipping ...
1
vote
2
answers
2k
views
OpenGL extension vs OpenGL core
I was doubting: I'm writing a cross-platform engine OpenGL C++, I figured out Windows forces the developers to access OpenGL features above 1.1 through extensions.
Now the thing is, on Linux, I know ...
97
votes
2
answers
20k
views
Why have hardware-accelerated vector graphics not taken off?
I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea ...
3
votes
1
answer
794
views
OpenGL Image Load-Store Atomics Applications
I originally asked this on plain old stack but it was closed for being too open-ended. (Which was a good call as this is a better place for such questions.)
Original Link: https://stackoverflow.com/...
3
votes
1
answer
2k
views
Simulating a projector in openGL
I wish to simulate a projector screen in OpenGL, where an image is truly being projected onto the wall in real time. By this I mean if an object were to get in between the projector and the wall, that ...
21
votes
5
answers
8k
views
Why don't modern libraries use OOP
I'm a beginner-level C++ programmer, but I understand the concepts of the language fairly well. When I began to learn external C++ libraries, like SDL, OpenGL (maybe something else too), to my great ...
0
votes
1
answer
1k
views
How to move a car around an environment with hills in C++? [closed]
I don't have any code for this since I don't know how I am meant to do this.
I have a car and I am able to move it around on a flat plane and I have that working correctly. However, I want it to also ...
2
votes
1
answer
4k
views
OpenGL programming vs Blender Software, which is better for custom video creation? [closed]
I am learning OpenGL API bit by bit and also develop my own C++ framework library for effectively using them. Recently came across Blender software which is used for graphics creation and is in turn ...
2
votes
1
answer
2k
views
Use Android NDK for portability with iOS?
I am currently planning to implement a little painting app using OpenGL ES 1.1. I believe this question applies to any OpenGL ES project. I am starting development on Android and I would like to ...
6
votes
2
answers
590
views
Data structures for storing finger/stylus movements in drawing application?
I have a general question about creating a drawing application, the language could be C++ or ObjectiveC with OpenGL.
I would like to hear what are the best methods and practices for storing strokes ...
2
votes
1
answer
7k
views
3d point cloud render from x,y,z 2d array with texture
Need some direction on 3d point cloud display using OpenGL in c++ (vs2008). I am brand new to OpenGL and trying to do a 3d point cloud display with a texture. I have 3 2D arrays (each same size ...
1
vote
1
answer
2k
views
Using a texture as an integer array (OpenGL 3.3, shader version 3.3) [closed]
I'm trying to have something like an integer array uniform for my fragment shader (I only need read access). Since it's a fairly large chunk of data (not so large that uploading it in every frame ...
18
votes
4
answers
17k
views
What is the relationship between OpenGL, GLX, DRI, and Mesa3D?
I am starting out doing some low-level 3D programming in Linux. I have a lot of experience using the higher level graphics API OpenInventor.
I know it is not strictly necessary to be aware of how ...
1
vote
1
answer
2k
views
Compiling OpenGL Assembly Language (ARB) assembly code
I have two questions to ask.
If I want to code in ARB, what are the prerequisites I need to write the code?
I have been using OpenGL and DirectX lately. I want to compile and run the ARB code. What ...
5
votes
2
answers
2k
views
Linux OpenGL programming, should I use GLX or any other?
I'm new to OpenGL and found that there are a lot of libraries to do that in C,
and I also found that glx is most friendly with Linux X Server, I just want to do basic stuff, and I cannot find any ...
3
votes
2
answers
1k
views
What are the major differences between OpenGL ES 2.0 and 1.x?
I have to learn OpenGL and get a basic OpenGL app built, and I have a few questions:
What are specific things programmers need to know to program in these frameworks?
How does the shader language in ...
4
votes
2
answers
1k
views
What are the advantages of GLSL's compilation model?
GLSL is fundamentally different from other shader solutions because the server (GPU driver) is responsible for shader compilation. Cg and HLSL are (afaik) generally compiled a priori and sent to the ...
-1
votes
1
answer
2k
views
Win32 and Win64 programming in C sources? [closed]
I'm learning OpenGL with C and that makes me include the windows.h file in my project. I'd like to look at some more specific windows functions and I wonder if you can cite some good sources for ...
18
votes
3
answers
4k
views
How would you unit-test or perform the most effective automated testing on graphics code for OpenGL?
I'm writing a game and the accompanying graphics engine on top of OpenGL in C++. Im also a fan of good coding processes and automated testing. Graphics code + testing seems pretty immiscible, since ...
4
votes
3
answers
525
views
Global Texture Container
For my first large-ish endevor in Open-GL I'm making a simulator of sorts. I've got much of the basic functionality working, but recently ran into a problem. As I've since realized, I originally ...
4
votes
1
answer
3k
views
(How can I / Am I allowed to) Use Google Maps as a Texture on an OpenGL object?
Note: I asked a very similar question on StackOverflow but did not get much attention, so was directed to http://programmers.stackexchange.com as licensing issues seem to have more interest here...
I ...
1
vote
1
answer
805
views
How to render a terrain using height maps and getting basic collision detection on top of the terrain and camera (moving on the terrain) [closed]
I have loaded a .RAW file into a 2x2 array in my class. The way I am rendering it works fine but I am struggling to get the camera to move on top of the terrain. The terrain renders from 0,0,0 (x,y,z) ...