Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Jul 2013
Online Last Active Today, 10:31 AM

Posts I've Made

In Topic: OpenGL window is not visible.

24 August 2014 - 11:27 PM


glutInitWindowPosition(2500, 100); // Set the position of the window


2500 seems a little high for the x coordinate. Maybe you meant something like 250 instead?


If you find the console window to be a nuisance, you can always make it not show up by selecting Windows (/SUBSYTEM:WINDOWS) under Linker -> System -> SubSystem in your project settings.


Of course you are right. I wrote this code at work where I work with two monitors. At home I simply copy/pasted the code without even considering that something might be wrong.


Thanks again!

In Topic: Why does this code fail to read Blender's .obj file?

22 August 2014 - 07:45 AM

The trick was not to copy the file into the solution explorer but into the project folder.

In Topic: Efficient way to read .obj files in Visual Studio 2013

22 August 2014 - 07:27 AM

While stating the obvious you do not seem to provide awnsers but to raise even more questions biggrin.png


I assume AAA titles also use formats of their own. However I wonder how they create them. I mean do they write plugnis for Autodesk's tools? I am pretty sure they use Autodesk, I mean writing their own modeling tools would produce a huge and unnecessary overhead, wouldn't it?

In Topic: How to react on KeyPress + Release?

19 August 2014 - 04:39 AM

There's between being called once and being called regularly. GLUT will only issue a call to the display function when the contents is invalidated which typically happens when for example, the window is created, the window is resized, or when the window is moved behind other windows. Otherwise, the display callback is not called again unless you explicitly force a redisplay.

So, your display function is called once which explains why something is rendered, but not regularly which explains why nothing more is happening after that. You need to use the idle callback to keep the program busy all the time instead of idling when there's nothing new to display.

Quick solution:

void idle()

int main()
As soon as there's nothing else for GLUT to do, it calls the idle callback which then forces GLUT to redraw the window.


Hey this advice did the job! Maybe two more things I noticed here:


  1. I implemented a concole application which copied one array to another under the very same circumstances and it did work.
  2. I had to assign the idle()-function using glutIdleFunc() not glutIdleCallback() (this one wasn't even suggested by VS).

But now it works thanks a lot. You were right coming from XNA I assumed that display here would be somehow similar to the Draw() function which is called in regular intervals.

In Topic: How to react on KeyPress + Release?

19 August 2014 - 04:06 AM

Is the display routine invoked regularly at all? Set a breakpoint into the display() routine and look what happens.


Yes it is, otherwise it would not draw anything I guess. But while stepping through the method something strange happened. When the debugger hit the memcpy() line it VS opened a OpenFileDialog and said that it was missing a memcpy.asm file.


What does that mean it didn't throw any errors when compiling without breakpoints.