#include <QtCore/qdebug.h>
#include "../../gl2paintengineex/qglshadercache_meego_p.h"
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
◆ QT_BOOTSTRAPPED
◆ QT_DEBUG_SHADER_CACHE
#define QT_DEBUG_SHADER_CACHE |
◆ QT_MEEGO_EXPERIMENTAL_SHADERCACHE
#define QT_MEEGO_EXPERIMENTAL_SHADERCACHE |
◆ QT_OPENGL_ES_2
◆ GLenum
◆ GLsizei
◆ main()
Definition at line 57 of file main.cpp.
59 ShaderCacheSharedMemory shm;
61 if (!shm.isAttached()) {
62 fprintf(stderr,
"Unable to attach to shared memory\n");
66 ShaderCacheLocker locker(&shm);
67 if (!locker.isLocked()) {
68 fprintf(stderr,
"Unable to lock shared memory\n");
72 void *
data = shm.data();
75 CachedShaders *cache =
reinterpret_cast<CachedShaders *
>(
data);
77 for (
int i = 0; i < cache->shaderCount; ++i) {
78 printf(
"Shader %d: %d bytes\n", i, cache->headers[i].size);
81 printf(
"\nSummary:\n\n" 82 " Amount of cached shaders: %d\n" 84 " Bytes available: %d\n",
85 cache->shaderCount, cache->dataSize, cache->availableSize());
static const char * data(const QByteArray &arr)