Corruption of the heap & F12 Problem

I'm trying to draw a line using GLUT with C++ - the IDE is VS 2008 -but an error message occurred : Windows has triggered a breakpoint in Graphics.exe. This may be due to a corruption of...

How to use GLUT/OpenGL to render to a file?

I have a program which simulates a physical system that changes over time. I want to, at predetermined intervals (say every 10 seconds) output a visualization of the state of the simulation to a...

GLUT and multithreading

if I have a mainthread that sets up a GLUT window and then create a working thread to do calculations and during the calculations upon some events in the working thread i want to update my GLUT...

lightweight UI library for OpenGL

Like the title says, I'm looking for a library that's platform-agnostic and lightweight, for the purpose of displaying buttons, slider bars, check boxes, etc. in OpenGL. Ideally, something that is...

OSX: GLUT window never appears

I'm trying to run ORTS on my Mac for a school project. It was ostensibly written to be cross-platform, but I don't know if it was ever properly tested on OSX. After a great deal of difficulty, I...

How to do Game logics in OpenGL (GLUT) and C++?

I am programming the game Battleship in OpenGL(GLUT) and C++. I know how do to the graphics stuff (like displaying the field and predefined ships), but where should I put my game code like: if...

get handle to current active window in OpenCV

Are there OpenCV equivalents of the GLUT glutGetWindow()/glutSetWindow() functions, which allows the current active window to be identified and switched from your own codes? Basically, I'd like to...

GLFW get screen height/width?

Playing around with OpenGL for a while, using the freeglut library, I decided that I will use GLFW for my next training project instead, since I was told that GLUT was only designed for learning...

Creating bowling game. Ball shape is modified when chaging X-axis

I am creating a bowling game using Eclipse C++ in Opengl. I have created cones using glutSolidCone() and the ball using glutSolidSphere() When ball's co-ordinates are GLfloat ball[] = {/* X */...

Glut and cuda stall for 100ms every second

I am working on a project that involves cuda and freeglut and I am trying to get every bit of juice out of it as possible. I have a loop that does some compute and then draw. I noticed from the...

Compiling OpenGL and GLUT OSX

I am having difficulty compiling a C program using the OpenGL and GLUT frameworks on Mac OSX. I am just getting started and I attempted to run code from this tutorial, on how to install OpenGL....

Drawing multiple shapes in OpenGL

#include <Windows.h> #include <GL\glut.h> #pragma comment(lib, "glut32.lib") #pragma comment(lib, "glu32.lib") #pragma comment(lib, "opengl32.lib") #pragma comment(linker,...

Unable to locate memory leak

My assignment is to build a ray tracing program which calculates the light impacting various objects in the world. Essentially, the program is as follows: for each pixel P calculate a ray from...

Mouse-drag object in OpenGL/GLUT

I have been searching all day for a tutorial or example code for a simple program - click on object (like a 2D rectangle for example) then as you hold and move the mouse the object follows the...

MinGW and GLUT undefined reference to '[email protected]'

I dabbled in Python for a year, and am starting c++, so I am a noob. I installed MinGW and had everything working fine until I installed freeglut. When I run the following code: #include...

PyOpenGL ubuntu 14.04: undefined function error

After upgrading to ubuntu 14.04 and installing PyOpenGL via pip. It worked fine under ubuntu 12.04, but now I get errors every time I try to use a function from OpenGL.GLUT, e.g. this from...

How to draw a single pixel in OpenGL?

Can someone tell me how to draw a single white pixel at a coordinate, say (100,200)? I am using GLUT and so far have figured out how to open a blank window. Once I figure out how to draw pixels, I...

Minimize mouse input lag on GL desktop app?

I think this is a common problem which relates to the OpenGL pipeline and how it queues rendered frames for display. How it looks like An extreme example of this can be seen in this video on...

Compiling a C program that uses OpenGl 4 in Mac OS X

So I am learning OpenGL 4 from openglbook. I copied and pasted the simple window creating program in my editor and followed Compiling OpenGL programs on OS X by using gcc -o hello hello.c...

Building Eigen3 with CXX_FLAGS

I'm trying to build Eigen3 using CMake as described in the installation menual: [email protected]:/opt/tr/src/eigen/build_dir$ ../../cmake-3.8.1/bin/cmake -DCMAKE_BUILD_TYPE=Release --build...

How to generate a torus knot?

Let me start the question by providing some boilerplate code we'll use to play around: mcve_framework.py import time from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import...

How to implement alt+MMB camera rotation like in 3ds max?

PREREQUISITES Let me start the question by providing some boilerplate code we'll use to play around: mcve_framework.py: from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import...

numpy.float128 doesn't exist in windows, but is called from OpenGL

I decided to try using OpenGL VBO in Python to improve FPS. I found code, that worked perfectly fine in Linux OS (Ubuntu), but when I tried launching in Windows OS, the code resulted in a...

PyOpenGL depth test doesn't do anything

I initialize depth testing here: def _initGL(self): glEnable(GL_DEPTH_TEST) glDepthMask(GL_TRUE) glDepthFunc(GL_NEVER) glDepthRange(0.0, 1.0) glClearDepth(1.0) Then, later I...

OpenGL and GLM matrix doesn't scale properly, always scales down

When I use glm::scale to update the model matrix in my vertex shader, no matter what I do, it will always scale it down. Anyone know what I'm doing wrong? The image will sometimes flip up and down...

Error in pygame simulation "OpenGL.error.NullFunctionError"

I'm trying to run this code in python, I already have the PyOpenGL library and the pygame library. It's a simulation to show the intermediate axis theorem. #!/usr/bin/env python # Intermediate...

parameters in glutdisplayfunc

I have function to draw eclipse : void drawEclipse(GLfloat x, GLfloat y, GLfloat xrad,GLfloat yrad) When I'm calling glutDisplayFunc(drawEclipse(10,10,3,3)); It has compilation error: error:...

Problem with python versions and starting programs on Ubuntu 18.04

A few days ago I had some issues with one program (adt from MGLTools) I was using without any problems for the last couple of months. I wanted to reinstall it (the latest version) and somehow it...

Draw sphere OpenGL C++

I am trying to draw a Sphere using OpenGL and C++, but I can't use the glut Sphere function. I am passing the coordinates (x, y, z), the color white (1.0f, 1.0f, 1.0f) and saving sequentially in...

Using GLEW and GLM on Mac with CMakeLists.txt

I am unsure as to why I am greeted with "fatal error: 'GL/glew.h' file not found" when trying to build. My CMakeLists.txt looks like this: cmake_minimum_required(VERSION...

Relevant tags