155 Topics

Member Avatar for
Member Avatar for jwenting

I'm trying to use CLion (thus CMake) to create OpenGL applications using C++ on MacOS Monterey using a 2021 (so M1 based) Macbook. Glew2 and GLFW3 are installed correctly using Homebrew, XCode and the commandline tools are installed as well. Creating and compiling/running through XCode works fine, but using the …

Member Avatar for rproffitt
1
622
Member Avatar for Vin vin

I worked about 2 weeks with OpenTK and I like to know how to texture triangles. I like to give my program, the flexibility to make shapes like triangles, cubes, spheres and to give them different textures (or shaders). I like to give my window a icon, but it says …

Member Avatar for Vin vin
0
612
Member Avatar for Nether_1

I'm coding a program to learn OpenGL in C++ (based off of The Benny Boxes tutorials) and I've run into a snag where I don't get any errors, but my shaders refuse to apply to the triangle that I'm rendering. I'm going to give you all the relevant code but …

Member Avatar for wrathness
0
520
Member Avatar for Tcll

I've been working with my own system using CPU-managed hitdefs (rectangles for mouse-events) since I didn't want to redraw everything for the gl feedback buffer... (basically I can do all the hitdef position management once during the frame loop) now that modern gl has come into play, I would like …

Member Avatar for Tcll
0
717
Member Avatar for Nether_1

Since OpenGL uses the strange system of 1s and 0s to represent location on the screen, I'm trying to figure out how to switch it to standard x, y coordinates like those that are used on a graph. And so far, my searches on the rest of the internet have …

Member Avatar for rproffitt
0
533
Member Avatar for Mushy-pea

Hey. I've been working on a home brew game since late last year, writing an engine in Haskell and GLSL that includes 3D graphics, basic physics and programmable game logic. The version in the second video shows the first appearance of lighting and importation of OBJ files (the cube was …

0
297
Member Avatar for CJMW

So I'm maing a 3D game editor in Java using LWJGL (Lightweight Java Game Library), I have the editor set up so that the user can create new levels, load up saved levels, save and quick save current levels, import textured models etc.. the basics. I am now trying to …

Member Avatar for CJMW
0
317
Member Avatar for Shaik_2

I am trying to run the code in openGL in Visual Studio 2013 after installation. It shows error as "Cannot open source file <GL/glew.h> and <GL/glut.h> ". Also it shows "Identifier glutInit is undefined". Can you please resolve this issue ?? #include <GL/glew.h> #include <GL/glut.h> #pragma comment(lib, "glew32.lib") int main(int …

Member Avatar for rproffitt
0
296
Member Avatar for יוחאי

on my university I got an assignment to build a program on OpenGl that read from a given txt file a coordinates of some lines and draw them to the screen. i thank everyone that might help me, I know a little bit programming on C but I'm a little …

Member Avatar for rubberman
0
274
Member Avatar for Marius_3

void PatratTexturat(PATRAT patrat, int numar) { switch(numar) { case 1: if(numar==1) glBindTexture(GL_TEXTURE_2D, id_textura[2]); else glBindTexture(GL_TEXTURE_2D,id_textura[3]); break; case 2: if(numar==2) glBindTexture(GL_TEXTURE_2D, id_textura[4]); else glBindTexture(GL_TEXTURE_2D, id_textura[5]); break; case 3: if(numar==3) glBindTexture(GL_TEXTURE_2D, id_textura[6]); else glBindTexture(GL_TEXTURE_2D, id_textura[7]); case 4: if(numar==4) { glBindTexture(GL_TEXTURE_2D, id_textura[8]); } else { glBindTexture(GL_TEXTURE_2D, id_textura[9]); } break; case 5: glBindTexture(GL_TEXTURE_2D,id_textura[10]); break; …

Member Avatar for Marius_3
0
244
Member Avatar for Marius_3

void PatratTexturat(PATRAT patrat, int numar) { switch(numar) { case 1: if(numar==1) glBindTexture(GL_TEXTURE_2D, id_textura[2]); else glBindTexture(GL_TEXTURE_2D,id_textura[3]); break; case 2: if(numar==2) glBindTexture(GL_TEXTURE_2D, id_textura[4]); else glBindTexture(GL_TEXTURE_2D, id_textura[5]); break; case 3: if(numar==3) glBindTexture(GL_TEXTURE_2D, id_textura[6]); else glBindTexture(GL_TEXTURE_2D, id_textura[7]); case 4: if(numar==4) { glBindTexture(GL_TEXTURE_2D, id_textura[8]); } else { glBindTexture(GL_TEXTURE_2D, id_textura[9]); } break; case 5: glBindTexture(GL_TEXTURE_2D,id_textura[10]); break; …

Member Avatar for RudyM
0
248
Member Avatar for thehivetyrant

Hi there, i have a ball: [icode] void ball (void) { glColor3f(0.0, 1.0, 0.0); //set ball colour glTranslatef(0.0,0.0,1); //moving it toward the screen a bit on creation glutSolidSphere (0.6, 7, 7); //create ball. } [/icode] I am trying to get the ball to move in a direction when i press …

Member Avatar for Hasan_4
0
6K
Member Avatar for sirlink99

Hello everyone, I am trying to write an object loader in c++. Currently, I have a file that is made up of many sub objects and I am having a little difficulty figuring out how to process the data. First of all, here is an example of part of the …

0
179
Member Avatar for yoavip

Hi, I have a C++ code running OpenGL GUI (CEGUI), I need to wrap this window inside a C# Application. I guess I will compile the C++ as a dll, and add entry points for the C# app. What is the preffered way to do this? I thought of these …

0
161
Member Avatar for binaryjc

**BREAKOUT GAME IN OPENGL** code is in C. Use the 's' and 'd' to move the paddle. Bounce the ball off the paddle to keep it from falling off the bottom of the screen. Break all the bricks to win. So far the program is running. but the right brick …

Member Avatar for pr@j@kt@
0
2K
Member Avatar for muhammad_74

Does my old Intel 946GZ Express Chipset Family supports OpenGL 2.0...? Plz reply soon i want to sale it to a minecraft lover...!

Member Avatar for muhammad_74
0
330
Member Avatar for Mr.UNOwen

Hello, So I was testing my matrix class and the results look questionable and the inverted matrix isn't returning the vertex to it's original value (a seperate issue). Given a perspective projection at 45 degrees with a near of 1 and a far of 1000, the camera at the orgin …

Member Avatar for Jean_4
0
339
Member Avatar for Mr.UNOwen

Hello, So I'm aware that OpenGL is Column major and DirectX is Row major, but how does that translate into a basic 1D array? So given the below visual matrix, what would the first 3 in the array of each platform and which 3 would be the x,y and z …

Member Avatar for Mr.UNOwen
0
1K
Member Avatar for pakawakawak

My university's TA helped me setup all the necessary files to run OpenGL on vs 2008 (even though his .cpp and .h files were written in vs2013) yet when I compile the project, it gives me a white window. The same code will display a 3d mouse in the computer …

Member Avatar for pakawakawak
0
153
Member Avatar for emorjon2

hi everybody! I really need your help here. I am developing a 3D game. so far I have came no further than finishing the 3D engine and print out some basic 3D-models. everything works okay, with exception of a bug, occuring after a couple of minutes of running time. it …

Member Avatar for mike_2000_17
0
537
Member Avatar for moudy.mak

I need the way in SDL work with openGL for allow users input String by writing text .

Member Avatar for richieking
0
147
Member Avatar for moudy.mak
Member Avatar for richieking
0
136
Member Avatar for moudy.mak

I have used sdl_ttf in opengl . but i have this error : error LNK1104: cannot open file 'SDL_ttf.lib' i already have tried to remove the "SDL_ttf.lib" , but it didn't useful. i have trid used : lazyfoo.net for setting up the opengl with sdl pls tell me what must …

Member Avatar for passion88
0
319
Member Avatar for moudy.mak

I need the way for allow users input text by writing , while users input text they see what's they input when user press enter jump for next line and when user end press on button to finish ?

Member Avatar for meta.quota
0
2K
Member Avatar for ArashVenus

I've tried lots of times to get this to work but , no luck . the problem is this program shows white screen , and It doesn't display the polygon . Here's the code , take a look : /*Headers*/ #include <GL/glut.h> /*End of headers*/ /* Check Compiler*/ #ifdef __FLAT__ …

Member Avatar for ArashVenus
0
8K
Member Avatar for Artyom_1

I'm trying to create a simple colored cube using vbo(well it actually a rectangle with z = 0). I am using glew & freeglut. Here my code. #include <GL/glew.h> #include <GL/glut.h> #include <stdio.h> const int g_width = 800; const int g_height = 800; #pragma comment(lib, "glew32.lib") static const GLsizeiptr PositionSize …

Member Avatar for Artyom_1
0
483
Member Avatar for Labdabeta

Hello, I can get OpenGL to render 3D scenes to the screen, but I want to render them to a pixel array. Basically I want some magical code to fill in the blanks for this code segment: int width=500; int height=500; uint32_t *colours=new uint32_t[width*height]; //Magic code! glBegin(GL_TRIANGLES); //other drawing stuff, …

Member Avatar for Labdabeta
0
5K
Member Avatar for Labdabeta

Hello, Unfortunately I learnt OpenGL from NeHe tutorials, which means that all of my current methods for OpenGL-ing are extremely deprecated. I tried to find a more up-to-date tutorial, but all they seem to do is teach how to get really complicated stuff out of OpenGL. I just want to …

0
188
Member Avatar for singularity~

Can someone please help me understand what the glMatrixMode() function does? I've read the API and looked on google but I cannot understand what it does. An anology or example would help. Thanks.

0
131
Member Avatar for Labdabeta

Hello, I am wondering how libraries create graphics contexts in a cross-platform manner. Somehow libraries like SDL create graphical windows seemingly without using the system headers. I know how to set up a window for graphics using Win32API, and how to get input from it using the same. How do …

Member Avatar for Labdabeta
0
346

The End.