|
@ -5,6 +5,7 @@ |
|
|
#include <stdio.h>
|
|
|
#include <stdio.h>
|
|
|
#include "misc.h"
|
|
|
#include "misc.h"
|
|
|
#include "model.h"
|
|
|
#include "model.h"
|
|
|
|
|
|
#include "timer.h"
|
|
|
#pragma comment(lib,"opengl32.lib")
|
|
|
#pragma comment(lib,"opengl32.lib")
|
|
|
#pragma comment(lib, "glew32.lib")
|
|
|
#pragma comment(lib, "glew32.lib")
|
|
|
|
|
|
|
|
@ -105,7 +106,10 @@ INT WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine |
|
|
/*load model*/ |
|
|
/*load model*/ |
|
|
unsigned int *indexes = nullptr; |
|
|
unsigned int *indexes = nullptr; |
|
|
int vertexCount = 0, indexCount = 0; |
|
|
int vertexCount = 0, indexCount = 0; |
|
|
|
|
|
Timer t; |
|
|
|
|
|
t.Start(); |
|
|
VertexData* vertexes = LoadObjModel("res/model/Quad.obj", &indexes, vertexCount, indexCount); |
|
|
VertexData* vertexes = LoadObjModel("res/model/Quad.obj", &indexes, vertexCount, indexCount); |
|
|
|
|
|
printf("load model cost %fs %d\n", t.GetPassedTime(), t.GetPassedTickers()); |
|
|
|
|
|
|
|
|
if (vertexes == nullptr) { |
|
|
if (vertexes == nullptr) { |
|
|
printf("load obj model fail\n"); |
|
|
printf("load obj model fail\n"); |
|
|