小编Rad*_*aid的帖子

无法在OpenGL中进行深度测试

我使用SFML来创建窗口.

在此屏幕截图中,多维数据集应位于金字塔后面,但它不起作用. 截图

这是我使用的最小代码:

#include <OpenGL/gl.h>
#include <OpenGL/glu.h>

#include <SFML/Graphics.hpp>
#include "ResourcePath.hpp"

void resize();
void drawScene();
void initGL();

float rtri = 0;
float rquad = 0;
float z = -10.0f;
int main (int argc, const char * argv[])
{
    // Create the main window
    sf::RenderWindow *window = new sf::RenderWindow();
    window->Create( sf::VideoMode( 800, 600, 32 ), "Collision Detection", sf::Style::Close );

    sf::Event event;

    bool run = true;
    initGL();
    resize();
    while( run ) {
        window->PollEvent( event );
        if( event.Type == sf::Event::Closed ) …
Run Code Online (Sandbox Code Playgroud)

opengl depth-buffer sfml depth-testing

6
推荐指数
1
解决办法
2328
查看次数

标签 统计

depth-buffer ×1

depth-testing ×1

opengl ×1

sfml ×1