GDI+ anmation equivalence to requestAnimationFrame - winapi

I am new to Win32 programming. With my prior knowledge in browser javascrip animation. I knew it is important to use requestAnimationFrame. But I havn't found similar functions in GDI+. Although I shouldn't expect win32 to have all the similar browser apis, but I would like to know, am I looking in the wrong direction?

Yes, you're looking in the wrong direction. GDI+ isn't designed for animation. Use Direct2D instead, or one of the higher-level wrappers like XAML.

Related

Three.js how to enable VR stereoscopic mode

Does anyone know a relatively easy implementation to get that split-screen stereoscopic VR view loaded with three.js? I've been searching all over the place and a lot of the implementations seem messy/confusing. If anyone has a good code example they could provide I would really appreciate it. Also, side note I'm trying to avoid using ES6 imports/exports
What’s wrong with using aframe and press VR button? If I misunderstood your question, please be more precise.

Documentation for three.js controls?

three.js comes with many useful controls, which cause camera movement in response to keyboard and mouse input.
They are all at https://github.com/mrdoob/three.js/blob/master/examples/js/controls and accessed in the code as e.g.THREE.OrbitControls .
However, I can't find any documentation or comments that says what situation to use what control for or what they are intended to do.
Can anyone point me to this information, or do I have to analyze the code to figure out if, for example, I prefer FlyControls to FirstPersonControls?
The documentation for the controls does exist, but it was deleted from the repository here. Seems like a bizarre thing to do, but there is an explanation of sorts here. I guess the docs were very incomplete anyway and it was easier to delete them than to finish them. :-p
The source code for most of the controls contains pretty decent comments. I know this isnt as good as proper documentation but it really helps to get a handle on how to set up the controls
The Controls are named by their purpose or the idea they implement. OrbitControls allow you to orbit around some kind of object. Same for Trackball-Controls although the trackball-scheme implies that the camera will rotate around without the up-Axis staying as it was like in orbit-controls. Fly and FPS-Controls are self-explanatory.
Just try the examples and you will see what the difference is. No need to analyse code. Just depends on what you want to achieve.

How to render into Surface using OpenGL ES, without GLSurfaceRenderer

I need to draw a decoded video frame into an android.view.Surface object, in Android native C++ code.
I understand that the common way to do this is to implement GLSurfaceView.Renderer interface and call the native method from onDrawFrame(). But I cannot use that, I need to pass the Surface object to the native method and work on it from there.
I'm planning on using OpenGL ES APIs to do all the rendering job, because it's cross-platform. But I have no idea where does the Surface object comes in.
I've seen several examples where ANativeWindow_fromSurface() is used. I guess I could go that way it if I was not compelled to use OpenGL.
So where do I "set" my Surface object inside native code, so I am good-to-go to rendering my scene frames?
EDIT: Ok, I guess I just was not aware of EGL standard, which seems to be what I need in the presented case.
However, I am still looking for a way to "map" or "convert" a android.view.Surface object into whatever structure handled by EGL context, which I assume to be EGLNativeWindowType, without needing to access any Android-specific APIs.
Thanks in advance.

Opengl Window with mouse control for win 32

I am new to OpenGl, almost new to C++.
I am looking for some code that does the following things.
Open an OpenGL window (maybe using glut)
Rotate the view point when the user press the left mouse button
zoom when the user press the right mouse button
translate the point of view the user press the central button
Basically what I need is a very simple graphics platform in which I will plot results coming from my algorithms. I have tried using the glut library and some code coming from the web, but no luck!
This should be a basic project, can you please point me where to find it. It just seems unreal to me that a so simple project turns to be so hard to find, but I have been googling for hours and no results.
I really appreciate your help,
thank you very much
You're asking for a fair amount of code there. Basic, but not insubstantial. Even if we do provide the code to do what you've asked, I'm not sure if you'll be able to use it to do what you want. The Red Book is a "bible" of openGL programming of sorts and will provide you with many of the functions and how to use them. I found the entire thing online here. Look into Chapters 1-3 for your drawing and rotating. Also, Lighthouse 3D has some great tutorials for you to look at for mouse events (Link). Some knowledge of linear algebra really helps, but you can manage without it.
I don't think it directly implements everything you want, but you might want to look at the 3D graph control on Code Project. This is hardly unique though -- you might want to Google for something like "opengl activex" and look at some of the alternatives. I doubt any will directly implement all you've asked for -- they'll probably include most of the basic operations, but it'll be up to you to make the connection between the mouse operations and the actions in the window.

Most elegant way to implement animated "sliding panels"

I'm attempting to implement a similar animated "sliding panels" effect as the Aveda website.
I'm a little overwhelmed by all the options and Javascript libraries that are available. And a little confused after examining the Aveda website code.
Any recommendations as to how to approach this task please? Which Javascript/Effects library would be most suitable? I don't have any allegiance or greater experience in one library over the other.
My requirements are:
Cross-browser compatibility (of course)
Simple & Elegant implementation
Don't want to re-invent the wheel
Ability to animate and to be activated by mouse-clicks (like the Aveda front page)
Dynamic (don't want to have to modify javascript as more 'panels' are added)
My first impressions would be to use Scriptaculous - Effect.Move, but I'm aware that there are ready-made implementations like Spry's.
Any words of wisdom and suggestions would be greatly appreciated by this Javascript newbie.
Prembo.
I like http://www.davidmassiani.com/horinaja/
It can use the mousewheel aswell as the links to scroll between panes, and it's available for script.aculo.us and jQuery.
I would recommend the latter as it is lightweight and easy to learn/handle.
http://jqueryfordesigners.com/coda-slider-effect/ is a good tutorial for this using jQuery.
I do like the way Aveda implemented that effect. They are using prototype/scriptaculous, and it is a custom implementation.
The Aveda effect is called a carousel. The Aveda carousel scrolls to the next element on a timer and has a nice non-linear transition.
+1 to Deefjuh, I think that Horinaja would do what you want and be easiest to implement.
If you want more of a challenge, I've used PrototypeUI ( http://www.prototype-ui.com/ ) Carousel to do a series carousels for project (e.g. http://teacher.scholastic.com/products/classmags.asp ) But the dot indicator controls had to be custom programmed.

Resources