Qt 4.8
Macros | Functions
qglpixelbuffer_mac.mm File Reference
#include "qglpixelbuffer.h"
#include "qglpixelbuffer_p.h"
#include <AGL/agl.h>
#include <qimage.h>
#include <private/qgl_p.h>
#include <qdebug.h>

Go to the source code of this file.

Macros

#define GL_TEXTURE_RECTANGLE_EXT   0x84F5
 

Functions

static int nearest_gl_texture_size (int v)
 

Macro Definition Documentation

◆ GL_TEXTURE_RECTANGLE_EXT

#define GL_TEXTURE_RECTANGLE_EXT   0x84F5

Definition at line 56 of file qglpixelbuffer_mac.mm.

Referenced by nearest_gl_texture_size().

Function Documentation

◆ nearest_gl_texture_size()

static int nearest_gl_texture_size ( int  v)
static

Definition at line 59 of file qglpixelbuffer_mac.mm.

60 {
61  int n = 0, last = 0;
62  for (int s = 0; s < 32; ++s) {
63  if (((v>>s) & 1) == 1) {
64  ++n;
65  last = s;
66  }
67  }
68  if (n > 1)
69  return 1 << (last+1);
70  return 1 << last;
71 }