Jump to content

  • Log In with Google      Sign In   
  • Create Account

jujumbura

Member Since 08 Aug 2005
Offline Last Active Apr 05 2014 12:23 PM

Topics I've Started

[Android] - Swapping Apps

04 April 2014 - 11:41 PM

I have been messing around with Android NDK development for a while now, and I just recently got an animation viewer up and running as a NativeActivity App on my Android device.  

 

One thing I was shocked to discover, though, is that when I hit the "Back" or "Home" buttons while running my device, my App is given the "APP_CMD_DESTROY" command, signaling it to exit the thread.  I had assumed that when leaving an App, it retains a memory space which is restored when you return to that App.  But from this behavior, it appears that my App will be restarted from scratch each time I enter and exit.

 

I read up a bit on the Android lifecycle, which seemed to confirm this behavior.  The intent seemed to be using the "savedState" buffer to handle the restore myself.  If this is really the intended flow, I now have a lot more respect for every native App that seamlessly transitions in and out.  But if this is really true, then I'm wondering:

 

1) What is the max limit on the savedState size?  I'm assuming I couldn't copy my entire allocated memory range, for example.

2) Assuming the above answer is fairly small, doesn't that imply that you need to reload all resources again?  This seems like it would involve tons of loading time, even for a brief transition back to the main menu.

 

It just seems like I must be missing something.  I'm curiow now how iOS handles this...

 

Thanks for any advice!


Display Loop with Win32

30 November 2013 - 09:54 AM

Hello all,

 

I've been working on a little OpenGL test recently, and I was trying to set up smooth animation.  I am programming on Windows, using win32 for my application setup, and GLEW for my OpenGL calls.  I apologize in advance if this question is more win32 than OpenGL, but here goes:

 

My window is set up to support OpenGL, but is not full screen.  My main loop is the standard while loop, with a PeekMessage() once per iteration.  If no messages exist, I display and update my scene.  The display functions runs a bunch of OpenGL state changes, a few draw functions, and then calls glFlush().  Now, my expectation was that this loop would be running as fast as it can ( ie: no waits ).  But I noticed that my animations appear to be running at around 60 FPS; I profiled it with QueryPerformanceCounter(), and that does indeed seem to be the case.  

 

Initially, I had thought that perhaps one of my win32 functions was blocking in order to fufill some sort of requirement, but upon closer inspection it looks like it is actually my display function that is taking around 16.6 ms on average.  In that function I only call glFlush() at the end, I do not call glFinish().  

 

Does anybody know why this might be happening?  It's actually kind of what I *want* to happen, but I'd like to know why my loop is mysteriously locked to 60 FPS.  My understanding was that getting VSYNC with OpenGL and win32 requires special use of extensions to configure the swap interval, so I was pretty surprised with this behavior.

 

Many thanks for any advice!


Issue with GLEW, Eclipse, MinGW

11 August 2013 - 11:30 PM

Hello all,

 

I have just recently been trying to set up an OpenGL environment in Windows, using Eclipse as my IDE and MinGW as my compiler.  I am stumbling along so far, but have successfully gotten a simple window up and rendering with freeGlut.

 

However, I started running into problems when attempting to call the function "glGenBuffers()" to allocate a vertex buffer and an index buffer.  I realized then that I needed a utility to get access to the extension functions, which is when I started looking at GLEW.  I downloaded the source and built it with msys ( make ), and I am currently trying to get the library functional in my application.

 

Initially it would fail immediately with dll errors, until I put the built "glew32.dll" in my Path.  Now I can get past the starting point, but as soon as I call "glGenBuffers()", I get another missing dll error.  Specifically it says in my console window:

 

 

Error: dll starting at 0x772f1000 not found.

Error: dll starting at 0x760c1000 not found.

Error: dll starting at 0x772f1000 not found.

Error: dll starting at 0x77411000 not found.

Cannot access memory at address 0x0

 

 

I am a bit confused at this point.  I would assume that if I were still missing the dll file GLEW needed, it would still be crashing on startup.  But maybe the dll is just enough to keep it from crashing initially but not actually compiled correctly for my platform?  I did end up with my msys setup being unable to find MinGW, but it built GLEW all the same ( perhaps with a different, incompatible compiler ? ).

 

Sorry, that's a lot of balls in the air, I apologize.  If anybody has any good advice to track this sort of thing down, I'd appreciate it.

 

Thanks much!


Redistributable x86 C++ Compiler for Pipeline

29 May 2013 - 10:32 AM

Hello all,

 

I have a build pipeline for a game, which requires that a Win32 console executable be recompiled whenever certain files change.  This executable is not the game itself, but must be up-to-date before the game itself is compiled.  The compiler I am using for the game is not capable of compiling for the x86 platform, so I need to find a different one.

 

Typically I use Visual Studio when compiling Win32 applications, but I am doubtful that the licensing agreement allows me to take that compiler and redistribute it as part of our build pipeline.  Does anybody have any good suggestions regarding a free, redistributable C++ compiler that sounds like it might fit this purpose?

 

Thank you very much for reading!


Generating Vertex Normals

16 January 2013 - 05:30 PM

Hello all,

 

I have been making some functions that create "rounded" vertex meshes for me by sweeping over two angles ( vertical and horizontal ) and then using trigonometry to determine x, y and z position values.  The normal for a sphere made this way is simple, but I have started generating more complicated shapes where the normal can't be easily stripped from the position.

 

So, I am trying to determine the best way to find this normal value.  I know that the normal is given by the reciprocal of the tangent of an equation, and I can find the tangent by taking the derrivative.  But I can I use my original equations for x, y and z in terms of the two angles, or do I need to use different equations?

 

Thank you for any advice!


PARTNERS