删除多余工程
This commit is contained in:
parent
b427fa671a
commit
d4b3783efa
@ -4,4 +4,3 @@ add_subdirectory(NullWindow)
|
|||||||
add_subdirectory(DirectGLRender)
|
add_subdirectory(DirectGLRender)
|
||||||
add_subdirectory(DirectGLTexture)
|
add_subdirectory(DirectGLTexture)
|
||||||
add_subdirectory(TextureSampler)
|
add_subdirectory(TextureSampler)
|
||||||
# add_subdirectory(DrawTriangle)
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
add_executable(DrawTriangle main.cpp)
|
|
||||||
|
|
||||||
target_link_libraries(DrawTriangle PRIVATE glfw GL ULRE.RenderDevice)
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
#include<hgl/graph/RenderDevice.h>
|
|
||||||
#include<hgl/graph/RenderWindow.h>
|
|
||||||
#include<iostream>
|
|
||||||
#include<GLFW/glfw3.h>
|
|
||||||
#include<GL/glcorearb.h>
|
|
||||||
|
|
||||||
using namespace hgl;
|
|
||||||
|
|
||||||
void draw()
|
|
||||||
{
|
|
||||||
glClearColor(0,0,0,1); //设置清屏颜色
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT); //清屏
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
RenderDevice *device=CreateRenderDeviceGLFW();
|
|
||||||
|
|
||||||
if(!device)
|
|
||||||
{
|
|
||||||
std::cerr<<"Create RenderDevice(GLFW) failed."<<std::endl;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!device->Init())
|
|
||||||
{
|
|
||||||
std::cerr<<"Init RenderDevice(GLFW) failed."<<std::endl;
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
WindowSetup ws;
|
|
||||||
|
|
||||||
ws.Name=U8_TEXT("Draw Triangle");
|
|
||||||
|
|
||||||
RenderSetup rs;
|
|
||||||
|
|
||||||
RenderWindow *win=device->CreateWindow(1280,720,&ws,&rs);
|
|
||||||
|
|
||||||
win->MakeToCurrent(); //切换当前窗口到前台
|
|
||||||
win->Show();
|
|
||||||
|
|
||||||
while(win->IsOpen())
|
|
||||||
{
|
|
||||||
draw();
|
|
||||||
|
|
||||||
win->SwapBuffer(); //交换前后台显示缓冲区
|
|
||||||
win->PollEvent(); //处理窗口事件
|
|
||||||
}
|
|
||||||
|
|
||||||
delete win;
|
|
||||||
delete device;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user