Implementing Hello Triangle in Mantle

April 19, 2015 in Uncategorized by Adrian Marius

The specification and drivers for Vulkan, Khronos’ next generation graphics API, are expected to be released later this year. However, we can get a head start on learning how this new API will work by learning from the project that it evolved from: Mantle.

 

https://medium.com/@Overv/implementing-hello-triangle-in-mantle-4302450fbcd2

Nick Desaulniers – Raw WebGL

April 19, 2015 in OpenGL, Uncategorized by Adrian Marius

New web developers have trouble distinguishing jQuery from JavaScript. We frequently point developers to three.js for doing 3D on the web, but what is raw WebGL and what tools do we have for debugging 3D web applications?

Slides Here: http://nickdesaulniers.github.io/RawWebGL/#/

 

Collision detection (part 2)

January 19, 2015 in Programming by Adrian Marius

Last time, we discussed collision detection in general and surveyed some techniques for narrow phase collision detection.  In this article we will go into more detail on broad phase collision detection for closed axis-aligned boxes.  In the late 1970’s and early 1980’s, this problem attracted an enormous amount of attention due to its applications in VLSI design, resulting in many efficient algorithms and data structures.  Here we survey some of the general approaches to this problem and review some analytical results.

by admin

Accessing C++11 Features of the Android NDK

January 13, 2015 in Android, C++, Programming, Tips & Tricks, Tutorial by admin

android-logoSource here

Once you start working with some of the handy new C++11 features, it is a bit difficult to stop using them simply because you want to work on an Android project. Fortunately, the Android NDK supports C++11 features, although they are not enabled by default. The default Android NDK configuration provides only a minimal C++ runtime support library and doesn’t include the necessary flags to activate available C++11 features. In this article, I explain how set up a project to use C++11 features, relying on Eclipse and the latest available Android NDK, version r9d.

Consider a very common scenario in which you want to create a new Android app by reusing existing C++ code. In these cases, a typical solution is to develop the UI in Java and use the Java Native Interface (JNI) to make calls to the C++ code from Java (and the other way around if necessary). If your existing C++ code has been written taking advantage of C++11 features, you certainly would not want to create a new version removing all these C++11 features just to make it fit with the default Android NDK configuration. Fortunately, you can activate the NDK’s C++11 features to allow you to work with modern C++ amenities, and you can go on using the auto keyword, lambda expressions, and other useful C++11 features.

I’ll assume that you have basic experience working with Eclipse, Android Development Tools (ADT), and the Android NDK; hence, I won’t provide specific instructions for the basic setup of these tools. You will need ADT and NDK installed on your system in order to test the examples. Because ADT and NDK have important changes in each new release, it’s important to note that I am using ADT Build v22.6.2-1085508 and NDK Revision 9d. This way, I can focus on the necessary configurations and tweaks related to C++11 and the related features. I’ll use a simple example Android app that employs a few C++11 features combined with some use of the Standard Templates Library (STL). Finally, I’ll explain additional options and configurations that you might need to consider.”

For the entire article, follow this link.

by admin

Strategies for Implementing POSIX Condition Variables on Win32

January 12, 2015 in C, Linux, Programming, Source Code, Tips & Tricks, Windows by admin

c++In case one’s interested in cross-platform development, here is a nice article about various strategies of implementing POSIX condition variables on Win32. Quoting from the article:

The threading API provided by the Microsoft Win32 [Richter] family of operating systems (i.e., Windows NT, Windows ’95, and Windows CE) provides some of the same concurrency constructs defined by the POSIX Pthreads specification [Pthreads]. For instance, they both support mutexes, which serialize access to shared state. However, Win32 lacks full-fledged condition variables, which are a synchronization mechanism used by threads to wait until a condition expression involving shared data attains a particular state.

The lack of condition variables in Win32 makes it harder to implement certain concurrency abstractions, such as thread-safe message queues and thread pools. This article explores various techniques and patterns for implementing POSIX condition variables correctly and/or fairly on Win32. Section 2 explains what condition variables are and shows how to use them. Secion 3 explains alternative strategies for implementing POSIX condition variables using Win32 synchronization primitives. A subsequent article will describe how the Wrapper Facade pattern and various C++ language features can help reduce common mistakes that occur when programming condition variables.

For the entire article, follow this link.
Source: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html

by admin

Native / desktop applications with SmartClient (or other JavaScript framework)

January 11, 2015 in C++, Programming, Qt, Source Code by admin

qtHow to develop & deploy native / desktop applications using Qt & javascript framework, without using a web server.

For more information, follow this link.

by admin

Translations in C++ using tables with zero-based enums

January 11, 2015 in C++, Programming, Tips & Tricks by admin

c++From http://www.g-truc.net/post-0704.html – a nice article about translations in C++ using tables with zero-based enums:

Few months ago, I got annoy that we had some code that translate API independent enumerations to OpenGL enumerations, back and forth, with basically no consideration at what happens when we add a new enumeration value in the API independent enumerations and no consideration of how this translation would perform within the rendering loop, where performance is critical and it’s typically going to be called. Considering the high number of translations per frame, probably it starts to matter.

For the entire article and more information, follow this link.

C++ Status at the end of 2014—Bartlomiej Filipek

January 5, 2015 in C++, News, Programming by Adrian Marius

c++A turn-of-the-year retrospective:

C++ Status at the end of 2014

From the article:
This was a good year for C++!

Short summary (language features):

  • Clang supports C++14
  • GCC supports C++11 and most of C++14 (Full support in upcoming GCC 5.0)
  • Intel 15.0 supports C++11 (some features on Linux/OSX only)
  • Visual Studio tries to catch up with C++11, but it also introduces C++14 features as well… and it become (almost) free!

Fun series of videos on the evolution of graphics in games

December 19, 2014 in Uncategorized by Adrian Marius

From naïve origins to the rise of cinematic realism: an account of graphical milestones in video games.

 

Reflections about ODROID-C1: Another Raspberry Pi Killer?

December 11, 2014 in Android, Linux, Raspberry PI by Adrian Marius

imagesNews via José Cerrejón Glez

I don’t comment usually anything regarding Raspberry PI direct competitors, but this has especially caught my attention due their price: $35. Want to know why I bought one?…

Its features are:

  • Amlogic ARMCortex-A5(ARMv7) 1.5Ghz quad core CPUs
  • Mali-450 MP2 GPU (OpenGL ES 2.0/1.1 for Linux and Android, no OpenCL)
  • VPU for hardware video decoder
  • Power Supply – 5V/2A DC input (2.5/0.8mm barrel). Typical power consumption: 0.5A @ 5V, up to 2A @ 5V with several USB peripherals.
  • 1Gbyte DDR3 SDRAM
  • Gigabit Ethernet
  • SPI, I2C, UART, ADC & GPIO with 40 pin
  • eMMC4.5 HS200 Flash Storage slot / UHS-1 SDR50 MicroSD Card slot
  • USB 2.0 Host x 4, USB OTG x 1
  • IR port
  • Ubuntu 14.04 & Android KitKat 4.4