/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
| 915 | //! |
| 916 | //////////////////////////////////////////////////////////////////////////////// |
| 917 | void initGLBuffers() |
| 918 | { |
| 919 | // create pbo |
| 920 | #ifdef USE_TEXSUBIMAGE2D |
| 921 | createPBO(&pbo_dest, &cuda_pbo_dest_resource); |
| 922 | #endif |
| 923 | // create texture that will receive the result of CUDA |
| 924 | createTextureDst(&tex_cudaResult, image_width, image_height); |
| 925 | |
| 926 | // create texture for blitting onto the screen |
| 927 | createTextureSrc(&tex_screen, image_width, image_height); |
| 928 | // createRenderBuffer(&tex_screen, image_width, image_height); // Doesn't work |
| 929 | |
| 930 | // create a depth buffer for offscreen rendering |
| 931 | createDepthBuffer(&depth_buffer, image_width, image_height); |
| 932 | |
| 933 | // create a framebuffer for offscreen rendering |
| 934 | createFramebuffer(&framebuffer, tex_screen, depth_buffer); |
| 935 | |
| 936 | // load shader programs |
| 937 | shDrawPot = compileGLSLprogram(NULL, glsl_drawpot_fragshader_src); |
| 938 | |
| 939 | #ifndef USE_TEXSUBIMAGE2D |
| 940 | shDrawTex = compileGLSLprogram(glsl_drawtex_vertshader_src, glsl_drawtex_fragshader_src); |
| 941 | #endif |
| 942 | SDK_CHECK_ERROR_GL(); |
| 943 | } |
| 944 | |
| 945 | //////////////////////////////////////////////////////////////////////////////// |
| 946 | //! Run standard demo loop with or without GL verification |
no test coverage detected