aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/MemoryTracker.h
blob: 9567fac9d67485a658b3991ec82e07f7eb3c3e01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include "MemoryTracker.h"
class ByteBuffer;
class IntBuffer;
class FloatBuffer;
using namespace std;

/** Original comment
 * This class is used so we can release all memory (allocated on the graphics card on shutdown)
 */
// 4J - all member functions in here were synchronized
class MemoryTracker
{
private:
	static unordered_map<int,int> GL_LIST_IDS;
    static vector<int> TEXTURE_IDS;

public:
	static int genLists(int count);
    static int genTextures();
	static void releaseLists(int id);
	static void releaseTextures();
    static void release();
	// 4J - note - have removed buffer types from here that we aren't using
    static ByteBuffer *createByteBuffer(int size);
    static IntBuffer *createIntBuffer(int size);
    static FloatBuffer *createFloatBuffer(int size);
};