opengl viewport in Mac with FMX delphi

I have designed an application in Delphi FMX that uses a new component based on class TPresentedControl. This component presents the output of opengl functions. (something like drawing in a viewport with opengl). In Windows application runs successf...
more »

2017-04-12 13:04 (0) Answers

OpenGL: PyCharm quit unexpectedly on Mac

I'm trying to run a project on Mac OS X that works on windows. The project is using the OpenGL and PyQt libraries. There seems to be a problem trying to use the OpenGL library. I downloaded a OpenGL demo of a helix that works. print("OpenGL: " + ...
more »

2017-04-10 19:04 (1) Answers

Render PNG images using OpenGL in Haskell

I am new to Haskell and I am building a chess game using OpenGL (using Graphics.UI.GLUT) for UI. I am trying to render PNG images for chess pieces. I read that images can be converted to TextureObject and then rendered, but could not find any helpfu...
more »

2017-04-07 12:04 (1) Answers

GLUT Error in Haskell Program

I'm using OpenGL with Haskell. I tried a sample program, it compiled successfully using ghc Compiler but when I run it, I get this error user error (unknown GLUT entry glutInit) I searched about this but most of the answers were related to this pr...
more »

2017-04-06 12:04 (1) Answers

Textures won't show on OpenGL and Xcode

My textures won't show up on screen, just the colored square. I collocated a condition and a cout sentence to let me know if the image is loaded on memory correctly. It does indeed, but texture won't show Why does this happen? Is there something I am...
more »

2017-03-26 07:03 (1) Answers

OpenGL - Sampler2D array in GLSL 120?

I'm working on a game engine, and I need to have an array of Sampler2Ds in my fragment shader to support multiple textures. On GLSL 130 and above it looks like this: uniform sampler2D textures[32]; Sadly, my graphics card is just the default Intel...
more »

2017-02-26 00:02 (1) Answers

glGenVertexArrays Mac OSX PyOpenGL

I'm trying to run glGenVertexArrays on PyOpenGL on my Mac (10.11.5). It is not finding it. The problem seems to be the version of OpenGL supported by my Mac (?). I've tried to research the issue but it seems that the documentation is written for eit...
more »

2017-02-19 11:02 (1) Answers

Haskell with OpenGL. (Unknown GLUT entry glutInit)

I need help getting OpenGL and GLUT to work using Haskell. Running a windows 10 system. I have installed the OpenGL package using cabal, but when I try to run the following program (and similar tutorial-like short programs): import Graphics.UI.GLUT...
more »

2017-02-06 17:02 (1) Answers

OpenGL VSync / NSTimer issues on macOS

I'm trying to set up a simple OpenGL game on macOS, using an NSTimer to set up a run loop as explained here. The idea is to create a repeating timer with a very small (~1ms) time interval and rely on vsync to regulate the frame rate. I'm setting my...
more »

2017-01-07 05:01 (1) Answers

glEnable doesn't compile inside a class?

I'm compiling OpenGL using freeglut and glew using visual studio. I'm having a rather strange issue and I have reduced the code to the minimum required to demonstrate the issue. #include <Windows.h> #include <GL\glew.h> #include <GL\f...
more »

2016-12-27 00:12 (0) Answers

Mac GPU profiling?

How can I analyze my OpenGL/C++ program and get a detailed view on what is happening in the GPU when the application is running? I have a MacBook air running an Intel GPU (specifically an Intel HD Graphics 5000 GPU), however Intel's version of the a...
more »

2016-12-26 02:12 (0) Answers

Race condition in OSX OpenGL setup code

I'm trying to do OpenGL a rendering in a separate thread on OSX. I'm using SDL to create the window, but I want to write the OpenGL context creation code out by hand. Sometimes it works fine (it should show a green square in a red field), but sometim...
more »

2016-12-24 20:12 (1) Answers

C++/OpenGL VAO Problems

#define GLEW_STATIC #include <GL\glew.h> #include <GLFW\glfw3.h> #include <GL\glew.h> #include <glm.hpp> #include <iostream> #include <fstream> #include <string> #define WIDTH 800 #define HEIGHT 600 #define ...
more »

2016-12-23 14:12 (1) Answers

Is a compiled shader compulsory in OpenGl 4?

I have an OpenGL 4.1 code using VAO and VBOs. Generation of buffer and array objects happens properly, however as soon as I want to draw my vertices, I get an INVALID OPERATION (code 1282) error. One of the possible explanations is that "the shader i...
more »

2016-12-01 13:12 (2) Answers

Is GLX_ARB_multisample supported by OSX

I'm trying to use glfw3 with OpenGL 3.3 (core profile) on OSX with full screen anti-alisiang via glfwWindowHint(GLFW_SAMPLES,4). My extension loader glad tells me that GLX_ARB_multisample is not supported, which is required for GLFW_SAMPLES to work. ...
more »

2016-11-30 04:11 (1) Answers

Render into a 3D Texture

I want to render a set of points into a 3D texture. But somehow I don't write in it. With glGetTexImage() I only get 0 for every entry. I am storing the 3D Texture in a Framebuffer and with a different render pass I want to read out informations out ...
more »

2016-11-27 19:11 (1) Answers

OpenGL glClearColor always make a black screen

I'm trying to run my first opengl program in C++, which opens a window, sets a background color, and gives a title, from Terminal on Mac OS X. The code compiles and links fine. When I run the program the window and title open fine but the background...
more »

2016-11-21 10:11 (1) Answers

OpenGL/GLUT issue on OSX Sierra

When I'm trying to compile this program #include <stdlib.h> #include <GLUT/glut.h> int main(int argc, char* argv[]) { glGetError(); exit(1); } with cc -std=c99 main.c -framework OpenGL -framework GLUT -framework Cocoa on Ma...
more »

2016-11-19 23:11 (1) Answers

OpenGL pointing glutSpecialFunc to member function

My OpenGL function glutSpecialFunc requires a void function pointer with 3 int parameters. This is easy to do with global functions by simply glutSpecialFunc(processArrowKeys); But i want to make it point to a member-function in a struct in anothe...
more »

2016-11-11 04:11 (1) Answers