glut

using wxWidgets in a GLUT/other application

I'm basicly looking to get a native-like window GUI system into my OpenGL/Game. I need to display a single window to the user. I'm looking into wxWidgets. Because it works by "stealing" the WinMain/MainLoop, I'm trying to hack it so I can run its main loop on a separate thread. Because I couldn't get its wxThread working well, I've do...

GLUT for newbies/ help whit refacoring

I had need on making PC emulator for developing monochrome LCD. After googling I found forum (can not remeber where) and sample code using GLUT. Current emulator look like this. //mine .h source #include "defines.h" #include "displayemu.h" TDisplayBuffer displaybuffer[SIZEOFDISPLAYX*SIZEOFDISPLAYY/8+1]; //usual hacks #include <window...

Getting smooth, big points in OpenGL

Hi SO, I started playing with OpenGL and GLUT today. I would like to draw some points, but the problem is that they turn out to be squares, and I would like them to be round dots (filled circles). This is what I do: void onInitialization( ) { glEnable( GL_POINT_SMOOTH ); glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, G...

C2664 error in an attempt to do some OpenGl in c++

Here is an abstract of my code. I'm trying to use glutSpecialFunc to tell glut to use my KeyPress function class Car : public WorldObject { public: void KeyPress(int key, int x, int y) { } Car() { glutSpecialFunc(&Car::KeyPress); // C2664 error } } The error message I get is: Error 1 error C2664: 'glutSpecialFunc' : cannot ...

Glut: how to know when the window is moving?

Hi, I have a problem with glut, I would like to have a callback to know when the user is moving the window of my application, and I didn't found anything in glut. My goal is to make an application only on windows, is it possible to do this with MFC keeping my glut code? Thanks in advance ...

Recommended OpenGL / GLUT Reference

What OpenGL / GLUT reference is the best around? Ideally I'm looking for something with C++ sample code to help me learn OpenGL as well as details about the APIs similar to what MSDN provides for .net programming. If there isn't a one stop shop, then please list the set of references I should use and what the strengths of each one is. ...

glutPostRedisplay in a different thread

I have a standard glut implementation. The display function redraws each object, but I need a constant update on certain values of each object. As it is, the only way I can think to do this is to spawn a thread to handle the updating. However, I can't use glutPostRedisplay() from a different thread to get glut to refresh the window. What...

How do I give GLUT cubes different colors?

Just what it says: I have some code that's drawing GLUT cubes, but they're all grey. How do I make them different colors? Everything I've tried so far has failed. I think my problem is that I'm trying to use OpenGL functions to change their colors, but GLUT is maintaining it's own internal color or material data and I don't know how ...

CreateTexture loading bitmap problem

I have the following function it takes 3 arguments being a texture array, filename and texture id but when I invoke the function using: CreateTexture(g_Texture, "\\\\nsq021vs\\u2\\abcb433\\MyDocs\\Visual Studio 2008\\Projects\\CaptainEdsAdv\\CaptainEdsAdv\\Back.bmp", BACK_ID ); it returns this: - pBitmap 0xcccccccc {sizeX=???...

Basic Open GL/GLUT Issue

I am studying graphics and currently using OpenGL with GLUT. Doing my editing in codeblocks and using an online tutorial located at lighthouse3d. I am using the main method declared on that page however it will not let me compile. The error message consists of the main method not returning an int, I have "played" with the code enough to ...

OpenGL / C++ / Qt - Advice needed

I am writing a program in OpenGL and I need some sort of interfacing toolbar. My initial reactions were to use a GUI, then further investigation into C++ I realized that GUI's are dependent on the OS you are using (I am on Windows). Therefore, I decided to use QT to help me. My Question is if I am taking the best/appropriate approach to...

Opengl irregular shape color filling

I am drawing a 5 corner star with GL_LINES. When I use the GL_POLYGON, it distorts the shape of star and connects the first and last vertex. Help please :( ? ...

OpenGL Keyboard Camera Controls

I have been following this tutorial series for OpenGL: GLUT: http://www.lighthouse3d.com/opengl/glut/ I have reached the stage of implementing camera controls using the keyboard: http://www.lighthouse3d.com/opengl/glut/index.php?8 When doing the advanced tutorial it stops working. I've pretty much just copied and pasted it. When I ...

Quick Question on QT and OpenGl

I've made a project with QT and OpenGl. In QT paintGl() was repeatedly call I beleive, so I was able to change values outside of that function and call update() so that it would paint a new image. I also believe that it called initializeGl() as soon as you start up the program. Now my question is: I want that same functionality in a d...

OpenGL for space simulators

Hi all, with a few friends we started this amateur platform-independent java-based project for a space combat simulator game (something like the long dead saga of wing commander). None of us though is a 3D programmer, so the road is gonna be long. My question is: in our place would you start learning OpenGL (maybe via GLUT) or is there...

OpenGL with GLUT on windows 7, fullscreen mode not showing the message box

Hello, I wrote an OpenGL app in C++ a while ago, back when my operating system was Windows XP. I used GLUT (plane ol' version) to show the window and also used full screen mode. There are times when I displayed a message box (MessageBoxA method, using the MB_TASKMODAL modifier). In windows XP the message box was being displayed nicel...

opengl glutmainloop()

hey guys, i just started off using opengl and it seems it is not easy to understand the working of the glutmainloop() what really happens there? does it stay there doing nothing till any of the function calls responds? ...

Moving Shapes With Mouse using GLUT

Hello, We are new to OpenGL and GLUT programming and our teacher gave us a homework. The task is, there are 3 rectangles and 1 triangle. Each object have a different color (for easy selection) With these objects, we are suppose to do a home building. I drew the objects but I have big problems with moving. The first method and the easies...

How to Wrap a Commad Line Executable In a .app Package?

I wrote an OpenGL+GLUT game for Mac OS X that's currently launched through the command line. I'd like to make opening the game more user-friendly by putting it into a .app package, so regular users would be able to open the game like any other program. What's the best way to do this? ...

Hide command line / shell when using GLUI

Hi everyone, I'm working on an openGL project and have chosen to use GLUI for my interface. Was just wondering if anyone knows how to hide the command line / shell when running? Cheers! ...