3D Engine/ModuleHardware.cpp
//Function that draws all the console
Function that draws all the console
Function that draws all the console
void ModuleHardware::Draw(const char* title)
{
	ImGui::Text("SDL Version: ");
	char SDLVer[256];
	sprintf_s(SDLVer, sizeof(SDLVer), "%d.%d.%d", currentSDLVersion.major, currentSDLVersion.minor, currentSDLVersion.patch);
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, SDLVer);
	ImGui::Separator();
	ImGui::Text("Platform: ");
	const char* platform = SDL_GetPlatform();
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, platform);
	ImGui::Text("CPUs: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%i (Cache: %ikb)", cpus, cache);
	ImGui::Text("System RAM: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%iGb", systemRam);
	ImGui::Text("Caps: ");
	ImGui::SameLine();
	if (rdtsc == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "RDTSC");
		ImGui::SameLine();
	}
	if (mmx == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "MMX");
		ImGui::SameLine();
	}
	if (sse == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "SSE");
		ImGui::SameLine();
	}
	if (sse2 == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "SSE2");
		ImGui::SameLine();
	}
	if (sse3 == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "SSE3");
		ImGui::SameLine();
	}
	if (sse41 == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "SSE41");
		ImGui::SameLine();
	}
	if (sse42 == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "SSE42");
		ImGui::SameLine();
	}
	if (avx == true) {
		ImGui::TextColored({ 125, 156, 212, 255 }, "AVX");
	}
	ImGui::Separator();
	ImGui::Text("GPU: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%s", vendor);
	ImGui::Text("Brand: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%s", gpuName);
	ImGui::Text("VRAM Budget: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%.2f Mb", (totalMemory * 0.001));
	ImGui::Text("VRAM Usage: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%.2f Mb", (memoryUsage * 0.001));
	ImGui::Text("VRAM Available: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%.2f Mb", (availableMemory * 0.001));
	ImGui::Text("VRAM Reserved: ");
	ImGui::SameLine();
	ImGui::TextColored({ 125, 156, 212, 255 }, "%.2f Mb", (dedicatedMemory * 0.001));
}
void ModuleHardware :: Draw ( const char * title ) { ImGui :: Text ( " " ) ; char SDLVer [ 256 ] ; sprintf_s ( SDLVer , sizeof ( SDLVer ) , " " , currentSDLVersion . major , currentSDLVersion . minor , currentSDLVersion . patch ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , SDLVer ) ; ImGui :: Separator ( ) ; ImGui :: Text ( " " ) ; const char * platform = SDL_GetPlatform ( ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , platform ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , cpus , cache ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , systemRam ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; if ( rdtsc == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( mmx == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( sse == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( sse2 == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( sse3 == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( sse41 == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( sse42 == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; ImGui :: SameLine ( ) ; } if ( avx == true ) { ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " ) ; } ImGui :: Separator ( ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , vendor ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , gpuName ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , ( totalMemory * 0.001 ) ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , ( memoryUsage * 0.001 ) ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , ( availableMemory * 0.001 ) ) ; ImGui :: Text ( " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextColored ( { 125 , 156 , 212 , 255 } , " " , ( dedicatedMemory * 0.001 ) ) ; }
Function that draws all the console
Function that draws all the console
//SDL version //Platform //CPU //RAM //Caps //GPU //Brand //VRAM Budget //VRAM Usage //VRAM Available //VRAM Reserved